I am using STATA 16.1 and trying to estimate the following household (hhid) model.
reg D.y peak D.x peak#D.x
(I actually run reg diff_y peak diff_x peak_diff_x, where, diff_y is D.y and alike, and peak_diff_x is peak*diff_x , peak is dummy, as D. operator is not allowed with factor variable I have to run this way.)
I want to calculate the effect of D.x in peak (agricultural season) by adding coefficient of D.x and peak#D.x
However, it seems to me STATA is giving me wrong first difference for my purpose for seasonal data.
Please let me know where I go wrong?
I got the following first difference as
xtset hhid wave
gen diff_y = D.y
gen diff_x= D.x
input int hhid float wave byte peak float(y diff_y x diff_x)
2 1 0 2.6390574 . 1.568616 .
2 1 1 2.833213 . 1.568616 .
2 2 0 4.0943446 1.2611313 1.609438 .04082203
2 2 1 4.477337 1.6441236 1.609438 .04082203
2 3 0 5.252274 .7749367 1.609438 0
2 3 1 6.042633 1.565296 1.609438 0
3 1 0 4.4426513 . 1.0296195 .
3 1 1 5.105946 . 1.0296195 .
3 2 0 3.583519 -1.5224266 1.0986123 .06899285
3 2 1 4.158883 -.9470625 1.0986123 .06899285
3 3 0 4.553877 .3949938 1.0986123 0
3 3 1 5.631212 1.4723287 1.0986123 0
Related Posts with First differencing in Seasonal Agriculture Data
Merging household census data for logistic regressionGood evening everyone, First, I'd like to say thank you to all of these helpful users from which I …
How to solve error "estimation result constrained not found" in lrtest commandHi everyone! I've run the following syntaxes to compute the global test of the parallel lines assump…
Stata: Statistics vs "Data Science"I have recently joined a company heavy in "Data Science". I thought, great, I love statistics myself…
OLS MLR Regression Analysis PlanHello All, Hoping to receive feedback on a plan for an OLS MLR analysis planning in STATA. Questio…
MI & GSEMMorning, I am looking to run a path analysis (two variables measured at two time points) using gsem…
Subscribe to:
Post Comments (Atom)
0 Response to First differencing in Seasonal Agriculture Data
Post a Comment