+ Reply to Thread
Results 1 to 6 of 6

Thread: glmer help

  1. #1
    Points: 30, Level: 1
    Level completed: 60%, Points required for next Level: 20

    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    glmer help




    Hi everyone, I'm trying to make the jump up to more advanced stats on a current research project, have talked to some really knowledgeable people in my field, but have run into a problem. I've read a few stats books and websites etc. but as I'm coming to this quite fresh it's difficult to generalize other's problems to my own. So here goes...

    Participants have completed a vocabulary test (recog) and the results have been coded as a factor (correct 1, incorrect 0). Each test item is coded for word length (integer - 3, 6, 8, and 11 letters) and word class (factor - verbs = 1, nouns = 2). I have other effects as well, such as age, gender, etc., but I'm trying to make my core model with length and class. I've written this so far:

    > m0 = glmer(recog~length*class + (1+length*class|participant) + (1|testitem), data = study2.data, family = binomial)

    I ran this but got a warning message (below).

    Warning messages:
    1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
    unable to evaluate scaled gradient
    2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
    Model failed to converge: degenerate Hessian with 1 negative eigenvalues

    Any help would be really appreciated!

  2. #2
    Omega Contributor
    Points: 38,334, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,998
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: glmer help

    Not a regular R user, but wonder if you have sparsity in your data. In particular, a rare outcome or a near perfect predictor. Many times these things may prevent a model from converging. Remind me, is glmer the multilevel modeling package. Are there newer versions, glmer4?


    Also with some converging issues you can do burn it iterations or extend the converging criteria to allow it to keep going until it converges. However I believe those estimate may be unstable.


    Stop cowardice, ban guns!

  3. The Following User Says Thank You to hlsmith For This Useful Post:

    Samb (12-06-2016)

  4. #3
    Points: 30, Level: 1
    Level completed: 60%, Points required for next Level: 20

    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: glmer help

    Hi hlsmith,

    Thanks so much for getting back to me. I think glmer is part of the lmer4 package but used for logistic mixed regression.

    Will check the data as you suggest and get back.

    Many thanks!

  5. #4
    Super Moderator
    Points: 31,766, Level: 100
    Level completed: 0%, Points required for next Level: 0
    bugman's Avatar
    Posts
    2,255
    Thanks
    290
    Thanked 324 Times in 265 Posts

    Re: glmer help

    Samb, check out this troubleshooting doc.

    https://rstudio-pubs-static.s3.amazo...633c01d51.html

    If troubles persist, look up Ben Bolker - he has a number of posts scattered about relating to the warnings that you posted.
    The earth is round: P<0.05

  6. The Following User Says Thank You to bugman For This Useful Post:

    Samb (12-06-2016)

  7. #5
    Points: 30, Level: 1
    Level completed: 60%, Points required for next Level: 20

    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: glmer help

    Bugman,

    Thanks for the link - much appreciated!

    Sam

  8. #6
    Points: 30, Level: 1
    Level completed: 60%, Points required for next Level: 20

    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: glmer help


    Hi Luannguyen992, I couldn't read the script you used. Would it be possible to use another one?
    Sam

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats