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
Tables Esttab, estout for cvlassoDear all, I am running a cvlasso using sjlog in order to keep track of my commands with a log, but …
Do I still have to add 'i.' in front of variables that I want to use as dummies, but already encoded in 0 and 1 prior to import?Hello, I am very novice in stata, and struggling to get information but very difficult for current. …
ESTAT PTRENDS with cross-sectional data without two pre-intervention time periodsHi to everyone, I am doing my computations for a study using DD estimation. After I carried our my …
Test difference between two groups (matched data). …
Esttab output not showing correct variable names after using the "i."-commandHello everyone, I am doing an analysis and am struggling with the esttab feature, more specifically …
Subscribe to:
Post Comments (Atom)
0 Response to Having problem reshaping my qualitative data for estimation of nested logit
Post a Comment