An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20140107/cbf76fda/attachment.pl>
R-sig-mixed-models Digest, Vol 85, Issue 6
6 messages · Cole, Tim, David Duffy, Emmanuel Curis +1 more
On Wed, 8 Jan 2014, Cole, Tim wrote:
The offending code is mod <- glmer(mat ~ log(DecAge) + Sex * Ethnicity + (1 | BHID), family=binomial, nAGQ=0, data=df) The error message is simple to generate with a trivial dataset, restricted to subjects with 2 to 4 records and both 0 and 1 values for mat. mat is a binary mature bone measure, which for each subject consists of zero or more 0s followed by zero or more 1s, the 0/1 transition providing useful information about the age of maturity.
In your example, it looks like quasi-separation for mat v. DecAge in males
might be to blame (when I plot them), and:
library(glmmML)
glmmML(mat ~ log(DecAge) + Sex * Ethnicity, cluster=BHID, data=df,
control = list(maxit = 2000))
[glmmml] fail = 1
Max. No. of iterations reached without convergence
Cheers, David Duffy.
| David Duffy (MBBS PhD)
| email: David.Duffy at qimrberghofer.edu.au ph: INT+61+7+3362-0217 fax: -0101
| Genetic Epidemiology, QIMR Berghofer Institute of Medical Research
| 300 Herston Rd, Brisbane, Queensland 4006, Australia GPG 4D0B994A
Hi, I'm not sure if this may be related or not to the issue, but in the subset you sent you seem to have duplicate rows, differing only by their row name (see for instance 3090 & 3697, 3156 & 3763). I guess this is because some columns were removed, but could it be related to the difficulties to fit, and the oddities of error occuring or not according to the subset ? Best regards,
On Tue, Jan 07, 2014 at 02:12:13PM +0000, Cole, Tim wrote:
? Thanks Ben for your speedy response, and for confirming that my problem is new. ? The dataset has 5048 records and 607 subjects. I've experimented with subsets of the data and it is rather complicated - I'll send you the data and code separately. The error message is simple to generate with a trivial dataset, restricted to subjects with 2 to 4 records and both 0 and 1 values for mat. But there is also a problem with subjects that have 10 records, though not 9 or 11 ? very odd. ? ? mat is a binary mature bone measure, which for each subject consists of zero or more 0s followed by zero or more 1s, the 0/1 transition providing useful information about the age of maturity. ? ? BHID Sex Ethnicity DecAge mat ? 2 102 Girl White 9.273973 0 ? 4251 102 Girl White 15.520000 1 ? 55 169 Girl White 9.805381 0 ? 1876 169 Girl White 12.876781 0 ? 3090 169 Girl White 14.846575 1 ? 3697 169 Girl White 14.846575 1 ? 676 184 Girl White 10.425736 0 ? 6139 184 Girl White 19.452430 1 ? 1896 192 Boy White 12.493616 0 ? 6145 192 Boy White 19.430527 1 ? 1307 356 Boy Black 11.246575 0 ? 1914 356 Boy Black 12.307274 0 ? 6163 356 Boy Black 19.255305 1 ? 3156 386 Boy Black 14.890000 0 ? 3763 386 Boy Black 14.890000 0 ? 4977 386 Boy Black 17.130000 0 ? 6191 386 Boy Black 19.364819 1 ? 156 421 Girl Black 9.235616 0 ? 6226 421 Girl Black 19.526352 1 ? 264 531 Girl Black 9.799984 0 ? 1478 531 Girl Black 11.796624 0 ? 2692 531 Girl Black 13.763384 0 ? 5120 531 Girl Black 16.752000 1 ? 1103 778 Girl White 10.732375 0 ? 1710 778 Girl White 11.747646 0 ? 6566 778 Girl White 19.433265 1 ? 1791 869 Girl Black 11.968995 0 ? 3005 869 Girl Black 13.997055 0 ? 4826 869 Girl Black 16.073000 0 ? 6040 869 Girl Black 18.124000 1 ? 4834 880 Boy White 15.504000 0 ? 5441 880 Boy White 17.076000 1 ? 6048 880 Boy White 17.823000 1 ? 6655 880 Boy White 18.562628 1 ? ? Best wishes, ? Tim ?
? On 14-01-06 04:04 AM, Cole, Tim wrote:
? The dataset consists of longitudinal measures of bone score during ? puberty, where 1000 indicates maturity. The aim is to estimate median ? age at maturity in four groups by sex and ethnicity. ? This glm code works fine, but ignores the longitudinal element. lm2 ? <- glm(I(RUSBoneScore == 1000) ~ log(DecAge) + Sex * Ethnicity, ? family=binomial, data=na.omit(bh[, 3:6])) ? This code, which adds a random subject effect, fails with the ? unhelpful error message below. lm3 <- glmer(I(RUSBoneScore == 1000) ~ ? log(DecAge) + Sex * Ethnicity + (1 | BHID), family=binomial, ? data=na.omit(bh[, 2:6])) ? Error in pwrssUpdate(pp, resp, tolPwrss, GHrule(0L), compDev, ? verbose) : c++ exception (unknown reason) ? I've tried various alternatives but they all fail in the same way. ? Thoughts please. ? ? Hard to say without a reproducible example. My main comment is that ? this is *not* a problem I have seen anyone report before. sessionInfo() ? please? Can you try with verbose=100? Can you make a reproducible ? example that is a reasonable size and doesn't have confidentiality problems? ? ? Ben Bolker ? ? [[alternative HTML version deleted]] ? ? _______________________________________________ ? R-sig-mixed-models at r-project.org mailing list ? https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Emmanuel CURIS
emmanuel.curis at parisdescartes.fr
Page WWW: http://emmanuel.curis.online.fr/index.html
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20140108/6d86fe6c/attachment.pl>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20140108/65f1cd92/attachment.pl>
On 14-01-08 05:13 AM, Cole, Tim wrote:
Well spotted! This, it turns out, explains the fitting problems. I feel a bit foolish not noticing it myself. I'm not sure if [gn]lmer should flag or ban duplicate measurements, as in principle they could be legitimate (though not in my case). Many thanks, Tim Cole
In any case it still shouldn't crash with an obscure error message! I can imagine this issue *might* have been fixed by some of our 'clamping' fixes, i.e. https://github.com/lme4/lme4/commit/c51a142be1781520f8bd1d7bb6aee27bf4e96568 If you have a chance it would be great if you could test with a development version of lme4 and see if the problem goes away ... Ben Bolker
--- Tim.Cole at ucl.ac.uk <mailto:Tim.Cole at ucl.ac.uk> Phone +44(0)20 7905 2666 Fax +44(0)20 7905 2381 Centre for Paediatric Epidemiology and Biostatistics UCL Institute of Child Health, London WC1N 1EH, UK From: Emmanuel Curis <emmanuel.curis at parisdescartes.fr <mailto:emmanuel.curis at parisdescartes.fr>> Date: Wednesday, 8 January 2014 05:46 To: Tim Cole <tim.cole at ucl.ac.uk <mailto:tim.cole at ucl.ac.uk>> Cc: Ben Bolker <bbolker at gmail.com <mailto:bbolker at gmail.com>>, "r-sig-mixed-models at r-project.org <mailto:r-sig-mixed-models at r-project.org>" <r-sig-mixed-models at r-project.org <mailto:r-sig-mixed-models at r-project.org>> Subject: Re: [R-sig-ME] R-sig-mixed-models Digest, Vol 85, Issue 6 Hi, I'm not sure if this may be related or not to the issue, but in the subset you sent you seem to have duplicate rows, differing only by their row name (see for instance 3090 & 3697, 3156 & 3763). I guess this is because some columns were removed, but could it be related to the difficulties to fit, and the oddities of error occuring or not according to the subset ? Best regards, On Tue, Jan 07, 2014 at 02:12:13PM +0000, Cole, Tim wrote: ? The dataset has 5048 records and 607 subjects. I've experimented with subsets of the data and it is rather complicated - I'll send you the data and code separately. The error message is simple to generate with a trivial dataset, restricted to subjects with 2 to 4 records and both 0 and 1 values for mat. But there is also a problem with subjects that have 10 records, though not 9 or 11 ? very odd. ? ? mat is a binary mature bone measure, which for each subject consists of zero or more 0s followed by zero or more 1s, the 0/1 transition providing useful information about the age of maturity. ? On 14-01-06 04:04 AM, Cole, Tim wrote: ? The dataset consists of longitudinal measures of bone score during ? puberty, where 1000 indicates maturity. The aim is to estimate median ? age at maturity in four groups by sex and ethnicity. ? This glm code works fine, but ignores the longitudinal element. lm2 ? <- glm(I(RUSBoneScore == 1000) ~ log(DecAge) + Sex * Ethnicity, ? family=binomial, data=na.omit(bh[, 3:6])) ? This code, which adds a random subject effect, fails with the ? unhelpful error message below. lm3 <- glmer(I(RUSBoneScore == 1000) ~ ? log(DecAge) + Sex * Ethnicity + (1 | BHID), family=binomial, ? data=na.omit(bh[, 2:6])) ? Error in pwrssUpdate(pp, resp, tolPwrss, GHrule(0L), compDev, ? verbose) : c++ exception (unknown reason) ? I've tried various alternatives but they all fail in the same way. ? Thoughts please. ? ? Hard to say without a reproducible example. My main comment is that ? this is *not* a problem I have seen anyone report before. sessionInfo() ? please? Can you try with verbose=100? Can you make a reproducible ? example that is a reasonable size and doesn't have confidentiality problems? ? ? Ben Bolker ? ? _______________________________________________ ? R-sig-mixed-models at r-project.org <mailto:R-sig-mixed-models at r-project.org> mailing list ? https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models -- Emmanuel CURIS emmanuel.curis at parisdescartes.fr <mailto:emmanuel.curis at parisdescartes.fr> Page WWW: http://emmanuel.curis.online.fr/index.html