I am trying to use nested logit specification for estimating school choice of households. The first branch may be explained as - if the student currently attends school, the question of choosing between government and private schools arises. The other branch is degenerate i.e. not attending school.
tree structure specified for the nested logit model
type N school N k
-----------------------------------
attend 77902 --- gov 38951 20534
+- pvt 38951 7648
no attend38951 --- n 38951 10769
-----------------------------------
total 116853 38951
I have used the stata code
nlogitgen type= school(yes: gov|pvt, no: n)
constraint 1 [no_tau]_cons=1
nlogit choose monthavfee|| type: mpce, base(no)|| school:, noconstant case(id) constraint(1)
However, on including an alternate invariant regressor 'logtuiexp' in the main regression, which is average private tuition cost, which does not vary across school choice, the command does not work. This is not a household/individual specific variable but remains invariant across choices (does not vary across individuals(j) and choices (k))
nlogit choose monthavfee logtuiexp|| type: mpce, base(no)|| school:, noconstant case(id) constraint(1)
variable logtuiexp is not alternative-specific: it has no within-case variability
r(459);
This is the error I am getting. Any suggestion would be really helpful for me.
Thanks in advance
Sayoree Gooptu
Related Posts with Nested logit with invariant regressor
Line graph for categorical dataHi, I have a problem of translating my categorical data into a line graph showing change over time. …
Regression for all possible combinations of variablesHello all, I am a new STATA user and trying to run a foreach regression loop. I have 32 independent…
Seeking advice on how to address the correlations of error terms across simultaneous equationsHello statalist users, I was trying to find some advice on addressing the correlations of error ter…
Monthly excess returnHello! fundnr year mktrf smb hml mom mf_u_mnret 1 2015 .59 -2.97 1.85 -7.37 .0218749 1 2012 -.85 -.…
Panel data - matching observations from an unsorted datasetDear all, I have a panel dataset No.1 with multiple variables, including time, personal id, educati…
Subscribe to:
Post Comments (Atom)
0 Response to Nested logit with invariant regressor
Post a Comment