[R-sig-ME] MCMCglmm 'undefined columns' error

Greg Lee greg.lee at utas.edu.au
Mon May 11 07:00:59 CEST 2009


Dear List,

I am attempting to fit a GLMM using MCMCglmm(), but receive and
'undefined columns' error.

The data are counts of bunches of grapes at bud positions (1:10) on
canes (basal/distal) within vines within (vine type) clones within
(vineyard) sites. Two treatments relating to degree of pruning have
been imposed, and there are 5 replicates at each level combination.
The data are as follows:

> head(budfruit)

  site clone treat vine cane bud count
1    M  2051     1    1    b   1     1
2    M  2051     1    2    b   1     2
3    M  2051     1    3    b   1     1
4    M  2051     1    4    b   1     2
5    M  2051     1    5    b   1     1
6    M  2051     2    1    b   1     2
...

with counts taking values 0,1,2 or (very rarely) 3.

Applying a Poisson-based GLM, such as:

glm(count ~ treat + cane + bud, family = poisson, data = budfruit)

suggests serious under-dispersion (Residual deviance: 370.09 on 1184
degrees of freedom), from which I concluded that a multinomial-based
mixed model might be a better option. However, my initial attempt
using MCMCglmm

fit <- MCMCglmm(count ~ site + clone + treat + cane + bud,
                random =~ vine, family = 'multinomial4',
                data = budfruit, verbose = TRUE)

produces the error:

Error in `[.data.frame`(data, , match(response.names[0:nJ + nt],
names(data))) :
  undefined columns selected

Is there a problem with my understanding of the call to MCMCglmm(), or
is this perhaps a bug?

Any insight appreciated. Are there perhaps other packages within which
I could fit this model?

Regards,
Greg

> sessionInfo()

R version 2.9.0 (2009-04-17)
i386-pc-mingw32

locale:
LC_COLLATE=English_Australia.1252;LC_CTYPE=English_Australia.1252;LC_MONETARY=English_Australia.1252;LC_NUMERIC=C;LC_TIME=English_Australia.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
 [1] MCMCglmm_1.09      gtools_2.5.0-1     combinat_0.0-6     orthopolynom_1.0-1
 [5] polynom_1.3-5      pscl_1.03          mvtnorm_0.9-5      ape_2.3
 [9] coda_0.13-4        Matrix_0.999375-26 lattice_0.17-22    tensorA_0.31
[13] corpcor_1.5.2      MASS_7.2-46

loaded via a namespace (and not attached):
[1] gee_4.13-13 grid_2.9.0  nlme_3.1-91


--------------
Greg Lee
Biometrician
Tasmanian Institute of Agricultural Research
New Town Research Laboratories
University of Tasmania
13 St Johns Avenue,
New Town, 7008
Australia
Ph:  +613 6233 6858
Fax: +613 6233 6145




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