[R-sig-ME] gls or lme with unstructured covariance martrix

Freedom Gumedze Freedom.Gumedze at uct.ac.za
Sat Sep 29 11:00:04 CEST 2012


Dear R mixed modellers
 
I am trying to fit a gls or mixed model to meta analysis data,
specifically summary survival curve data. 
The response variable consists of survival proportions for each trial
at different time points (with associated standard errors).
Since the variances are known I fit the following model using gls:
 
> y1=prop/100
> varest=(se/100)^2
> library(nlme)
> mod <- gls(y1~1,weights=varFixed(~varest))
> summary(mod)
Generalized least squares fit by REML
  Model: y1 ~ 1 
  Data: NULL 
       AIC     BIC    logLik
  118.5856 124.336 -57.29279
 
Variance function:
 Structure: fixed weights
 Formula: ~varest 
 
Coefficients:
                Value  Std.Error  t-value p-value
(Intercept) 0.3839122 0.02509093 15.30083       0
 
Standardized residuals:
       Min         Q1        Med         Q3        Max 
-2.5493065 -0.5069545 -0.0253402  0.5264015  3.4182227 
 
Residual standard error: 6.050427 
Degrees of freedom: 132 total; 131 residual
> 
The problems with above model are
 
(i) It assumes the errors are uncorrelated, the covariance matrix for
the errors V is diagonal with variances for each proportion on the
diagonals. How can I allows the errors to be correlated?
(ii) The proportions from the same trial are independent. 
 
Pinheiro and Bates (in their book) suggest that one can account for
both heteroscedasticity in the  errors and correlation between trial
measurements. However, the heteroscedasticity of the errors assume
independence.
 
I tried the following model but is it correct?
 
study=as.factor(trial)
mod2 <-
gls(y1~1,correlation=corSymm(form=~1|study),weights=varFixed(~varest))
 
I would also welcome advice on fitting this model as a linear mixed
model but assuming the errors known but correlated.
 
kind regards,
Freeedom




###

UNIVERSITY OF CAPE TOWN 

This e-mail is subject to the UCT ICT policies and e-mail disclaimer
published on our website at
http://www.uct.ac.za/about/policies/emaildisclaimer/ or obtainable from
+27 21 650 9111. This e-mail is intended only for the person(s) to whom
it is addressed. If the e-mail has reached you in error, please notify
the author. If you are not the intended recipient of the e-mail you may
not use, disclose, copy, redirect or print the content. If this e-mail
is not related to the business of UCT it is sent by the sender in the
sender's individual capacity.

###
 


More information about the R-sig-mixed-models mailing list