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

From |
Stas Kolenikov <skolenik@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Re:multilevel model and gllamm |

Date |
Wed, 22 Sep 2004 09:08:09 -0400 |

I see now. I first understood that both varx and vary are the measurement variables. Then your setup looks correct. There should also be a way of making varz and varw regressors for the latent variable, but whether you want to do that or not depends on your interpretation on whether they affect the random coeffcients, or directly the outcome. Then also the unit correlations would indicate that you are making up a model that is too complicated. All higher constants require lower slopes means that all of your lines, i.e. the curves across all individuals, are passing through the same point in varx / vary plane. Does this seem plausible to you? Does it make sense in terms of your problem? This is also where the model would become computationally truciky and unstable, I suppose: the likelihood is going to be flat in some directions, and the maximizer will stumble over it. Also, Stata's -ml- does not like problems on the boundary when it cannot step further than 1 for correlation coefficients. Did you receive any lack of convergence diagnostic messages along with unit correlations? Stas On Wed, 22 Sep 2004 07:16:00 -0500, Jeffrey Simons <jsimons@usd.edu> wrote: > >> 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/ > -- Stas Kolenikov http://stas.kolenikov.name * * 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/

**References**:**st: Re:multilevel model and gllamm***From:*Jeffrey Simons <jsimons@usd.edu>

- Prev by Date:
**Re: st: nested models in svylogit** - Next by Date:
**st: St: Programming question, local macros** - Previous by thread:
**st: Re:multilevel model and gllamm** - Next by thread:
**st: St: Programming question, local macros** - Index(es):

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