Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: Multilevel multinomial logit model using gllamm


From   Munkhzul Zookhuu <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Re: Multilevel multinomial logit model using gllamm
Date   Sat, 18 Jan 2014 21:14:03 +0100

Dear Experts,

I am running a multilevel multinomial logit model for a big dataset
using gllamm. Below is my syntax. I wanted to include 2 random
effects, one for women (id) and one for PSUs (hh1). However, even
though I first tried with only the random effect for women it gets
stuck after producing the coefficients with 13-14 iterations. How
should I make it to produce the variance estimation for the random
effect(s) as well? Could you please suggest me what could be the
problem? I have tried with very few factors, but it is still the same.
My dependent variable is dv1long with 3 categories (Yes-1, No-2, Don't
know-8). However, because it is multinomial and I would need random
effects for each of non-reference category, I have extended the data,
then now the dependent variable is alt. I hope I have done the
extension correctly. I have followed the instructions in GLLAMM
Manual. Because I am new to Statalist, I am not sure if I could attach
my data in the post or now. If necessary, could you please let me
know, so that I can send my data as well.

With many thanks and hope to hear soon.

**************************BEGINNING*****************************
use "D:\zzzzzzzzzzzzzzzzzzzzz\wmlong.dta", clear

replace religion=.m if religion==9
replace ethnicit=.m if ethnicit==9
replace ls10=.m if ls10==9

gen cons=1
collapse (count) pwt1=cons, by(hh1 id area region religion ethnicit
windex5 wb3 cm1 welevel wage mstatus ceb ls10 wmweight psuweigh
dv1long)

sort hh1 id area region religion ethnicit windex5 wb3 cm1 welevel wage
mstatus ceb dv1long
gen patt=_n

expand 3
sort patt
qui by patt: gen alt=_n
gen chosen=alt==dv1long

tab alt, gen(awm)
eq awm1: awm1
eq awm3: awm3

xi: gllamm alt i.area i.region i.religion i.windex5 ///
    i.wb3 i.cm1 i.welevel i.ls10, ///
    base(2) expand(patt chosen m) i(id) lin(mlogit) family(binom) ///
    nrf(2) eqs(awm1 awm3) nip(12) weight(pwt) trace
*******************************END*******************************************
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index