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
descriptive statistics in putexcel after summarizeDear Statalister, I would to create a table containing the descriptive statistics of a large number…
Bland-Altman difference Plot problem with codeHi all, I have been trying to draw a bland -altman difference plot Code: Code: batplot systolicd…
logout with fix()Hello, I read that when using -logout- I can add fix(#) to adjust the sensitivity of fix method, and…
Option "in" for serrbar graph (multilevel model)Hello, I have made a multilevel model for which I want to plot the effects of one of the levels, wh…
Working with large datasets, saving the dta files with different names in a loopDear all, I am working with several csv. file each having a size between 700 MB to 2 GIG. I need to…
Subscribe to:
Post Comments (Atom)
0 Response to Having problem reshaping my qualitative data for estimation of nested logit
Post a Comment