[R] Problem fitting network meta-analysis using lme
David Scott
d.scott at auckland.ac.nz
Tue Aug 18 12:39:05 CEST 2009
I am trying to use the network meta-analysis approach of Thomas Lumley,
described in his paper in Statistics in Medicine, 2002.
My problem is fairly simple as network meta analyses go, I have two
groups of trials, ones comparing A and B, and ones comparing A and C,
and I am interested in comparing B and C
Thomas gives the code snippet to fit the model:
netmeta <- lme(effect ~ trt.B + trt.C + trt.D + trt.E,
random = ~1|trtpair,
var = varConstPower(form = ~sigma,
fixed = list(power = 1)))
This is when there are 5 different treatments being considered. This
appears to be for an earlier version of lme, because currently there is
no var argument to lme.
I am using R 2.8.1 on windows vista and nlme 3.1-92. I have the latest
nlme but could upgrade my R I guess.
I used the command
compNetMeta <- lme(effect ~ trtB + trtC, data = comp,
random = ~1 | trtpair,
weights = varConstPower(form = ~sigma,
fixed = list(power = 1)))
where the first two lines of the dataframe comp look like this:
> head(comp,2)
studlab event.e n.e event.c n.c group effect sigma
1 Conway 5 29 9 28 Doppler -0.622878 0.4908300
2 Noblett 3 51 12 52 Doppler -1.366876 0.6146772
trtA trtB trtC trtpair
1 -1 1 0 A.B
2 -1 1 0 A.B
The output is the error message:
Error in MEEM(object, conLin, control$niterEM) :
Singularity in backsolve at level 0, block 1
I would be grateful for any advice on what is going wrong here. I think
I have the correct command with the var argument now being weights, but
that is an area of uncertainty for me. To make the problem reproducible,
the data is given below.
David Scott
> dput(comp)
structure(list(studlab = structure(c(2L, 7L, 3L, 8L, 1L, 5L,
4L, 6L), .Label = c("Brandstrup", "Conway", "Gan", "Kabon", "Lobo",
"Nisanevich", "Noblett", "Wakeling"), class = "factor"), event.e = c(5,
3, 14, 24, 21, 1, 32, 13), n.e = c(29, 51, 50, 64, 69, 10, 129,
77), event.c = c(9, 12, 36, 38, 40, 7, 31, 23), n.c = c(28, 52,
50, 64, 72, 10, 124, 75), group = structure(c(1L, 1L, 1L, 1L,
2L, 2L, 2L, 2L), .Label = c("Doppler", "Restricted"), class = "factor"),
effect = c(-0.622877984713389, -1.36687627526279, -0.944461608840851,
-0.45953232937844, -0.601797401971717, -1.94591014905531,
-0.00778214044205496, -0.596862166784986), sigma =
c(0.490829977462803,
0.614677195199759, 0.243323548400785, 0.191657131723166,
0.210326900578529, 0.971008312455225, 0.218384089169977,
0.306726248424056), trtA = c(-1, -1, -1, -1, -1, -1, -1,
-1), trtB = c(1, 1, 1, 1, 0, 0, 0, 0), trtC = c(0, 0, 0,
0, 1, 1, 1, 1), trtpair = structure(c(1L, 1L, 1L, 1L, 2L,
2L, 2L, 2L), .Label = c("A.B", "A.C"), class = "factor")), .Names =
c("studlab",
"event.e", "n.e", "event.c", "n.c", "group", "effect", "sigma",
"trtA", "trtB", "trtC", "trtpair"), row.names = c(NA, -8L), class =
"data.frame")
_________________________________________________________________
David Scott Department of Statistics
The University of Auckland, PB 92019
Auckland 1142, NEW ZEALAND
Phone: +64 9 923 5055, or +64 9 373 7599 ext 85055
Email: d.scott at auckland.ac.nz, Fax: +64 9 373 7018
Director of Consulting, Department of Statistics
More information about the R-help
mailing list