[R] glmmPQL

Jean-Baptiste Ferdy jean-baptiste.ferdy at univ-montp2.fr
Fri Oct 10 16:41:26 CEST 2008


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



More information about the R-help mailing list