Dear all, I am experiencing problems with glmmmPQL. I am trying to analyze binomial data with some spatial autocorrelation. Here is my code and some of the outputs> colnames(d.glmm)[1] "BV" "Longitude" "Latitude" "nb_pc_02" "nb_expr_02" [6] "pc_02" "nb_pc_07" "nb_expr_07" "pc_07" "PSDC99" [11] "PSDC68" "POPACTP99" "HOMACT99" "FEMACT99" "CHOM99" [16] "CHOMHOM99" "CHOMFEM99" "PCCHOM99" "PCFEMCHOM" "RFUCQ201" [21] "RFUCQ202" "RFUCQ203" "RFUCQ204" "RFUCQ205" "sd_RFUCQ201" [26] "sd_RFUCQ202" "sd_RFUCQ203" "sd_RFUCQ204" "sd_RFUCQ205" "langue" [31] "bidon"> dim(d.glmm)[1] 1916 31> attach(d.glmm) > search()[1] ".GlobalEnv" "d.glmm" "package:nlme" [4] "package:MASS" "package:ade4" "package:RMySQL" [7] "package:DBI" "package:stats" "package:graphics" [10] "package:grDevices" "package:utils" "package:datasets" [13] "package:methods" "Autoloads" "package:base"> m.1 <- glmmPQL(fixed=cbind(nb_pc_02,I(nb_expr_02-nb_pc_02))~(PSDC99+I(log(RFUCQ202))+PCCHOM99+sd_RFUCQ202+PCFEMCHOM)^2+langue, + random= ~ 1 | bidon, + correlation = corExp(form = ~ Longitude +Latitude), + family=quasibinomial, + na.action="na.exclude", + data=d.glmm) iteration 1 Erreur dans model.frame.default(formula = ~Longitude + Latitude + bidon les longueurs des variables diff?rent (trouv? pour 'bidon') Sorry about the french here... It is just saying that variables have different lengths. Which is obviously untrue, as they all are columns of the same data frame. The search() shows that I have attached the data.frame, as it is told in some FAQs. If somebody has an idea on how to sort this issue out, I would appreciate ! Another question: is the option correlation active in the latest version of lmer ? If it is, it might be an option to consider instead of glmmPQL. Thanks in advance for your help ! -- Jean-Baptiste Ferdy Institut des Sciences de l'?volution de Montpellier - UMR 5554 Universit? Montpellier 2 t?l. (0)4 67 14 42 27 fax ?(0)4 67 14 36 22
Jean-Baptiste Ferdy <jean-baptiste.ferdy <at> univ-montp2.fr> writes:> > Dear all, > > I am experiencing problems with glmmmPQL. I am trying to analyze > binomial data with some spatial autocorrelation. Here is my code and > some of the outputs > > m.1 <- glmmPQL(fixed=cbind(nb_pc_02,I(nb_expr_02-nb_pc_02))~(PSDC99 > +I(log(RFUCQ202))+PCCHOM99+sd_RFUCQ202+PCFEMCHOM)^2+langue, > + random= ~ 1 | bidon, > + correlation = corExp(form = ~ Longitude > +Latitude), > + family=quasibinomial, > + na.action="na.exclude", > + data=d.glmm) > iteration 1 > Erreur dans model.frame.default(formula = ~Longitude + Latitude + bidon > les longueurs des variables diff?rent (trouv? pour 'bidon') > > Sorry about the french here... It is just saying that variables have > different lengths. Which is obviously untrue, as they all are columns of > the same data frame. > > The search() shows that I have attached the data.frame, as it is told in > some FAQs.Hmm, that would seem unnecessary as long as you have the dataargument?> If somebody has an idea on how to sort this issue out, I would > appreciate !I don't know. My only guess is that it _might_ have something to do with your na.action? What happens if you try the model on na.omit(d.glmm) ? You can try traceback() to see exactly where the crash happens (although that may not be directly useful). More usefully, can you provide a reproducible example (e.g. post the data somewhere, or cut it down to a subset that still causes the problem)?> > Another question: is the option correlation active in the latest version > of lmer ? If it is, it might be an option to consider instead of > glmmPQL.No, and not on Doug Bates' high-priority list. You might want to follow up to r-sig-mixed-models at r-project.org ... cheers Ben Bolker