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'
Comparing mixlogit results across equationsDear statalist users, I run two separate mixlogit (Arne Hole commend) models and I want to compare c…
Testing for parallel trendHello statalists! I have a very beginner question, I am working on a panel dataset trying to estim…
How to import large mdb fileHi, I have to import large .mdb files and transfer into stata file. As the databases are saved in 3…
How to create a dummy within a categorical variable.Hello everyone, i am working on Mergers and Acquisition. I have a variable named "Acquirer Name" whi…
period to period changeDear Stata users, The dataset I am working on is repeated measures data and it looks as below. I wa…
Subscribe to:
Post Comments (Atom)
0 Response to 'Reshape Command'
Post a Comment