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
Graph question for growth model "xtmixed"Hi, I'm having a problem in making a line graph for my growth model. The outcome variable is depress…
Logit Marginal Effects at means with interaction termsHi all, I am working on my MSc. and I have data for 201 participants who each made 457 choices (tot…
Seemingly Unrelated Regression with endogeneity and sample selectionHello everyone! I wish to see the impact of income from an activity on various types of household ex…
Reassigning records with missing values to existing categories considering the existing distribution within the populationDear Statalist, I am struggling to reassign records with a missing value on the categorical variabl…
Calculating growth in unbalanced panel dataCan someone help me with calculating the growth percentages of a variable in panel data where I don'…
Subscribe to:
Post Comments (Atom)
0 Response to Reshaping data for conditional logit modeling
Post a Comment