Hello,
I have a model like this: ppmlhdfe v.d. v.i., absorb (orig_year dest_year) cluster (origin destination year)
I followed João Santos Silva in RESET test.
* Get fitted values (of the linear index, not of trade)
predict fit, xb
* Square the fitted values
gen fit2=fit^2
* Estimate the model with the additional regressor
ppmlhdfe kg lnthrou_total lndij fit2, absorb (orig_year) vce (cluster orig_dest_year)
* Test the significance of the additional regressor (this is equivalent to a t-test on fit2)
test fit2=0
This is the result:
test fit2=0
( 1) fit2 = 0
chi2( 1) = 4.02
Prob > chi2 = 0.0450
Now, I would like to have the fitted value of trade. I also try to follow what it is suggested:
* Get fitted values of trade
predict fitted
* Compute correlation between trade and fitted values
qui cor fitted trade
* Display R2 computed as the square of the correlation between trade and fitted values
di as txt " R-squared " (`r(rho)')^2
Already in the first step, there is an error
. predict fitted (option mu assumed; predicted mean of depvar)
predict mu requires the -d- option of ppmlhdfe r(9);
Thanks a lot if someone can help me since I could understand the outcome.
Ticiana
Related Posts with How to get fiited value of trade with ppmlhdfe?
Hsiao Li Racine test for correct specification of parametric regression modelsHello, I am searching but have no luck in finding the stata code for the Hsiao Li Racine test that c…
Standardising variables ***Stata newbie***Hi all, I am trying to standardise 'ethnicity' variable into four categories: 1. white 2. black 3.…
Region and year fixed effects model for pooled cross sectional dataDear all, I have a dataset of pooled cross sectional data for individuals across a number of differ…
Synthetic control method: how to select V matrixDear all, I am learning Synthetic Control method, Stata has command Code: synth . When I read th…
Probit RegressionHi, I have a question according to a probit regression. The variable Format is 1 if a company switch…
Subscribe to:
Post Comments (Atom)
0 Response to How to get fiited value of trade with ppmlhdfe?
Post a Comment