-
Notifications
You must be signed in to change notification settings - Fork 16
Description
predictInterval throws this error when there's more than one random effect term. The problem seems to be line 177 in merPredict.R. An example:
I have 23 levels in a grouping factor, names of which are in alllvl:
alllvl = letters[1:23]
My reMatrix looks like:
reMatrix = list(size = structure(c(0.0010590513633398, 0.00130942496234446,
0.00129894979503106, 0.00118412346502953, 0.00116751337164642,
0.00130986225366811, 0.0012815709812561, 0.00122341615092764,
0.0013055710142556, 0.00119962011691454, 0.00117346872472058,
0.00130978072280987, 0.00129631915092133, 0.00130929613187338,
0.00126293324291472, 0.00118125023094927, 0.00129247399987755,
0.00127080564553264, 0.00115105006299901, 0.00113803319542948,
0.00125943975352465, 0.00128281177379072, 0.00130993387574278
), .Dim = c(1L, 1L, 23L)), (Intercept) = structure(c(0.00616517388531857,
0.0728379145733699, 0.0277587954760533, 0.0170618925751313, 0.0228251867556144,
0.0935383181277517, 0.0323877731661849, 0.0156046527666698, 0.0479869499664141,
0.00985455715978766, 0.0117280054681569, 0.0951347183845107,
0.0482523323875463, 0.0648854105503106, 0.0299101857039257, 0.0126892495431074,
0.020004630031733, 0.0183821561488726, 0.00930078032646545, 0.0141397642837315,
0.0145113112521174, 0.0287140193778731, 0.0827959661462078), .Dim = c(1L,
1L, 23L)))
This fails:
dimnames(reMatrix)[[3]] <- alllvl
This works (after modifying the dimnames of the size random effect explicitely)
dimnames(reMatrix$size)[[3]] <- alllvl