Dear all
I am using the South African National Income Dynamics Survey (NIDs) and have successively created a panel dataset across all 5 waves.
I am wanting to reshape my cleaned dataset from wide to long form. I know that the reshape command is simple enough, but after extensive research, i still cannot understand it.
This may be because my stata program does not process the command and makes the computer very slow.
My code is:
reshape long w@_hhid w@_access w@_distance w@_sanitation ///
w@_educ_yrs w@_missed w@_hhsize w@_elec w@_province ///
w@_inc w@_nchild w@_age w@_race w@_order w@_age2 ///
w@_m_mhealth w@_f_mhealth w@_nli w@_head_empl ///
w@_feduc w@_meduc w@_dwell_type ///
w@_hhincome w@_gen_head w@_area w@_health_stat, i(pid) j(wave)
rename w_* *
tab wave, m
Could anyone provide me with any advice as to whether these are the correct steps?
Kind regards
Sophie Gebers
Related Posts with 'Reshape Command'
Stratified Random SamplingHello, I am using STATA 14. Currently I am working with a dataset with 471 observations where I have…
auto-filter variable name in dialog boxHi, I'm relatively new to Stata and am wondering if I'm missing something simple when it comes to se…
Error-correction model with GMM first differenceDear Statalist users Could you please help with advice on how to construct an Error correction mode…
population attributable fraction using clogithello all, does anyone know if PAF can be calculated after using clogit? last I heard, it can only b…
HC2 HC3 standard errors with clustersDear all I have one question regarding robust standard errors with the command regress. Does it make…
Subscribe to:
Post Comments (Atom)
0 Response to 'Reshape Command'
Post a Comment