I replicated your 'false convergence' using R 2.2.0:
> sessionInfo()
R version 2.2.0, 2005-10-06, i386-pc-mingw32
attached base packages:
[1] "methods" "stats" "graphics"
"grDevices" "utils" "datasets"
[7] "base"
other attached packages:
nlme MASS
"3.1-66" "7.2-23"
Since the error message said, "Error in lme.formula", I listed the
code for "lme.formula" and traced it using
"debug(lme.formula)", The
function "glmmPQL" calls "lme.formula" repeatedly. The
function
"lme.formula" in turn calls "nlminb" when it's
available, though it used
to call "optim". The fifth time "lme.formula" was called,
"nlminb"
returned the error message "false convergence (8)".
Under R 2.2, "nlminb" is part of the "base" package.
I'm not
certain, but I don't think it was available in "base" under R
2.1.1.
I think this explains the problem, but not how to fix it. I tried
modifying the code fo "lme.formula" to force it to call
"optim", but
this generated a different error. I am therefore copying Professors
Bates & Ripley in case one of them might want to look at this.
hope this helps.
spencer graves
Jack Tanner wrote:> I've come into some code that produces different results under R 2.1.1
and R
> 2.2.1. I'm really unfamiliar with the libraries in question (MASS and
nlme),
> so I don't know if this is a bug in my code, or a regression in R. If
it's a
> bug on my end, I'd appreciate any advice on potential causes and
relevant
> documentation.
>
> The code:
>
>
score<-c(1,8,1,3,4,4,2,5,3,6,0,3,1,5,0,5,1,11,1,2,4,5,2,4,1,6,1,2,8,16,5,16,3,15,3,12,4,9,2,4,1,8,2,6,4,11,2,9,3,17,2,6)
> id<-rep(1:13,rep(4,13))
> test<-gl(2,1,52,labels=c("pre","post"))
> coder<-gl(2,2,52,labels=c("two","three"))
> il<-data.frame(id,score,test,coder)
> attach(il)
> cs1<-corSymm(value=c(.396,.786,.718,.639,.665,.849),form=~1|id)
> cs1<-Initialize(cs1,data=il)
> run<-glmmPQL(score~test+coder,
> random=~1|id,family=poisson,data=il,correlation=cs1)
>
> The output under R 2.2.1, which leaves the run object (last line of the
> code) undefined:
>
> iteration 1
> iteration 2
> iteration 3
> iteration 4
> Error in lme.formula(fixed = zz ~ test + coder, random = ~1 | id, data =
> list( :
> false convergence (8)
>
> Under R 2.1.1, I get exactly 4 iterations as well, but no "false
> convergence" message, and run is defined.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html