I have a biennial panel by using:
xtset hhidpn Year, delta(2)
hhidpn denotes the individuals in the survey, through command --xtdescribe-- I get the following result for hhidpn:
hhidpn: 3010, 3020, ..., 9.584e+08 n = 13329
Year: 1998, 2000, ..., 2012 T = 8
Delta(Year) = 2 units
Span(Year) = 8 periods
(hhidpn*Year uniquely identifies each observation)
Distribution of T_i: min 5% 25% 50% 75% 95% max
1 1 1 2 3 5 8
Freq. Percent Cum. | Pattern
---------------------------+----------
2638 19.79 19.79 | ......11
1125 8.44 28.23 | 1.......
980 7.35 35.58 | .....1..
914 6.86 42.44 | 11......
835 6.26 48.71 | ...11.11
758 5.69 54.39 | ......1.
643 4.82 59.22 | .......1
563 4.22 63.44 | 111.....
513 3.85 67.29 | 11111...
4360 32.71 100.00 | (other patterns)
---------------------------+----------
13329 100.00 | XXXXXXXX
.It shows this is a cross-sectional data set, and I want to evaluate whether high job insecurity (HS) has an impact on
the health, which is H in the model. HS is endogeneous and I want to use the IV for the panel dataset.
the number of hhidpn is larger, can I use the following commands to estimate the individual fixed effects?
I understand that we may use county, area or other variables' fixed effects, but here assume that
individual fixed effects are recommended.
local Var_A hhidpn i.Year ,,,,
ivregress 2sls H (HS=IV) `Var_A' ,first
If I assign ---- ivregress 2sls, fe -----, stata reports an error.
Another question is that if I do not transfer the data to panel by -----xtset hhidpn Year, delta(2)----,
just do a normal OLS regression and want to catch the individual fixed effect, can I use the following?
local Var_A hhidpn i.Year ,,,,
regress H HS `Var_A'
If I assign i.hhidpn in the above, stata will return an error.
I understand that by setting it to a panel like below, we can catch the individual fixed effect,
but here we do not change it to panel, just a normal OLS.
xtset hhidpn Year, delta(2)
local Var_A i.Year ,,,,
xtreg H HS `Var_A' , fe
Thanks for your comments.
xtset hhidpn Year, delta(2)
hhidpn denotes the individuals in the survey, through command --xtdescribe-- I get the following result for hhidpn:
hhidpn: 3010, 3020, ..., 9.584e+08 n = 13329
Year: 1998, 2000, ..., 2012 T = 8
Delta(Year) = 2 units
Span(Year) = 8 periods
(hhidpn*Year uniquely identifies each observation)
Distribution of T_i: min 5% 25% 50% 75% 95% max
1 1 1 2 3 5 8
Freq. Percent Cum. | Pattern
---------------------------+----------
2638 19.79 19.79 | ......11
1125 8.44 28.23 | 1.......
980 7.35 35.58 | .....1..
914 6.86 42.44 | 11......
835 6.26 48.71 | ...11.11
758 5.69 54.39 | ......1.
643 4.82 59.22 | .......1
563 4.22 63.44 | 111.....
513 3.85 67.29 | 11111...
4360 32.71 100.00 | (other patterns)
---------------------------+----------
13329 100.00 | XXXXXXXX
.It shows this is a cross-sectional data set, and I want to evaluate whether high job insecurity (HS) has an impact on
the health, which is H in the model. HS is endogeneous and I want to use the IV for the panel dataset.
the number of hhidpn is larger, can I use the following commands to estimate the individual fixed effects?
I understand that we may use county, area or other variables' fixed effects, but here assume that
individual fixed effects are recommended.
local Var_A hhidpn i.Year ,,,,
ivregress 2sls H (HS=IV) `Var_A' ,first
If I assign ---- ivregress 2sls, fe -----, stata reports an error.
Another question is that if I do not transfer the data to panel by -----xtset hhidpn Year, delta(2)----,
just do a normal OLS regression and want to catch the individual fixed effect, can I use the following?
local Var_A hhidpn i.Year ,,,,
regress H HS `Var_A'
If I assign i.hhidpn in the above, stata will return an error.
I understand that by setting it to a panel like below, we can catch the individual fixed effect,
but here we do not change it to panel, just a normal OLS.
xtset hhidpn Year, delta(2)
local Var_A i.Year ,,,,
xtreg H HS `Var_A' , fe
Thanks for your comments.
Comment