Dear Statalist,
I am trying to estimate the RESET and the Park test with the ppml_panel_sg command. I have already managed to get the same coefficient parameters using both the 'ppml' and 'ppml_panel_sg' commands, Once, however, I include in the model both exporter/importer-time FE and country pair FE the simple 'ppml' command,does not produce the standard errors or the RESET test. So I had to go to the faster ppml_panel_sg command. A similar code to the one I am presenting below works fine with the simple 'ppml' command. The following code that employs ppml_panel_sg includes exporter/importer-time-FE and country pair FE.
/// code starts here
set more off
ppml_panel_sg xftaif exporter!=importer, ex(exporter) im(importer) y(year) pred(predicten4) robust
estimates store R7, title(PPML with Exporter/ Importer Time FE and CP FE)
predict fit1,xb
*predict ehat1, res
gen fit2=fit1^2
quietly ppml_panel_sg x fta fit2 if exporter!=importer, ex(exporter) im(importer) y(year)robust
test fit2=0
* next lines are wrong
gen ehat1=x-fit1
gen ehat2=ehat1^2
glm ehat2fit1if exporter!=importer, cluster(pair) family(poisson) diff iter(30)
test fit1=1
test fit1=2
drop fit1 fit2 ehat1 ehat2
/// code ends here
I am not sure that the RESET test (and the predict command) is estimating what it is supposed to. I cannot get a value for the RESET as the fitted values are now 0 (for all those observations that have FTA=0) and a constant (0.944 - for all those observations that have FTA=1). Is this an issue with the link function. Should the pred() command? Can I get the residual values somehow for the park test (because getting them as 'gen ehat1=x-fit1' is wrong since predicted and fitted values are different)?
Thanks in advance for any input
Related Posts with ppml_panel_sg and RESET test
ESS- computing centred human value scoresHi, I am currently trying to compute the human value index on stata, using the ESS from 2018. I was…
Using repeated measures ANOVA vs. linear mixed effects model to evaluate changes in scores after trainingHello, I have a dataset that contains survey responses from participants attending a training works…
What's the relationship between -rcsgen- and -stpm2-?Dear Stata specialists, I have seen the description of -rcsgen- on Paul Lambert's blog, stating tha…
Local and Square Bracket NotationI am trying to create a loop where the new variable depends on year and row of the old variable. How…
Hat off to Clyde's remarkable milestone (20,000 contributions)In this gloomy era, I'm happy to celebrate this new milestone achieved by Clyde on this forum. His m…
Subscribe to:
Post Comments (Atom)
0 Response to ppml_panel_sg and RESET test
Post a Comment