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
A Problem with Creating Standardized Variables for Each VariableDear all, I am trying to create new variables based on some specific variables ending with "dac2a".…
combine observations under conditionsHi there, I am seeking help to combine rows into one under a certain ID. The conditions are as below…
Error r(134) in roccompHi everyone. I am trying to compare the AUCs of two tests, y1 and y2. The outcome variable (true dia…
Creating a graph by groupHi, I can't figure out how to make a really simple graph, and I hope someone is able to help me out…
Comparing proportions using svy commandHello, I am a PhD student and working in stata only since 2 years. I need to compare proportions o…
Subscribe to:
Post Comments (Atom)
0 Response to ppml_panel_sg and RESET test
Post a Comment