# st: confused with nlogit

 From KONSTANTARAS KONSTANTINOS To statalist@hsphsun2.harvard.edu Subject st: confused with nlogit Date Tue, 17 Feb 2009 18:03:49 +0200 (EET)

```Dear statalisters,

I try to run a nested logit analysis in order to combine two (hypothetical) decision steps:
1) default or no default (2 outcomes)
```
2) if in default, 3 additional outcomes may occur Hence, there exist four bottom outcomes in my model (3 for the defaulted cases, one –degenerate- outcome for the non-defaulted) which form a categorical variable “al” with 4 discrete values.
```I should mention that all independent variables are individual specific –no alternative specific covariates exist.
I use the nlogit command hence expand my data –expand 4-, create the choice variable cho4 to indicate which bottom case has been selected, create a level 1 variable to indicate the top level choice –called deftype-.
As explanatory variables I use variables that have been found statistically significant for explaining the level-1 case in a binomial logit setting (named X covariates) and different covariates found significant for the 3 additional outcomes -once in default- (named Z).
I run a clogit initially to see the results and I get reasonable estimates for the parameters of the 3 “defaulted” cases in comparison to the non-default outcome. I use as covariates for the problem the explanatory variables multiplied by the indicator variables for each choice, i.e. a2*X a3*X a4*X for explanatory variable X and for the 3 choices –the a1 corresponds to the base case.

The problem starts when I introduce the nlogit level 1 equation:
a)if I try to use as explanatory covariates the a2*Z a3*Z a4*Z the program stops, as it cannot find any variation for the level 1 situation. Same if I use a dummy nonsense covariate (noth1):

nlogit cho4 (al=aa2X aa3X aa4X) (deftype= aa2Z aa3Z aa4Z) , group(patt) notree
aa2Z is not a characteristic of deftype, model is unidentified.

nlogit cho4 (al=aa2X aa3X aa4X) (deftype=noth1) , group(patt) notree
note: aa2X omitted due to no within-group variance
note: aa3X omitted due to no within-group variance
note: aa4X omitted due to no within-group variance
no independent variables for al model

b) utilizing new covariates crated by multiplying level one choice (deftype) times the explanatory variable Z the program converges with difficulty –huge coefficients- to a solution that is not statistically significant –huge S.E.

Iteration 15:
Coefficient vector:
```
al: al: al: aa2X aa3X aa4X y1 .3295428 .2380546 -.3465402
```deftype:       deftype:       default:         nodef:
deftypeZ  deftypeZ         _cons          _cons
y1      -.0895932      -21841.72        18693.3      -35.58853        .015625h

log likelihood = -248.95039
(not concave)

I am certainly doing something wrong here, but I would appreciate it if you could offer me some guidance. I have read previous questions but cannot decipher my wrongdoing.
(I am using Stata 9.2 SE).

```*