[R-sig-ME] glmmADMB: "Error in Z * sweep"

Stratford, Jeffrey jeffrey.stratford at wilkes.edu
Thu Dec 11 22:13:00 CET 2014


Hi everyone,

I have a design with a negative binomial distribution (possibly ZINB),
repeated measures (TRIAL), and clusters (three samples of different
treatments together) and many clusters.

The experiment is this: they put 200 sunflower seeds in a tray and counted
the seeds remaining after a week and this is the giving up density (GUD).
Three trays (=TYPE, either near a log, a random location, or near a seed
cache) were set out at 16 SITEs and) and this was repeated 5 or 6 times
(=TRIALS). Not my design but I was asked the analyze the data. Data are
below.

The central question is how TYPE affects GUDs and if this changes over
TRIALS.

I tried two different models (below) but I couldn't get either to work. I
would greatly appreciate any insight on how to get this to run.

Thanks,

Jeff

R 3.1.2 in Windows


# just seeing if I could get any results

>  temp <- glmmadmb(gud2~type2 + (1|trial2), data=gud, family="nbinom")

# and the result:

Error in Z * sweep(allU, 2, sdvals, "*") : non-conformable arrays
In addition: Warning message:
In glmmadmb(gud2 ~ type2 + (1 | trial2), data = gud, family = "nbinom") :
  NAs removed in constructing fixed-effect model frame: you should probably
remove them manually, e.g. with na.omit()

# attempting to include site effect... not sure if this is correct though

>  temp <- glmmadmb(gud2~type2 + (site|trial2), data=gud, family="nbinom")

Parameters were estimated, but not standard errors were not: the most
likely problem is that the curvature at MLE was zero or negative
Error in glmmadmb(gud2 ~ type2 + (site | trial2), data = gud, family =
"nbinom") :
  The function maximizer failed (couldn't find STD file) Troubleshooting
steps include (1) run with 'save.dir' set and inspect output files; (2)
change run parameters: see '?admbControl'
In addition: Warning messages:
1: In glmmadmb(gud2 ~ type2 + (site | trial2), data = gud, family =
"nbinom") :
  NAs removed in constructing fixed-effect model frame: you should probably
remove them manually, e.g. with na.omit()
2: running command 'C:\Windows\system32\cmd.exe /c "C:/Program
Files/R/R-3.1.2/library/glmmADMB/bin/windows32/glmmadmb.exe" -maxfn 500
-maxph 5 -noinit -shess' had status 1



The data:

structure(c(7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,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,
13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 1, 1, 1, 2, 2, 2,
3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9,
10, 10, 10, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 17,
17, 17, 19, 19, 19, 1, 1, 1, 2, 2, 2, 4, 4, 4, 5, 5, 5, 6, 6,
6, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 13, 13, 13, 14,
14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19,
19, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 9,
9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14,
14, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 2, 2, 2,
3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9,
10, 10, 10, 11, 11, 11, 13, 13, 13, 15, 15, 15, 16, 16, 16, 17,
17, 17, 18, 18, 18, 19, 19, 19, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4,
4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 10, 10, 10, 12, 12,
12, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18,
19, 19, 19, 3, 3, 3, 4, 4, 4, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9,
9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14,
15, 15, 15, 16, 16, 16, 18, 18, 18, 19, 19, 19, 17, 17, 3, 2,
1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2,
1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3,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3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2,
1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2,
1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2,
1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2,
1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2,
1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 2, 1, 124, 72, 32, 112, 98, 138,
95, 153, 80, 163, 154, 78, 136, 92, 179, 113, 77, 96, 120, 170,
81, 10, 106, 149, 83, 88, 71, 97, 110, 140, 59, 76, 48, 98, 153,
58, 178, 137, 129, 146, 101, 158, 16, 180, 20, 122, 183, 184,
177, 169, 122, 61, 154, 0, 118, 178, 118, 191, 185, 170, 53,
165, 164, 113, 147, 163, 141, 124, 138, 156, 186, 154, 57, 0,
136, 50, 152, 119, 173, 191, 193, 10, 183, 140, 74, 124, 99,
182, 191, 183, 161, 189, 111, 174, 165, 40, 40, 171, 171, 82,
179, 182, 185, 194, 193, 91, 161, 68, 92, 163, 179, 24, 60, 101,
35, 154, 155, 21, 130, 44, 151, 194, 193, 6, 118, 178, 176, 171,
190, 176, 169, 196, 187, 176, 183, 7, 162, 49, 158, 99, 32, 177,
193, 178, 88, 113, 178, 53, 159, 163, 124, 164, 116, 131, 171,
14, 92, 180, 133, 9, 146, 93, 152, 117, 197, 147, 188, 137, 130,
192, 170, 52, 197, 150, 191, 184, 186, 127, 196, 146, 165, 163,
164, 176, 169, 160, 147, 164, 175, 132, 184, 171, 191, 181, 164,
83, 166, 173, 189, 196, 194, 184, 139, 167, 193, 191, 176, 147,
184, 124, 0, 48, 4, 42, 79, 46, 7, 0, 56, 5, 15, 15, 0, 40, 1,
24, 30, 23, 75, 134, 66, 15, 35, 0, 29, 26, 5, 10, 5, 37, 8,
5, 12, 41, 34, 40, 11, 8, 0, 67, 7, 6, 50, 86, 17, 0, 5, 0, 1,
6, 7, 21, 0, 69, 21, 13, 3, 75, 126, 2, 0, 85, 27, 63, 42, 8,
0, 33, 16, 3, 33, 0, 0, 46, 3, 88, 64, 3, 15, 6, 29, 0, 20, 4,
25, 11, 4, 22, 76, 4, 22, 1, 7, 3, 26, 5, 10, 22, 0, 9, 0, 32,
2, 9, 1, 1, 36, 24, 18, 27, 17, 23, 22, 1, 0, 0, 2, 4, 2, 10,
13, 13, 18, 7, 0, 22, 8, 15, 17, 2, 23, 22, 7, 45, 4, 5, 31,
16, 0, 10, 6, 0, 2, 0, 5, 7, 40, 3, 30, 2, 4, 3, 2, 1, 63, 31,
4, 0, 2, 7, 11, 3, 0, 11, 8, 7, 10, 0, 10, 50, 6, 1, 137, 6,
2, 21, 24, 1, 0, 1, 1, 3, 2, 4, 95, 1, 3, 7, 6, 0, 4, 4, 121,
136, 3, 3, 137, 117, 95, 8, 22, 125, 97, 48, 2, 5, 27, 7, 42,
5, 69, 45, 30, 0, 66, 117, 2, 0, 9, 4, 30, 0, 31, 107, 21, 0,
4, 33, 3, 4, 0, 51, 182, 13, 0, 6, 0, 1, 2, 0, 104, 52, 37, 21,
136, 86, 42, 5, 122, 156, 93, 67, 7, 144, 136, 69, 169, 55, 6,
0, 3, 6, 27, 1, 1, 61, 109, 18, 29, 165, 66, 179, 8, 67, 30,
26, 22, 134, 10, 7, 40, 0, 0, 1, 2, 185, 121), .Dim = c(497L,
4L), .Dimnames = list(NULL, c("trial2", "site2", "type2", "gud2"
)))



-- 
********************************************************
Jeffrey A. Stratford, PhD
Department of Biology and Health Sciences
Wilkes University, PA 18766 USA
570-332-2942
http://web.wilkes.edu/jeffrey.stratford/
********************************************************

	[[alternative HTML version deleted]]



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