Skip to content

Fixed variance structure for lme

2 messages · joanne ellis, Viechtbauer Wolfgang (STAT)

#
I have a data set with 50 different x values and 5 values for the sampling
variance; each of the 5 sampling variances  corresponds to 10 particular x
values. I am trying to fit a mixed effect linear model and I'm not sure
about the syntax for specifying the fixed variance structure. In Pinheiro's
book my situation appears to be similar to the example used for varIdent,
where there is a fixed value for variance for females, and a a different
fixed variance for males. The following syntax is used: varIdent(form~1|sex,
fixed=c(Female=.5)) or something to that effect. So for the 'fixed' part of
the argument, I need to specify that certain x'values have variance a,
certain ones have variance b, and so on. 
I assume that the formula argument in my case is written ~1|x which tells
the function that the variance is fixed and depends on the x-values.  Any
ideas for how to specify  different fixed variances for certain x-values?

Thanks
Joanne Ellis
#
If the sampling variances are known up to a proportionality constant, then you can use:

weights = varFixed(~ vi)

where vi is the vector of the 50 sampling variances (corresponding to the 50 values of the dependent variable). You may have to create the vi vector by repeating the 5 sampling variances ten times each (so you get that vector of 50 values).

Note again that this variance function structure does not give you a model with known sampling variances, but a model where the sampling variances are known up to a proportionality constant. The actual sampling variances will be:

vi*sigma^2

where sigma^2 is the residual variance (which will be estimated based on the data at hand).

Best,

--
Wolfgang Viechtbauer                        http://www.wvbauer.com/
Department of Methodology and Statistics    Tel: +31 (43) 388-2277
School for Public Health and Primary Care   Office Location:
Maastricht University, P.O. Box 616         Room B2.01 (second floor)
6200 MD Maastricht, The Netherlands         Debyeplein 1 (Randwyck)


----Original Message----
From: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org] On Behalf Of joanne ellis Sent:
Tuesday, October 05, 2010 01:51 To: r-help at r-project.org
Subject: [R] Fixed variance structure for lme