Hi Statalists,
I'm currently dealing with a panel data and here is a example to show what the dataset looks like. Actually it has more than 20000 observations and 6000 variables. Basically, every individual (id) would be interviewed one, two or more times (numeric variable 'wave' and string variable 'surveytime' can tell you when the individual was interviewed). And the rest of variables are answers to according questions in the survey. The point is I'm not sure how to reshape such a huge dataset. Because generally I only use -reshape- command to deal with several variables. And I also don't know how to tell stata that I need reshape all variables (May I ask if macro is required in this situation?)
id state strat raid sah surveytime adst wave
1 A 50 279 78921 19/08/2004 [3] no 4
2 A 50 279 78921 19/07/2004 [3] no 4
3 B 84 143 55441 04/11/2004 [3] no 4
3 B 84 143 42501 01/12/2009 [2] unsure 9
3 B 84 143 196371 06/09/2013 [2] unsure 13
3 B 84 143 193971 03/08/2017 [3] no 17
4 C 84 143 55441 04/10/2004 [3] no 4
I expect to convert current long format data into wide format data according to 'id' and 'wave', i.e. the information of each id from wave 4 to wave 17 will be included in one single row.
Thanks in advance!
Related Posts with How to reshape panel data with a great number of variables
Export to excelHello!! I am trying to export summary statistics like n mean sd median iqr min max for a series of …
Interpretation of regression results of capital flowsDear statalisters, I have run three similar regressions of this model: lnGCFGDPit= ß0+ ß1newdealit…
Stata states varlist not allowed with Coefplot CommandI am a new user to Stata. I am working on a dataset from an experiment that looked at how male and f…
suest with "too many base levels specified"?Dear All, I was asked this question from a friend. The error message is Array Any suggestion on thi…
ordinal regression with interaction term (ordinal and binary variable)How can I interpret this outcome and especially the interaction term? repression (0= minamal, 1= mo…
Subscribe to:
Post Comments (Atom)
0 Response to How to reshape panel data with a great number of variables
Post a Comment