Code:
use wave1.dta gen wave1=1 append using Wave2.dta, gen(wave2) append using Wave3.dta, gen(wave3) append using Wave4.dta, gen(wave4) append using Wave5.dta, gen(wave5) gen wave=. replace wave=1 if wave1==1 replace wave=2 if wave2==1 replace wave=3 if wave3==1 replace wave=4 if wave4==1 replace wave=5 if wave5==1 tab wave reg dv i.wave
Code:
wave | Freq. Percent Cum. ------------+----------------------------------- 1 | 1,163 19.03 19.03 2 | 1,128 18.46 37.49 3 | 963 15.76 53.25 4 | 1,244 20.36 73.60 5 | 1,613 26.40 100.00 ------------+----------------------------------- Total | 6,111 100.00
Code:
------------------------------------------------------------------------------ DV. | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- wave | 3 | -.0869578 .07191 -1.21 0.227 -.227933 .0540174 4 | -.1621109 .0673337 -2.41 0.016 -.2941147 -.0301071 5 | -.071348 .0634911 -1.12 0.261 -.1958186 .0531226 | _cons | 3.231298 .0483972 66.77 0.000 3.136418 3.326178 ------------------------------------------------------------------------------
Code:
------------------------------------------------------------------------------ DV. | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- wave | 1 | .071348 .0634911 1.12 0.261 -.0531226 .1958186 2 | 0 (empty) 3 | -.0156098 .067213 -0.23 0.816 -.1473768 .1161572 4 | -.090763 .0622926 -1.46 0.145 -.212884 .0313581 5 | 0 (omitted) | _cons | 3.15995 .0410954 76.89 0.000 3.079385 3.240515 ------------------------------------------------------------------------------
0 Response to Stata omitting two levels of a variable instead of one
Post a Comment