discrete time logit and multinomial logit simultaneously

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
abbie1492
Posts: 3
Joined: Wed May 15, 2013 3:23 pm

discrete time logit and multinomial logit simultaneously

Post by abbie1492 »

Hello,
I am looking for some answers regarding runmlwin, I could not find them and hope you can help me. I am just starting to get acquainted with simultaneous equations and am looking for the right software. I am an experienced user of STATA, so I would very much like to use runmlwin. I read the recent post regarding simultaneous equations, which gave me hope but it does not entirely cover what I plan to do.
I want to (simultaneously) calculate a discrete time logistic regression and a multinomial logistic regression. The discrete time model is supposed to capture how a categorical variable impacts on the dependent variable. The multinomial logit calculates the probability of having a certain value on the categorical variable when the observation starts. The multinomial logit does not have a longitudinal structure.
Separately I would write these commands in STATA:
1. xi:logit depvar1 time i.cat123 if sample==1
2. mlogit cat1234 indepvars if sample==1 & time==0
(time counts the years of observing the individual starting with 0, every year of observation is a row in the dataset, depvar1 is 0 in every year without an event, 1 in the year of an event. Individuals leave the sample after an event or when the observation time ends)
Can I do this simultaneously using runmlwin?
I would very much appreciate your help! Many thanks in advance.
Best wishes,
Anja
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: discrete time logit and multinomial logit simultaneously

Post by GeorgeLeckie »

Hi Abbi,

I'm afraid you cannot jointly estimate a binary response model and a multinomial response model in MLwiN.

The nearest you could do would be to fit two binary response models (e.g. a bivariate response probit model). However, to do this you would need to collapse your four category nominal variable into two categories and their may be no sensible way to do this.

I'm guessing that you view the nominal variable as endogenous and so are trying to fit a selection equation. Might another approach be to do a two-stage approach where you fit the mlogit model simulate a new nominal response based on the predicted probabilities then fit the logit model. You would need to do this many times. Just an idea, I am not so familiar with selection equation models.

Best wishes

George
abbie1492
Posts: 3
Joined: Wed May 15, 2013 3:23 pm

Re: discrete time logit and multinomial logit simultaneously

Post by abbie1492 »

Dear George,
thank you very much for your answer! I have to think about your second suggestion (two-stage approach), but I have further questions regarding the first.
It is indeed about identifying an unobserved factor that influences two variables and might therefore lead to a biased result about the relationship between these two variables. The examples I found in the literature use aML, but I was hoping mlwin could also do it.
How would I prepare my data for these specific simultaneous equations? My main problem is that I have difficulties “picturing” the data I would need for two simultaneous equations, when the first is a simple logit (one obervartion/one row per person), while the second is a discrete time logit and has several rows per person.
Would I prepare the variables completely separately? Say, I want to include one independent variable in both models: would I create two variables (one for each model, and the variable for the simple logit has missings in the additional rows of the person)?
I am interested in the correlation of an error term between my two equations. As far as I understand, for the discrete time logit I would need to create a unique identifier for each row (like (time+1)*personid), on level one. How does the correlation work? With a personid on level two?
I hope it is understandable what I am trying to ask!
Your help is highly appreciated! Many thanks in advance.
Best wishes,
Anja
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: discrete time logit and multinomial logit simultaneously

Post by GeorgeLeckie »

Sorry Anja,

Actually I don't think you can fit the model you describe. The problem is that one of your binary responses is defined at level-2 and the other is defined at level-1. You can only fit bivariate binary response models in MLwiN where both binary responses are specified at level-1.

I think your best bet would be to explore aML, realcom and gllamm to see whether these packages can fit the model you wish.

Sorry not to be of more help

Best wishes

George
BramVanhoutte
Posts: 3
Joined: Wed Sep 26, 2012 11:59 am

Re: discrete time logit and multinomial logit simultaneously

Post by BramVanhoutte »

Dear Anja and George,
I just noticed this question as I was thinking about similar problems. So if I understand i right there is no canned procedure in mlwin/runmlwin to run simultaneous equations (such as multilevel Heckman type selection models) ? This would be one way to account for selection in longitudinal models - although it should not be used mechanically.
If it can be of any help, I found a presentation outlining a way to do this using gllamm http://www.stata.com/meeting/2dutch/select.pdf
Other remarks or suggestions are welcome ...

All the best,
Bram
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: discrete time logit and multinomial logit simultaneously

Post by GeorgeLeckie »

Hi Bram,

Thank you for this very helpful post. The slides look very interesting.

The only simultaneous equations you can run are ones which involve continuous and binary responses all defined at the lowest level of analysis (the observation level).

Other software options you may wish to explore for this class of model would be Mplus (you can call Mplus from within Stata using the runmplus command) and the aML software.

Best wishes

George
abbie1492
Posts: 3
Joined: Wed May 15, 2013 3:23 pm

Re: discrete time logit and multinomial logit simultaneously

Post by abbie1492 »

Hello,
I was able to calculate the models I needed in aML, and it worked quite well.
@ George, thank you for your responses, pointed me to the right direction!
@ Bram: I don´t know if it is of any help. A colleague told me about new features of the “cmp“-ado for Stata by David Roodman that were presented at a Stata meeting in Berlin last week. So far I only found an abstact on the Stata homepage: http://www.stata.com/meeting/germany13/ ... s/#roodman
Best wishes and good luck!
Anja
GeorgeLeckie
Site Admin
Posts: 432
Joined: Fri Apr 01, 2011 2:14 pm

Re: discrete time logit and multinomial logit simultaneously

Post by GeorgeLeckie »

Hi Abbie and Bram,

I see that Stata 13 can do a wider range of multilevel and in particular SEM models with discrete responses. It may well be the case that you can specify the models you each describe in the latest version.

George
Post Reply