Hello Everyone,
I am using a large survey (non panel) data set and would like to restructure multiple policy position values into one new pooled policy variable while keeping each value separate (not adding the values together). This would mean adding observations, duplicating and keeping constant all other information for each respondent as shown below:
Original Data Example:
ID__Policy1__Policy2__Policy3__X1__X2__X3
1_____A______B______C______1___2___3
2_____B______A______C______3___2___1
Where ID is the respondent's ID, Policy1/2/3 are the different values of policy positions, X1/2/3 are other variables of interest.
Restructured to:
ID__Policy__X1__X2__X3
1____A_____1___2___3
1____B_____1___2___3
1____C_____1___2___3
2____B_____3___2___1
2____A_____3___2___1
2____C_____3___2___1
Where ID is the respondent's ID, Policy is the new singular pooled policy value variable, X1/2/3 are other variables of interest.
I have not used Stata to do this before and I am sure that it is a simple solution, and I am reaching out for advice on what code is needed and any other information that you think I should be aware of.
Thanks in advance!
Related Posts with Creating a pooled variable with survey data
Use variables of only one child from among many childrenI have father's data id household member number father's age ..other father's variables parent-ch…
Tabout: produce a table of means with multiple variablesDear Statalisters, This is my first post, therefore I hope it will be comprehensible and compliant …
Firm Fixed Effects in ManovaHello, I have Panel Data and I want to run a multivariate Regression using Manova/Mvreg. Is it poss…
Use variables of only one child from among many childrenI have father's data id household member number father's age ..other father's variables parent-ch…
Country fixed effects multilevel analysis not workingHello everyone, I’m trying to replicate the “WVS 5” country fixed effects model (Bayerl & Best,…
Subscribe to:
Post Comments (Atom)
0 Response to Creating a pooled variable with survey data
Post a Comment