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
Using -expand- to duplicate multiple rowsI have data that look like the following: Code: * Example generated by -dataex-. To install: ssc i…
Calculating CIs after mixed-effects poissonHi all, I'm trying to graph the results of a mixed-effects poisson model and have come across some i…
Changing titles on side-by-side bar graphsHi All, I'm trying to create a side-by-side bar graph, as per below (note dummy variable labels inc…
Collapse function, error - variable not found + error in option by ())Good afternoon to the community. I would like to calculate the mean and standard deviation of intang…
lincom command with same variable after suregDear all, I am running a Seemingly-Unrelated-Regression using -sureg- for 80 banks. Brief backgroun…
Subscribe to:
Post Comments (Atom)
0 Response to Reorganising panel data
Post a Comment