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
spatial econometricsGood afternoon someone knows how its possible to use a panel data with spatial econometrics ? what …
Median incomeHi folks, The data below is a sample survey data. How do i generate the median annual income per ye…
Multilevel model: REML or robust SE's?My apologies for the silly question: I've been running a mixed effects model and since I have a smal…
Generating new observation for all id's in panel dataDear Stata community, can you help me with this issue of adding a generated observation to the data …
To calculate values with sevral IF commandsHi, can anyone help me to write a code for some calculations? To calculate the final grade for each …
Subscribe to:
Post Comments (Atom)
0 Response to Nested logit with invariant regressor
Post a Comment