Learn R Programming

spaMM (version 4.1.20)

div_info: Information about numerical problems

Description

This experimental function displays information about parameter values for which some numerical problems have occurred. Some warnings suggest its use.

Usage

div_info(object, ...)

Value

Used mainly for the side effects (printed output) but returns invisibly either a single parameter vector (if a single numerical problem occurred) or a matrix of parameter ranges, or NULL if there is no problem to report.

Arguments

object

An object of class HLfit, as returned by the fitting functions in spaMM.

...

Currently not used

Examples

Run this code
if (spaMM.getOption("example_maxtime")>25) {
  set.seed(1L)
  d <- data.frame(y = rbinom(100, 1, 0.5), time = 1:100)
  numpb1 <- fitme(y ~ 1 + AR1(1|time), data = d, init=list(lambda=NA), 
                         family = binomial(link=cauchit), method = "PQL")
  div_info(numpb1) # High lambda is often part of the problem,
                   # here only for negative AR parameter, as shown by the following 'fix':      
  #                 
  fitme(y ~ 1 + AR1(1|time), data = d, family = binomial(link=cauchit), 
        method = "PQL", lower=list(ARphi=0), init=list(lambda=NA)) # no div_info
  #
  # Less successfull attempt to fix the problem:
  numpb2 <- fitme(y ~ 1 + AR1(1|time), data = d, family = binomial(link=cauchit), 
        method = "PQL", upper=list(lambda=20), init=list(lambda=NA))  
  div_info(numpb2) # problem for negative AR parameter again
}

Run the code above in your browser using DataLab