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
Ordinal Data: CFA treating data accordingly vs continuouslyI have ordinal, that is to say Likert-type of data, with four response categories. Bandalos (2018) …
Interpretation of results of catigorical#continuous interaction in comparison to reparameterized regression modelHello nice to meet you After having searched this forum and google for several days without "clear…
rolling geometric meanHi, Is there a simple way to calculate rolling geometric means, for example 10 year window? Can I u…
Correlate scales from different sources when data is in long formatHi My data is in long format and consists of six sub-scales (Scale1-Scale6) and three different res…
"cannot open C:\Program Files (x86)\Stata13\inter.txt" , what i can do to open the matrix file?i create a distance matrix using spmat command, and when i export the following matrix to a text for…
Subscribe to:
Post Comments (Atom)
0 Response to Nested logit with invariant regressor
Post a Comment