Skip to content

help im lme()

2 messages · Bernardo Rangel Tura, Dimitris Rizopoulos

#
Hi R people!

I have a doubt in lme().
I use this model:

m2.lme<-lme(log(cmort)~idade+ano,random=~idade|ano,data=dados)

If i use summary I recive this output:

 > summary(m2.lme)
Linear mixed-effects model fit by REML
  Data: dados
        AIC      BIC    logLik
   1139.313 1170.554 -562.6563

Random effects:
  Formula: ~idade | ano
  Structure: General positive-definite, Log-Cholesky parametrization
             StdDev       Corr
(Intercept) 3.131076e-03 (Intr)
idade       3.515018e-05 -0.042
Residual    5.687940e-01

...etc...

I know the value of Residula random effects is m2.lme$sigma but how do I 
find the value of idade or intercept random effects


Thanks in advance

Bernardo Rangel Tura, MD, MSc
National Institute of Cardiology Laranjeiras
Rio de Janeiro Brazil
#
you can get the estimated covariance matrix of the random-effects 
using:

library(nlme)
m <- lme(Orthodont)

# scaled by the residuals variance
pdMatrix(m$modelStruct$reStruct)

# raw
lapply(pdMatrix(m$modelStruct$reStruct), "*", m$sigma^2)


However, it seems that in your model you use as a fixed-effect your 
grouping factor "ano", which is not in the spirit of mixed-models.


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
     http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Bernardo Rangel Tura" <tura at centroin.com.br>
To: <r-help at stat.math.ethz.ch>
Sent: Thursday, March 31, 2005 11:21 AM
Subject: [R] help im lme()