Hola a todos, tengo un problemita con la convergencia, resumiendo a un ejemplo reproducible, copio el siguiente código en R, donde las dos primeras alternativas dan resultados y la tercera tiene un error.

żalguna idea?

Javier
##########################################################
library(MCMCglmm)
library(coda)
data(ChickWeight)
head(ChickWeight)
xyplot(weight ~ Time | Chick, data = ChickWeight)
prior.m <- list(R = list(V=1, n=0.0002), G=list(G1=list(V= diag(3),n=3)))
m <- MCMCglmm(weight ~ Diet + poly(Time, 2, raw=TRUE),
              random = ~us(1+ poly (Time, 2, raw=TRUE)):Chick,
              data = ChickWeight, verbose = TRUE, pr=TRUE, pl=TRUE,
              prior = prior.m, saveX = TRUE, saveZ = TRUE) 
m
###
##  en lme4
library(lme4, warn.conflicts = FALSE)
m5a <- lmer(weight ~ Diet + poly(Time, 2, raw = TRUE) +
  (poly(Time, 2, raw = TRUE) | Chick), data = ChickWeight)
summary(m5a)
#####
# en nlme
library(nlme)
m2 <- lme(weight ~ Diet + poly(Time, 2, raw = TRUE)
                    , data = ChickWeight, na.action="na.exclude",
          random = ~poly(Time, 2, raw = TRUE)| Chick
          ,control=lmeControl(msMaxIter = 200, msVerbose = TRUE, niterEM = 10)
          )
	[[alternative HTML version deleted]]

