Re: [R] NLME Covariates

About this list Date view Thread view Subject view Author view Attachment view

From: Andrew Perrin (clists@perrin.socsci.unc.edu)
Date: Thu 26 Jun 2003 - 05:49:09 EST


Message-id: <Pine.LNX.4.53.0306251548250.13959@perrin.socsci.unc.edu>

I am foggy on this myself, but I *think* it is inferred from the grouping
structure in the call to (n)lme or in the groupedData data structure. Have
a look at ?groupedData in R for more details.

ap

----------------------------------------------------------------------
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
clists@perrin.socsci.unc.edu * andrew_perrin (at) unc.edu

On Wed, 25 Jun 2003, Harold Doran wrote:

> Dear list
>
> In HLM, one can specify a covariate at one of the "levels". For example, if the data structure are repeated observations nested within students nested within schools, school size might be a covariate that is used at level 3, but not at the other levels. In HLM this is rather easy to do.
>
> However, how can one specify a covariate in R for only one of the levels? I have a sample data set with the structure as described above. I fit the unconditional model in R as
>
> model1<-lme(math~year, random=~year|schoolid/childid, data=datafile)
>
> Now, if I want to enter "female" as a covariate at level 2 only, how might I modify the code to accomplish this?
>
> ------
> Harold C. Doran
> Director of Research and Evaluation
> New American Schools
> 675 N. Washington Street, Suite 220
> Alexandria, Virginia 22314
> 703.647.1628
> <http://www.edperform.net/>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:12:09 EST