I am working on cross section data and I am trying to run a simulation of the impact of climate change on farmers' incomes based on climate scenarios, but I am not sure how to proceed. I am using a log specification and took account the logarithmic transformation but I have somme issues to determine the predicted change.
Here is the code I used :
Code:
regress logrevpast plumoymensV sqplumoymensV plumoyssecV sqplumoyssecV tempmoy sqtempmoy age ib0.sexehead taillemen densite distville distforage patexpss ib3.agrozone, vce(robust) quietly predict lyhat0 generate yhatnormal0 = exp(lyhat0)*exp(0.5*e(rmse )^2) regress logrevpast precsmp1 sqprecsmp1 plumoyssecV sqplumoyssecV tempsmp1 sqtemsmp1 age ib0.sexehead taillemen densite distville distforage patexpss ib3.agrozone, vce(robust) quietly predict lyhat1 generate yhatnormal1 = exp(lyhat1)*exp(0.5*e(rmse )^2) regress logrevpast precspp1 sqprecspp1 plumoyssecV sqplumoyssecV tempspp1 sqtemspp1 age ib0.sexehead taillemen densite distville distforage patexpss ib3.agrozone, vce(robust) quietly predict lyhat2 generate yhatnormal2 = exp(lyhat2)*exp(0.5*e(rmse )^2)
Code:
sum yhatnormal0 yhatnormal1 yhatnormal2
Code:
sum yhatnormal0 yhatnormal1 yhatnormal2 Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- yhatnormal0 | 918 1858089 1107744 373023.8 4974372 yhatnormal1 | 918 1842156 1299330 246173 7328710 yhatnormal2 | 918 1842156 1299330 246173 7328710
Thank you in advance for your help
0 Response to Difference between two predictions after a log-linear regression
Post a Comment