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'
T-tests and regressionsHi, I want to compare the coefficient on one variable (i.e. IndVar) from the regressions based on tw…
Screen for most recent dataHey! I have a panel data. cusip is the company ID. fpedates is the quarter end date. anndates is th…
Getting spregress to work with panel data when I am not interested in introducing random effects or fixed effectsBefore describing my problem in detail, here is my specific question: Can I use spregress without in…
Exploratory Factor Analysis with dichotomous dataHello, This thread has been super informative. I'm also working with dichotomous variables (yes/no)…
Exploratory Factor Analysis with dichotomous data "Heywood Case"Hello, I'm currently working with dichotomous variables that belong to a 15-item questionnaire that…
Subscribe to:
Post Comments (Atom)
0 Response to 'Reshape Command'
Post a Comment