I have Panel data ranging over 8 time periods (quarters).
For each individual, there are 4 quarters worth of data for each variable.
Array
Each variable is written like so: AGE1, AGE2, AGE3, AGE4, AGE5, AGE6, AGE7, AGE8.
Instead, I would like to have just one AGE variable, but a separate column for QUARTER where I specify quarters 1-8. How can I do this? On excel or stata is fine.
My aim is to create a dummy variable for pre/post 1st April 2016. So I want to be able to tell stata that Q1-4 = 0 and Q5-8 = 1.
(My data is the one with PERSID at the top left, taken from LFS. The other image is from an example dataset which I want to imitate.)Array Array
Related Posts with Reorganising panel data
Generating a new variable based on certain conditionsGood day everybody, I am quite new to Stata and I have a question regarding creating a new variable…
Different results using xtreg, fe and reghdfe, absorbApologies for a long post. Posting here first time, so trying to be as descriptive about my problem …
Oaxaca Package r(602) errorI am having an issue with using the 'oaxaca' package in STATA. I have managed to use this package in…
Agreement between many raters with many different subjects against gold standard raterHi All, Any tips on how to analyze level of agreement when 1) many raters, let's say students that w…
I have in-sample predictions after lasso regressions but can not make them out-of-sampleDear All I had an old post that perhaps was not clear. As is advised by some of you, I decided to c…
Subscribe to:
Post Comments (Atom)
0 Response to Reorganising panel data
Post a Comment