Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re:multilevel model and gllamm


From   Jeffrey Simons <jsimons@usd.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re:multilevel model and gllamm
Date   Wed, 22 Sep 2004 07:16:00 -0500

> 
> Date: Tue, 21 Sep 2004 10:46:38 -0400
> From: Stas Kolenikov <skolenik@gmail.com>
> Subject: Re: st: Multilevel analysis and GLLAMM
> 
>> 4. If using the gamma family with the canonical link function. Is
>> interpretation of the signs of the slope coefficients opposite to the
>> direction of the relationship. That is, given it is a reciprocal link, does
>> a negative coefficient actually signify a positive relationship between the
>> variables? Is it reasonable to use an identity link instead?
> 
> The canonical links should be giving more efficient estiamates, and
> also guarantee that you don't get outside of the natural range of your
> responses, so you are statitically better off sticking to them. You
> are right with the interpretation.

Excellent, thank you
> 
>> 5. Finally, being new to this type of analysis, I was wondering if anyone
>> could comment on the relative strengths and weaknesses of using GLLAMM
>> versus a program such as HLM.
> 
> HLM (or M-plus) are more specific, and thus faster. With -gllamm-, you
> can use all Stata tricks for data management, testing, etc.


Thank you.

> 
>> Here is an example of my commands, varx  and vary are the repeated measures
>> the remaining variables are level 2 predictors:
>> 
>> Gen cons=1
>> Eq cons: cons
>> Eq slope: varx
>> 
>> gllamm vary varx varz varw ,i(id) family(gamma) nrf(2) eqs(cons slope)
>> adapt
> 
> I would tend to think that -gllamm- would take it that -vary- depends
> on -varx varz varw-, as it only takes one dependent variable. You
> would need to take your data to the long form by -reshape-, and then
> code individual variables by dummies. Then your -s()- option would
> give the name of those dummies so that you can have different
> variances for different measures. See Section 4.1 of the manual for
> similar treatment.
> 
> This also explains your -1 correlations: you have -varx- both as an
> explanatory variable for -vary-, and as a slope for random
> coeffcients. That's kind of weird for -gllamm-.


This is confusing to me. My data are in long form. My command seems to be in
the same form as that given in the help file:

  . eq idc: cons
       . eq idt: time
       . gllamm resp time, link(logit) fam(binom) denom(five) /*
          */ i(id) nrf(2) eqs(idc idt) ip(g) nip(6) trace


In this I thought the variable time (like my varx) was supposed to predict
resp and it was expected to be a random slope. My varx doesn't include time
per se but rather levels of another variable measured at successive
measurement occasions. To be more specific, my response variable (vary) is
number of drinks in the past 30 minutes, my varx is a time lagged level of
negative affect measure. These are repeated measures (e.g., 50-100
measurement occasions over a couple weeks). Then varz is gender and varw a
trait measure and these would be level 2 predictors.

So, what I wanted to examine is whether affect at t-1 is associated with
with drinking rates at t1 and whether this association varied across
individual, which I thought would be seen in the random slope and then
examined by looking at interactions between the level1 and level 2
predictors.

My data are set up in long form with each row being a single measurement
occasion.


Thoughts?



Jeffrey simons


> ------------------------------
> 
> Date: Tue, 21 Sep 2004 10:13:48 -0500
> From: Fred Wolfe <fwolfe@arthritis-research.org>
> Subject: Re: st: Multilevel analysis and GLLAMM
> 
>> 
>> HLM (or M-plus) are more specific, and thus faster. With -gllamm-, you
>> can use all Stata tricks for data management, testing, etc.
> 
> 
> HLM Version 6 which is supposed to be released this month will import Stata
> files.

Thanks for the information.


> 
> 
> 
> Fred Wolfe
> National Data Bank for Rheumatic Diseases
> Wichita, Kansas
> Tel (316) 263-2125     Fax (316) 263-0761
> fwolfe@arthritis-research.org
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 
> ------------------------------

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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