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

Re: st: Gllamm, random effects and splines


From   Stas Kolenikov <skolenik@email.unc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Gllamm, random effects and splines
Date   Wed, 25 Aug 2004 13:40:08 -0400 (EDT)

> My question:
>
> In the absence of the ability to model the "day" correlation structure (for
> example AR1) with the current version of gllamm (correct me if I am wrong
> here), is it possible to model the (random) slopes using, say, a spline and
> if so, what would be the appropriate code (to enable each patient to have
> their own (random) "slope" ("spline")).

I am not quite sure your question is well posed. Splines model the trend,
or the average, or whatever function of that average is implied by the
link function in your generalized linear model. Random effects model the
individual variations.

The model you specified postulates that the effect is linear in time, and
those effects may differ across individuals. If you want, you can have a
more complicated structure, say quadratic over time. With 7 observations
per patient, you won't be able to go anywhere beyond that. And with 36
effective observations, estimating anything by maximum likelihood is a
heroic effort per se; I would personally doubt whether you have enough
variation to even estimate the linear trend reasonably well, unless your
patient show a real quick recovery (I know nothing about insult treatment,
I'd have to admit :)). If you want to introduce the quadratic term, you
would have to create day^2 variable and add another -eq- statement
corresponding to it. See whether the variance of that term is
significantly different from zero, and keep in mind it has a non-standard
distribution. Stata used to have a help file describing it with a
reference to the variance components testing in -xtreg-, but I was not
able to find it anywhere.

 ---                                    Stas Kolenikov
 --       Ph.D. student in Statistics at UNC-Chapel Hill
 - http://www.komkon.org/~tacik/  -- Stas.Kolenikov@unc.edu

* This e-mail and all attachments to it are not intended to provide any
* reasonable point of view and was transmitted to you in error. It
* should be immediately deleted by all recipients unless they really
* enjoy communicating with the author :). Other restrictions apply.

*
*   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