[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: mle programming problem

From   Maarten buis <>
Subject   Re: st: mle programming problem
Date   Sun, 18 Nov 2007 10:10:18 +0000 (GMT)

--- Jitian Sheu <> wrote:
>         I have encountered some stata programming difficulties which
> I have been struggling for over two weeks. I would be very
> appreciated if someone can help me out. I am working on a project
> that concerns the patient decision at each doctor's appointment. At
> each appointment, based on his personal assessment, the patient can
> decide whether to leave the program. My model is similar to the
> simple logit model except that the patient may see doctors many
> visits in one treatment episode. Because I hope to incorporate
> more features in the future, my plan is to write a program that
> accounts the panel feature of my data, that is, the panel structure
> of logit model. 

This looks to me like a model that has been re-invented and re-named in
many disciplines: I like the term sequential logit model, but I have
also seen it called: a sequential response model (Maddala, 1983),
continuation ratio logit (Agresti, 2002), model for nested dichotomies
(Fox, 1997), and the Mare model (Mare 1980). To make things more
confusing somtimes these terms are also used for other models. 

Anyhow, the nice feature of this model is that if you write down the
likelihood and do some smart rearanging you'll see that you can
estimate it as a series of separate logit models, one for each visit to
the doctor, and you do not need to do any additional corrections
afterwards. There is a very clear explanation of that property in (Fox,

I implemented this model as the -seqlogit- command downloadable from
ssc. I primarily wrote that command, so I was able to write some
post-estimation commands.

Looking at your program the following line looks decidedly dodgy to me:
quietly replace `lnfjt' = -1000000 if `lnfjt'==.

Hope this helps,

Agresti, Alan. 2002. Categorical Data Analysis. 2nd ed. Hoboken, NJ:

Fox, John. 1997. Applied Regression Analysis, Linear Models, and
Related Methods. Thousand Oaks: Sage.

Maddala, G.S. 1983. Limited Dependent and Qualitative Variables in
Econometrics. Cambridge: Cambridge University Press.

Mare, Robert D. 1980. “Social Background and School Continuation
Decisions.” Journal of the American Statistical Association

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Want ideas for reducing your carbon footprint? Visit Yahoo! For Good
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index