There are many ways to get this kind of message. With binary
outcomes, if complete separation is possible, "nlminb" (or
"optim") will
get tired trying to crank the slope up to Inf; in general, it suggests
the model is overparameterized in some way.
You say this is only a warning message. Do you still get answers?
If yes, can you still get confidence intervals for the paramters? If
yes, I might try different sets of starting values; if they all gave me
comparable answers, I might decide not to worry about the warning.
If I wanted more, I might trace through the code line by line until I
executed "nlminb" and got the same message. Then I'd compute the
eigenvalues and vectors of the hessian. With luck I might be able to
figure out from them just how the model is overparameterized. To do
this, I first tried typing "lmer" at a command prompt:
> lmer
standardGeneric for "lmer" defined from package "Matrix"
function (formula, data, family, method = c("REML", "ML",
"PQL",
"Laplace", "AGQ"), control = list(), start, subset,
weights,
na.action, offset, model = TRUE, x = FALSE, y = FALSE, ...)
standardGeneric("lmer")
That was not enough. So I then tried
'showMethods("lmer")';
'methods' did not work in this case, because it's S3 and
"lmer" is an S4
generic (or something like that). I got the following:
> showMethods("lmer")
Function "lmer":
formula = "formula"
With this information, I then tried, 'getMethod("lmer",
"formula")',
which gave me the desired source code. I could then copy it into a
script file, walk through it line by line, and learn something.
Also, I might try to find a much simpler example that produces the
same message, e.g, using simulated data with as few observations and
variables as possible. If you submit a simple, self-contained example,
others might copy it from your email into R to see if they get the same
message. This kind of example makes it much easier for a potential
respondent to identify the problem, check the code to make sure, and
compose a reply in a few seconds, and this in turn icreases the chances
you will receive a quick, useful reply. (See also the posting guide!
"www.R-project.org/posting-guide.html".)
Good Luck!
spencer graves
J??r??me Lema??tre wrote:
> Dear all,
>
> I'm building binomial mixed-model using lme4 package.
> I'm able to obtain outputs properly except when I include two
particular
> variables: date (from 23 to 34; 1 being to first sampling day) and Latitude
> (UTM/100 000, from 55.42 to 56.53). No "NA" is any of those
variables.
> In those cases, I get the warning message: "nlminb failed to
converge"
> I tried to modify lmer controls as : msMaxIter; maxIter... but I still get
> the message.
> Should I bother about it?
> If yes, what should I do to not get the message?
>
> Thank you all in advance for you answers.
>
> PS: My model writing is for example
>
> Fm<-lmer(alive~factor(sex)+mass+parasite+Latitude+(1|ID),
family=binomial,
> method="AGQ", data=donnee).
>
> Where "parasite" is presence/absence (0 or 1) and ID is the
station identity
> where I captured 0 to 20 specimens, each being alive or dead, having a sex,
> a mass, a presence/absence of parasite. Latitude is given at the station
> level. Date is given at the specimen level because I sampled for 4 days in
> each station.
>
>
> J??r??me Lema??tre
> Ph.D. student
> D??partment of biology,
> University Laval
> Quebec, Canada
>
> ______________________________________________
> 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
--
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA
spencer.graves at pdf.com
www.pdf.com <http://www.pdf.com>
Tel: 408-938-4420
Fax: 408-280-7915