I am still fairly new to R and have a fairly rudimentary question.  I am
trying to name a vector of coefficients retrieved from a multilevel model
using the coef function.  I guess the default name is "Intercept" and I
cannot figure out how to rename it.  

 

I have tried the using the code below to name the column of coefficients
ind.y derived from an lme model.  Unfortunately, the name ind.y is not
applied to the column.  What can I do to name the column?

 

toy<-data.frame(ID=c(1,1,1,2,2,2,3,3,3,4,4,4), x=rnorm(12), y=rnorm(12))

> model.toy<-lme(y~1, random=~1|ID, data=toy)

> coef.y<-("ind.y"=coef(model.toy))

> coef.y

  (Intercept)

1  0.52065015

2  0.04066776

3  0.29793571

4  0.11213693

 

Thanks,

 

Eric McKibben

Doctoral Candidate 

I-O Psychology

Clemson University


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to