Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73324

Plotting U-shaped curves using predict and twoway

$
0
0
I am trying to test for an inversed U-shaped patterns between R&D attainment discrepancy (which is the difference between the level of R&D exhibited by a focal organization i at time t-1 and the average industry R&D level at time t-2) and innovative performance at time t+1 (measured as the number of patents filed by the focal firm).
To test for a U-shaped between R&D attainment discrepancy and innovative performance, I used a random-effects negative binomial model (supported by a Hausman test) including the direct (significant and positive) and the squared term (significant and negative) of my IV.

To corroborate my findings I would like to graph the X-Y relationship over the relevant range of X, while holding other continuous variables at the sample means, and binary variables at 1. Is the following procedure correct?

* Random-effects negative binomial regression for innovative performance
xtnbreg F1Patent RDgap RDgapSquared RD1lag SPFnegative SPFpositive SL L1Altman L1GD IMPintensityPERCE RelDiv UnrelDiv L1LogtotAsset AGE IndGrowth RDav IndNIP IndPAT _Iyear*, re


*Generating Linear predicion for F1Patent after xtnbreg
predict F1Patenthat

*Graphing the results
twoway line F1Patenthat RDgap if _est_IPModel==1, sort //*(_est_IPModel==1 corresponds to e(sample))
twoway qfitci F1Patenthat GapBEST if _est_IPModel==1, sort

I think that I failed in holding the remaining covariates at their means and significant binary variables at 1.


Many thanks in advance for your always precious help,


Ambra

Viewing all articles
Browse latest Browse all 73324

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>