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.
0 Response to Reshaping data for conditional logit modeling
Post a Comment