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'
Local Moran's I testThe estat moran postestimation command does not work with spxtregress command. Does any one know how…
Export Frequency tableHi, I'd like to export a frequency (one-way) table using svyset. The table would include: * the num…
Creating a Variable to Measure Recent PerformanceI am trying to count the number of times an NFL has won a game in their last four games. I already h…
Local Moran's I testThe estat moran postestimation command does not work with spxtregress command. Does anyone know how …
In mixed-effect model, how to display individual random slope/coefficient in the datasetHi Stata users, I am using a mixed-effect model with random intercept and random slope. Stata code l…
Subscribe to:
Post Comments (Atom)
0 Response to 'Reshape Command'
Post a Comment