Dear Craig,
It is better to ask questions about lme4 at r-sig-mixed-models (in cc).
Are you using a recent version of lme4? Try upgrading lme4 and see if you still get the error.
Best regards,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
Thierry.Onkelinx at inbo.be
www.inbo.be
To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data.
~ Roger Brinner
The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
-----Oorspronkelijk bericht-----
Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Namens Craig O'Connell
Verzonden: maandag 28 april 2014 3:20
Aan: r-help at r-project.org
Onderwerp: [R] lme4 Error Help: ?maxstephalfit?pwrssUpdate?
I am using a mixed model to assess the effects of various variables (i.e. treatment, density, visibility) on bee behavior (e.g., avoidance frequency - total avoidances per total visits; feeding frequency, and mating frequency). Bee individuals is my random factor (n=63 different bees), whereas treatment type, animal density, and air visibility are my fixed factors.
However, when I run my models, I immediately get an error that I cannot fix. Here is a sample of my data:
Bee Treatment Visits Avoid Feeding Mating Density Visibility
1 C 5 0 5 0 5 4
2 C 4 0 3 0 5 4
3 C 3 0 3 0 5 4
...
63
1 PC 2 0 1 1 5 4
2 PC 3 0 0 3 5 4
3 PC 1 0 0 0 5 4
...
63
1 M 5 0 1 3 5 4
2 M 3 2 0 0 5 4
3 M 2 0 0 2 5 4
...
63One I create my .txt file, I being my coding in R by first loading lme4. After that, my coding starts off as follows:
barrierdat = read.table("GLMMROW.txt", header=TRUE) barrierdat barrierdat$Visibility = as.factor(barrierdat$Visibility);
barrierdat$Density = as.factor(barrierdat$Density);
p01.glmer = glmer(Avoidance~offset(log(Visits))+(1|Bee), family=poisson,
data=egghead); # null model; p02.glmer = glmer(Avoidance~offset(log(Visits))+(1|Bee)+Treatment, family=poisson,
data=egghead);
p03.glmer = glmer(Avoidance~offset(log(Visits))+(1|Bee)+Visibility, family=poisson,
data=egghead);
p04.glmer = glmer(Avoidance~offset(log(Visits))+(1|Bee)+Density, family=poisson,
data=egghead);However, upon immediately running my models (e.g. p01.glmer), I receive the error:
Error: (maxstephalfit) PIRLS step-halvings failed to reduce deviance in pwrssUpdate
Does anybody know what the issue is? I ran similar data several weeks ago and had no issues. Any Suggestions on how to proceed?
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
* * * * * * * * * * * * * D I S C L A I M E R * * * * * * * * * * * * *
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is door een geldig ondertekend document.
The views expressed in this message and any annex are purely those of the writer and may not be regarded as stating an official position of INBO, as long as the message is not confirmed by a duly signed document.
lme4 Error Help: “maxstephalfit…pwrssUpdate”
3 messages · ONKELINX, Thierry, Craig O'Connell, Ben Bolker
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20140428/da5b1f03/attachment.pl>
On 14-04-28 07:57 AM, Craig O'Connell wrote:
Thanks. I used the most current version of lme4 that is why I was a
bit concerned. My data seems appropriate and with lme4 working last week on a very similar data set, I was left a bit confused. Since I only starting implementing this technique, does anybody have some pointers on what I should look for that may potentially cause some issues? Does the new as well as the old version of lme4 work on the very similar data set you analyzed last week? If you think the problem is with a broken version of lme4 you could try installing lme4.0 (from http://lme4.r-forge.r-project.org/repos) and see if it makes a difference. I would look for extreme observations/groups in the data sets (e.g. cases with all-zero avoidances; if the overall mean is positive you may need an infinite parameter value for this case). If you can come up with a reproducible example, there's a chance we can set some bounds within the internal code to allow this to fit ... If you set some of the groups to all-zero avoidance in the data set that previously worked can you get it to stop working? PS -- I don't know how your data are structured, but if you have a small number of visits and the number of avoidances is _not_ necessarily a small fraction of the number of visits, you may want to consider a binomial rather than a Poisson model ...
-----Oorspronkelijk bericht----- Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Namens Craig O'Connell Verzonden: maandag 28 april 2014 3:20 Aan: r-help at r-project.org Onderwerp: [R] lme4 Error Help: ?maxstephalfit?pwrssUpdate?
I am using a mixed model to assess the effects of various variables
(i.e. treatment, density, visibility) on bee behavior (e.g., avoidance frequency - total avoidances per total visits; feeding frequency, and mating frequency). Bee individuals is my random factor (n=63 different bees), whereas treatment type, animal density, and air visibility are my fixed factors.
However, when I run my models, I immediately get an error that I
cannot fix. Here is a sample of my data:
Bee Treatment Visits Avoid Feeding Mating Density Visibility 1 C 5 0 5 0 5 4 2 C 4 0 3 0 5 4 3 C 3 0 3 0 5 4 ... 63 1 PC 2 0 1 1 5 4 2 PC 3 0 0 3 5 4 3 PC 1 0 0 0 5 4 ... 63 1 M 5 0 1 3 5 4 2 M 3 2 0 0 5 4 3 M 2 0 0 2 5 4
63One I create my .txt file, I being my coding in R by first loading lme4. After that, my coding starts off as follows:
barrierdat = read.table("GLMMROW.txt", header=TRUE) barrierdat barrierdat$Visibility = as.factor(barrierdat$Visibility);
barrierdat$Density = as.factor(barrierdat$Density)
p01.glmer = glmer(Avoidance~offset(log(Visits))+(1|Bee), family=poisson,
data=egghead); # null model
Note that you can often use update() to simplify your code, e.g.
p02.glmer = update(p01.glmer,.~.+Treatment)
p03.glmer = update(p01.glmer,.~.+Visibility)
p04.glmer = update(p01.glmer,.~.+Density)