Learn R Programming

spaMM (version 3.13.0)

get_infomat: Information matrix of fitted model

Description

This wraps numDeriv::hessian to provide the information matrix (negative Hessian matrix of log-likelihood) from the result of a fitme fit. This is mainly a stub for later developments, and the source code should be consulted to understand its limitations.

Usage

get_infomat(object, verbose=TRUE, ...)

Value

A matrix.

Arguments

object

Result of fitme call.

verbose

Boolean: whether to print (as a list) the estimates of the parameters for which the Hessian will be computed, and a (sort of) progress bar.

...

Arguments passed to numDeriv::hessian.

Examples

Run this code
# This can be slow!

if (spaMM.getOption("example_maxtime")>10) {
  
  data("blackcap")
  foo <- fitme(migStatus ~ means+ Matern(1|longitude+latitude),data=blackcap) 
  (infomat <- get_infomat(foo))

  # Residual dispersion parameters are not yet handled:
  data("wafers")
  hlfit <- fitme(y ~ X1+X2+X1*X3+X2*X3+I(X2^2)+(1|batch), family=Gamma(log),
                 resid.model = ~ X3+I(X3^2) ,data=wafers)
  (infomat <- get_infomat(hlfit)) 

}

Run the code above in your browser using DataLab