Skip to content

Error in glmer fit

6 messages · Kevin E. Thorpe, ONKELINX, Thierry, Martí Casals +1 more

#
Hello.

I attempted the following command and got the resultant error.

glmer(InInt~speciality+position+stkperyr+conf+age+years+risk+stroke_type+(1|pid),data=dord4mod,family=binomial,verbose=TRUE)

Error in pwrssUpdate(pp, resp, tolPwrss, GQmat, compDev, fac, verbose) :
   PIRLS step failed

It seems to happen right off the bat.  Any idea what the source may be? 
  I don't want to post the data in the open, but will send it privately 
if requested.  Here also is my sessionInfo()

R version 2.14.0 Patched (2011-11-29 r57769)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_US       LC_NUMERIC=C         LC_TIME=en_US
  [4] LC_COLLATE=C         LC_MONETARY=en_US    LC_MESSAGES=en_US
  [7] LC_PAPER=C           LC_NAME=C            LC_ADDRESS=C
[10] LC_TELEPHONE=C       LC_MEASUREMENT=en_US LC_IDENTIFICATION=C

attached base packages:
  [1] grid      tcltk     splines   stats     graphics  grDevices utils
  [8] datasets  methods   base

other attached packages:
  [1] lme4_0.999902345-0  Matrix_1.0-2        ResearchMethods_1.4
  [4] ellipse_0.3-5       gplots_2.10.1       KernSmooth_2.23-7
  [7] caTools_1.12        bitops_1.0-4.1      gdata_2.8.2
[10] gtools_2.6.2        irr_0.83            lpSolve_5.6.6
[13] lattice_0.20-0      rms_3.3-2           Hmisc_3.9-0
[16] survival_2.36-10

loaded via a namespace (and not attached):
[1] MASS_7.3-16    Rcpp_0.9.10    cluster_1.14.1 minqa_1.1.18 
nlme_3.1-102
[6] tools_2.14.0
#
Dear Kevin,

I cannot give you answer on why this happens. You can try the lme4.0 package as a work around. It is an older version of lme4.

Best regards,

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-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] Namens Kevin E. Thorpe
Verzonden: dinsdag 13 november 2012 1:23
Aan: r-sig-mixed-models at r-project.org
Onderwerp: [R-sig-ME] Error in glmer fit

Hello.

I attempted the following command and got the resultant error.

glmer(InInt~speciality+position+stkperyr+conf+age+years+risk+stroke_type+(1|pid),data=dord4mod,family=binomial,verbose=TRUE)

Error in pwrssUpdate(pp, resp, tolPwrss, GQmat, compDev, fac, verbose) :
   PIRLS step failed

It seems to happen right off the bat.  Any idea what the source may be?
  I don't want to post the data in the open, but will send it privately if requested.  Here also is my sessionInfo()

R version 2.14.0 Patched (2011-11-29 r57769)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_US       LC_NUMERIC=C         LC_TIME=en_US
  [4] LC_COLLATE=C         LC_MONETARY=en_US    LC_MESSAGES=en_US
  [7] LC_PAPER=C           LC_NAME=C            LC_ADDRESS=C
[10] LC_TELEPHONE=C       LC_MEASUREMENT=en_US LC_IDENTIFICATION=C

attached base packages:
  [1] grid      tcltk     splines   stats     graphics  grDevices utils
  [8] datasets  methods   base

other attached packages:
  [1] lme4_0.999902345-0  Matrix_1.0-2        ResearchMethods_1.4
  [4] ellipse_0.3-5       gplots_2.10.1       KernSmooth_2.23-7
  [7] caTools_1.12        bitops_1.0-4.1      gdata_2.8.2
[10] gtools_2.6.2        irr_0.83            lpSolve_5.6.6
[13] lattice_0.20-0      rms_3.3-2           Hmisc_3.9-0
[16] survival_2.36-10

loaded via a namespace (and not attached):
[1] MASS_7.3-16    Rcpp_0.9.10    cluster_1.14.1 minqa_1.1.18
nlme_3.1-102
[6] tools_2.14.0

--
Kevin E. Thorpe
Biostatistician/Trialist,  Applied Health Research Centre (AHRC) Li Ka Shing Knowledge Institute of St. Michael's Assistant Professor, Dalla Lana School of Public Health University of Toronto
email: kevin.thorpe at utoronto.ca  Tel: 416.864.5776  Fax: 416.864.3016

_______________________________________________
R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
* * * * * * * * * * * * * 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.
1 day later
#
Thank you both for your responses.  Unfortunately neither solves the 
problem.  Using nAGQ=5 with lme4 results in the same error as already shown.

At Thierry's suggestion, I tried lme4.0 and get a different error.

glmer(InInt~speciality+position+stkperyr+conf+age+years+risk+stktype+(1|pid),data=dord4mod,family=binomial)
Error in validObject(.Object) :
   invalid class "mer" object: invalid object for slot "resid" in class 
"mer": got class "labelled", should be or extend class "numeric"
 > sessionInfo()
R version 2.14.0 Patched (2011-11-29 r57769)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_US       LC_NUMERIC=C         LC_TIME=en_US
  [4] LC_COLLATE=C         LC_MONETARY=en_US    LC_MESSAGES=en_US
  [7] LC_PAPER=C           LC_NAME=C            LC_ADDRESS=C
[10] LC_TELEPHONE=C       LC_MEASUREMENT=en_US LC_IDENTIFICATION=C

attached base packages:
[1] splines   stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
[1] lme4.0_0.999999-1 Matrix_1.0-2      lattice_0.20-0    rms_3.3-2
[5] Hmisc_3.9-0       survival_2.36-10

loaded via a namespace (and not attached):
[1] cluster_1.14.1 grid_2.14.0    nlme_3.1-102   stats4_2.14.0
On 11/14/2012 06:57 AM, Mart? Casals wrote:

  
    
#
Kevin E. Thorpe <kevin.thorpe at ...> writes:
This is a pretty weird error.  Is this from a clean session?
  Is there any chance you can provide a reproducible problem?
  (You could send me your data.)

  To provide a little bit more context for the general public about
lme4 development: at present there are three versions of lme4:

  stable-CRAN: 0.999999-0
  lme4 (R-forge): 0.99999911-0
  lme4.0 (R-forge): 0.999999-1

 As far as we know, lme4.0 is identical to the stable-CRAN version
(if not, please let us know!)

  lme4 is the development version: it has lots of goodies that
stable-lme4 doesn't (profiling, a predict method, a built-in
parametric bootstrap method, support for alternative optimizers, ...),
but at present it (1) doesn't work with all of the downstream
add-on packages (gamm4, blme, etc) and (2) has a somewhat unstable
GLMM fitting algorithm.  We are working hard to fix #2; once that's
done we will work on #1, and then release it (yes, we know you've
heard that before).  In the meantime, if you can live without the
goodies, the stable version represents the best bet.

  Things are a little more difficult if you don't have the
latest version, since install.packages() may not find the
right version.  You can try downloading the relevant binary
or source version from 

http://cran.r-project.org/web/packages/lme4//index.html

or

https://r-forge.r-project.org/R/?group_id=60
3 days later
#
Ben Bolker <bbolker at ...> writes:
OK, on closer inspection: the problem is simply that
lme4 is complaining that it's expecting the response to be
numeric: class "labelled" is not "numeric".

A simple workaround is
glmer(as.numeric(InInt)~speciality+position+stkperyr+conf+
   age+years+risk+stktype+(1|pid),data=dord4mod,family=binomial)

The development version of lme4 doesn't appear to hit the
same problem, but runs into a PIRLS problem at some point later
in the code you sent me (with ...

dord.glmer <- glmer(InInt~speciality+position+
 stkperyr+conf+age+years+risk+stktype+(1|pid),
   data=dord4mod,family=binomial)
)

  Ben Bolker