title: Logistic regression returns error but runs okay on reduced dataset
body: <p>I would appreciate your input on this a lot!</p>
  
  <p>I am working on a logistic regression, but it is not working for some reason: </p>
  
  <pre><code>mod1&lt;-glm(survive~reLDM2+yr+yr2+reLDM2:yr +reLDM2:yr2+NestAge0,
           family=binomial(link=logexp(NSSH1$exposure)),
                         data=NSSH1, control = list(maxit = 50))
  </code></pre>
  
  <p>When I run the same model with less data it works! 
  But with the complete dataset I get an error and warning messages: </p>
  
  <pre><code>Error: inner loop 1; cannot correct step size
  In addition: Warning messages:
  1: step size truncated due to divergence 
  2: step size truncated due to divergence 
  </code></pre>
  
  <p>This is the data: <a href="https://www.dropbox.com/s/8ib8m1fh176556h/NSSH1.csv?dl=0" rel="nofollow noreferrer">https://www.dropbox.com/s/8ib8m1fh176556h/NSSH1.csv?dl=0</a></p>
  
  <p>Log exposure link function from <a href="https://stackoverflow.com/questions/19012128/user-defined-link-function-for-glmer-for-known-fate-survival-modeling">User-defined link function for glmer for known-fate survival modeling</a>:</p>
  
  <pre><code>library(MASS)
  logexp &lt;- function(exposure = 1) {
      linkfun &lt;- function(mu) qlogis(mu^(1/exposure))
      ## FIXME: is there some trick we can play here to allow
      ##   evaluation in the context of the 'data' argument?
      linkinv &lt;- function(eta)  plogis(eta)^exposure
      mu.eta &lt;- function(eta) exposure * plogis(eta)^(exposure-1) *
        .Call(stats:::C_logit_mu_eta, eta, PACKAGE = "stats")
      valideta &lt;- function(eta) TRUE
      link &lt;- paste("logexp(", deparse(substitute(exposure)), ")",
                 sep="")
      structure(list(linkfun = linkfun, linkinv = linkinv,
                 mu.eta = mu.eta, valideta = valideta, 
                 name = link),
            class = "link-glm")
  }
  </code></pre>