Statalist


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

Re: st: SV: some problems with gllamm


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: SV: some problems with gllamm
Date   Wed, 28 Jan 2009 08:27:53 -0600

Mads Meier Jæger has already answered most questions, I'd just like to
add that it is up to you as to where you want your contextual effects
to enter. Economists are putting everything into level 1 equation,
people in education research try to put as much as they can into level
2 equations, producing random slopes model. You would need to specify
something like

g byte one = 1
g mm = meanistr * male
eq context : one meanistr
eq context_m : male mm
gllamm ... , ... eq(context context_m) nocons nrf(2)

With this multilevel specification, you need to make sure you don't
model the components of that context equation twice (thus nocons
option, and you would also need to take meanistr from the list of
dependent variables in the main equation). You would also need to
think which variables should take random slopes -- here, I am putting
those to the male variable, just to indicate how that can be done; it
does not need to be the model you would consider reasonable from the
substantive perspective.

You might be able to achieve everything you need using -xtmelogit- in
Stata 10. It has more easily understandable syntax:

xtmelogit hpoor [varlist] || reg

or

xtmelogit hpoor [varlist] || reg: male

should give you the same results, and often it will arrive at them
faster than -gllamm-.

> I am trying to estimate a multilevel logit with this variables:
> Dep var: hpoor  (health conditions; 1 if bad)
> Indep var: income quintiles (4 quintiles, highest quintile is the
> reference category), age, age2, sex and finally a contextual variable
> (named meanistr) measured at regional level (the id is reg) . My
> purpose is to see if the socio-economic context has an influence on
> the dep var. So I estimate the following, using gllamm command:
>
>
> glamm hpoor quintpos1 quintpos2 quintpos3 quintpos4 age agesq age3
> male meanistr, link (logit) fam (binom) nocons i (reg)
>
> and I got the following:
>
> number of level 1 units = 39777
> number of level 2 units = 21
>
> Condition Number = 1309484.3
>
> gllamm model
>
> log likelihood = -20815.479
>
> ------------------------------------------------------------------------------
>      hpoor |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
> -------------+----------------------------------------------------------------
>  quintpos1 |   .5610976   .0410717    13.66   0.000     .4805985    .6415968
>  quintpos2 |   .4684868    .039587    11.83   0.000     .3908977    .5460759
>  quintpos3 |   .4766715    .038078    12.52   0.000       .40204     .551303
>  quintpos4 |   .2694107   .0372995     7.22   0.000      .196305    .3425163
>        age |   .1018888   .0121446     8.39   0.000     .0780858    .1256917
>      agesq |   -.000771   .0002509    -3.07   0.002    -.0012627   -.0002792
>       age3 |   6.21e-06   1.69e-06     3.67   0.000     2.90e-06    9.52e-06
>       male |  -.0921198    .025821    -3.57   0.000     -.142728   -.0415115
>   meanistr |  -1.977139     .08596   -23.00   0.000    -2.145617    -1.80866
> ------------------------------------------------------------------------------
>
>
> Variances and covariances of random effects
> ------------------------------------------------------------------------------
>
>
> ***level 2 (reg)
>
>   var(1): .02703922 (.00502425)
> ------------------------------------------------------------------------------
>
>
>
> My questions are:
> 1) is right gllamm command for my research purpose (asses the context
> role)? or is it better an xtlogit?
> 2) why I get just 2-level variance? In this way I am not able to
> mesaure the percentage of total variance explained by 2-level variance
> (that is the role of context)
> 3) If I use already a variable mesaured at regional level to asses the
> role of context, Would I need to use a multi-level model or I could
> just use a cluster option to take off the correlation intra-region?
>
> I appreciate any hint.
>
> Many thanks in advance
>
> Vincenzo
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>


-- 
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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