Dear Statalist,
I would like to use a conditional logit model to analyze the following survey questionnaire: Q75: In what ways did the partial government shutdown negatively affect your work? (Check all that apply). There are 10 response options for this item; 75_1: Unmanageable workload, 75_2: Missed deadlines, ..., 75_10: Other.
My current data structure is as...
id shut_1 shut_2 shut_3 shut_4 shut_5 shut_6 shut_7 shut_8 shut_9 shut_10 sex age ...
1 1 1 0 0 0 0 0 1 0 0
2 0 0 0 0 0 0 0 1 1 0
I want to change this to:
id shut_1 shut_2 shut_3 shut_4 shut_5 shut_6 shut_7 shut_8 shut_9 shut_10 sex age ...
1 1 0 0 0 0 0 0 0 0 0
1 0 1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 1 0 0
2 0 0 0 0 0 0 0 1 0 0
2 0 0 0 0 0 0 0 0 1 0
I've noticed that the reshape command is not quite what I am looking for, since it merges the binary categorical variables (shut_1, ... shut_10) into one single variable.
Could anyone show me how to solve this?
Thanks.
Related Posts with Reshaping data for conditional logit modeling
Can I have two lines and one histogram in the same graph?Hi all, I would like to draw a graph with three information: 1. Age on y-axis(1) 2. Gender on y-axi…
Appending datasets by keeping the common variabels onlyHi, I want to append datasets for various countries, each of which contains variables that others do…
ARDL short run and long run InterpretationHi everyone, This is the first time I use Stata for my paper so I am confused a lot. I’m doing my re…
Creating categories and line plotsI would like to create 3 categories -- US, Non-US, and Non-US Developed -- using the variable countr…
Replace missing values by system-missing '.' if label value is "Manquant"Hello, I have a survey where most variables have a different code for missing values, I need to uni…
Subscribe to:
Post Comments (Atom)
0 Response to Reshaping data for conditional logit modeling
Post a Comment