[R-sig-ME] Questions about porting pedigreemm to the new lme4

Joehanes, Roby (NIH/NHLBI) [F] roby.joehanes at nih.gov
Wed Apr 4 18:50:23 CEST 2012


Hi all:

Please find the updated patch. I think I got examples 1 and 2 to work (see below) and the numbers do match. However, I still cannot get examples 3 and 4 to work. Apparently, if I run glmer instead of pedigreemm, I got the same error. Namely, both of these statements:
fm3 <- pedigreemm(NCM ~ birth + calvingYear + (1|sire) + (1|herd), data=mastitis, pedigree=list(sire=pedSires), family="poisson")
fm3x <- glmer(NCM ~ birth + calvingYear + (1|sire) + (1|herd), data=mastitis, family="poisson")

yielded the same error: Error in FUN(1:3[[1L]], ...) : Downdated VtV is not positive definite

And both of these:
fm4 <- pedigreemm(mastitis ~ birth + calvingYear + (1|sire) + (1|herd), data=mastitis, pedigree=list(sire=pedSires), family="binomial"(link="probit"))
fm4x <- glmer(mastitis ~ birth + calvingYear + (1|sire) + (1|herd), data=mastitis, family="binomial"(link="probit"))

also yielded the same error: Error in FUN(1:3[[1L]], ...) :   step factor reduced below 0.001 without reducing pwrss

So, I think the problem lies with the new lme4 since the older lme4 can run fm3x and fm4x just fine. I am just wondering if anyone can give me pointers to fix these problems. I used the SVN version 1694, which I believe to be the latest at the time of this writing.

Thank you,
Roby


On Apr 3, 2012, at 7:06 PM, Joehanes, Roby (NIH/NHLBI) [F] wrote:

> Hi Ben and everyone:
>
>
> I made some semi-working patch here (attached). I tried the examples mentioned in the paper of Vazquez, et al. (J. Anim. Sci. 2010, 88:497-504) and got the first example (fm1) working and the result is the same as the older one:
> milk <- within(milk, sdMilk <- milk / sd(milk))
> fm1 <- pedigreemm(sdMilk ~ lact + log(dim) + (1|id) + (1|herd), data=milk, pedigree=list(id=pedCowsR))
>
> Result:
> ----
> Linear mixed model fit by REML ['lmerMod']
> Formula: sdMilk ~ lact + log(dim) + (1 | id) + (1 | herd)
>   Data: milk
>
> REML criterion at convergence: 8384.794
>
> Random effects:
> Groups   Name        Variance Std.Dev.
> id       (Intercept) 0.2780   0.5273
> herd     (Intercept) 0.2078   0.4559
> Residual             0.4833   0.6952
> Number of obs: 3397, groups: id, 1359; herd, 57
>
> Fixed effects:
>            Estimate Std. Error t value
> (Intercept)  1.70371    0.26854   6.344
> lact        -0.10779    0.01232  -8.747
> log(dim)     0.73594    0.04380  16.804
>
> Correlation of Fixed Effects:
>         (Intr) lact
> lact     -0.296
> log(dim) -0.960  0.221
> ----
>
> However, when I tried the second example (fm2) below, I got an error.
> milk <- within(milk, sdMilk <- milk / sd(milk))
> milk <- within(milk, idPE <- id)
> fm2 <- pedigreemm(sdMilk ~ lact + (1|id) + log(dim) + (1|idPE) + (1|herd), data=milk, pedigree=list(id=pedCows))
>
> The error message is:
> Error in .local(x, ...) : previous CHOLMOD factorization was unsuccessful
> In addition: Warning message:
> In .local(x, ...) :
>  Cholmod warning 'not positive definite' at file ../Cholesky/t_cholmod_rowfac.c, line 432
>
> I could not get the third example to work either:
> fm3 <- pedigreemm(NCM ~ birth + calvingYear + (1|sire) + (1|herd), data=mastitis, pedigree=list(sire=pedSires), family="poisson")
>
> The error message is:
> Error in FUN(1:3[[1L]], ...) : Downdated VtV is not positive definite
>
> The fourth example also does not work:
> fm4 <- pedigreemm(mastitis ~ birth + calvingYear + (1|sire) + (1|herd), data=mastitis, pedigree=list(sire=pedSires), family="binomial"(link="probit"))
>
> Error message:
> Error in FUN(1:3[[1L]], ...) :
>  step factor reduced below 0.001 without reducing pwrss
>
> I think I messed up somewhere in the internals and got these errors.
>
> Thanks,
> Roby

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lmer-patch-for-pedigreemm-v2.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20120404/a2e46e16/attachment-0004.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pedigreemm-patch-v3.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20120404/a2e46e16/attachment-0005.txt>


More information about the R-sig-mixed-models mailing list