I have a dataset with 727 observation and 29 variables. The variables with biom and solar prefix are alternative which is 1 when chosen and zero when not chosen.educ is a categorical variable for education while ch is a choice variable which I also want to generate as a dependent variable for nested logit in stata.
id biom_trad biom_mod solar_trad solar_mod educ ch
1. 1 0. 0. 0. 1. 1
2. 0. 1. 0. 0. 3. 2
3. 0. 0. 0. 1. 2. 4
I want to convert this to a nested logit long format where I would have each individual having 4 rows showing the alternative chosen rowwise and to also construct the chosen variable that looks like the ch variable above for the particular individual.. Just like the needed nested log it format required in stata.
Thanks
Related Posts with Having problem reshaping my qualitative data for estimation of nested logit
Distribution of the individual-level WTP following mixed logit model estimationDear all, I conducted a discrete choice experiment with 5 attributes (hereafter regrouped under $at…
Verify Fixed Effects resultsDear Statalists, I did a fixed-effects analysis and obtained the expected significant results. Then…
Mediation using sgmediationDear all, I am conducting a fe panel regression in stata and want to check for a mediation I am usi…
RobustDear Statalists! I am running a FE regression in stata using the command xtreg y x, fe. I was wonde…
Assesing the impact of vaccine over timeHow can I asses the impact of intervention overtime(particularly PCV10), We had analysed effect PCV1…
Subscribe to:
Post Comments (Atom)
0 Response to Having problem reshaping my qualitative data for estimation of nested logit
Post a Comment