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
Panel data, Stata omits i.Year dummies due to collinearityHi all, I am fairly new to Stata and I ran into a problem with my panel data set. My data set consi…
mrgraph error - variables R _variables do not uniquely identify the observationsI am trying to get a graph for a multiple response question. I have read the resource and the mrtab …
XTDPDBC: new Stata command for bias-corrected estimation of linear dynamic panel data modelsDear Statalisters, Linear dynamic panel data models are commonly estimated by GMM (for example with…
Comparing two CoefficientsHello there, i have split my sample into two parts and ran a fe regression for both of them. is it…
Esttab: rearrange variables -- option order not allowedI am trying to rearrange the order in which variables appear in my table. But for some reason, the e…
Subscribe to:
Post Comments (Atom)
0 Response to Nested logit with invariant regressor
Post a Comment