[R] Penalized Splines as BLUPs using lmer?

Joran Elias joran.elias at umontana.edu
Fri Apr 14 01:03:19 CEST 2006


I've been wondering the same thing (how to specify "restricted"  
covariance structures with lmer()), and this response seemed a little  
opaque to me, so I was wondering if anyone could clarify.

1.) Is there currently any documentation for lmer() that explains how  
the model formula in lmer() specifies the cov structure of the random  
effects, as inquired about below?  Am I correct in thinking that

lmer(response ~ time +(time|id),data)

would result in assuming an unconstrained cov matrix for the random  
effects?

2.) When lmer() is finished (thank you, by the way!), will we be able  
to specify the cov structure of the random effects similarly to what  
was done in lme(), i.e. using pdMat objects and so forth?

Thanks!

joran

On Apr 13, 2006, at 3:34 PM, Doran, Harold wrote:

> I think you want the random effects to be independent. If so then  
> you need
>
> lmer(response ~ time +(time|id) + (time-1|id), data)
>
> Harold
>
>
>
> -----Original Message-----
> From:	r-help-bounces at stat.math.ethz.ch on behalf of Matthias   
> Kormaksson
> Sent:	Thu 4/13/2006 4:04 PM
> To:	r-help at stat.math.ethz.ch
> Cc:	
> Subject:	[R] Penalized Splines as BLUPs using lmer?
>
> Dear R-list,
>
> I´m trying to use the lmer of the lme4 package to fit a linear  
> mixed model
> of the form
>
> Y = Xb + Zu + e
>
> and I can´t figure out how to control the covariance structure of  
> u. I want
> u ~ N(0,sigma^2*I).
>
> More precisely I´m trying to smooth a curve through data using the
> "Penalized Splines as BLUPs" method as described in Ruppert, Wand &
> Carroll (2003).
>
> So I have Z = [Z1 Z2 ... Z11] where Z1,...,Z11 is a linear spline  
> basis and
> X = [1 t] where t is time column in my case.
>
> I have tried various things and read a lot of the online literature  
> but I
> can´t seem to find anything useful. I know the old way of fitting this
> using lme is:
>
> fit <- lme(y~-1+X,random=pdIdent(~-1+Z))
>
> and then extracting the u vector with
>
> u.hat <- unlist(fit$coef$random)
>
> Is there anyone who could possibly help me and provide me with a code
> using the lmer? Is it possible to fit this using lmer without  
> specifying
> the Z and the X matrix and instead just use the columns t and Z1,  
> Z2, ...,
> Z11?
>
> Thanks in advance,
> Matthias
>
>
> ************************
> Matthias Kormaksson,
> Ph.D Student,
> Department of Statistics,
> Cornell University
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting- 
> guide.html
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting- 
> guide.html




More information about the R-help mailing list