[R-sig-ME] Nest survival: (maxstephalfit) PIRLS step-halvings failed to reduce deviance in pwrssUpdate

Elwyn Sharps e.sharps at gmail.com
Wed Mar 4 21:47:54 CET 2015


Hi,

I am using a nest survival model (glmer) with random effects and a logistic
exposure link function, as described here:

http://stackoverflow.com/questions/19012128/user-defined-link-function-for-
glmer-for-known-fate-survival-modelling

I am running a number of different models, with varying fixed effects. Some
of them are running well, with no error or warning messages, however
for other models, I am getting the following message:

*Error: (maxstephalfit) PIRLS step-halvings failed to reduce deviance in
pwrssUpdate*

I'm not sure what is causing this error. I have tried to check the data for
simple problems, however can't see anything that could be causing trouble.

I've also tried running the model without the random effects. This results
in a different error message:

*Error: cannot find valid starting values: please specify some*

The other models are all running without the need for starting values.

Any advice or thoughts are greatly appreciated. Example data is attached to
this email.

Thanks, and best wishes

Elwyn


-------------------------------------------------------------------------------------------------------------------------------

*Example code:*

library(lme4)
library(MASS)

logexp <- function(exposure = 1)
{
  linkfun <- function(mu) qlogis(mu^(1/exposure))
  linkinv <- function(eta)  plogis(eta)^exposure
  mu.eta <- function(eta) exposure * plogis(eta)^(exposure-1) *
    .Call(stats:::C_logit_mu_eta, eta, PACKAGE = "stats")
  valideta <- function(eta) TRUE
  link <- paste("logexp(", deparse(substitute(exposure)), ")",
                sep="")
  structure(list(linkfun = linkfun, linkinv = linkinv,
                 mu.eta = mu.eta, valideta = valideta,
                 name = link),
            class = "link-glm")
}

##Read in data, called 'mydata'

glm1<-glm(survive/trials~habitat,family=binomial(logexp(exposure=mydata$expos)),data=mydata)


##error message:*Error: cannot find valid starting values: please specify
some*

Mod1<-glmer(survive/trials~habitat + (1|site)+ (1|year),
family=binomial(logexp(exposure=mydata$expos)),data=mydata)

##error message: *Error: (maxstephalfit) PIRLS step-halvings failed to
reduce deviance in pwrssUpdate*


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