hessian: Compute Hessian matrix at the MLE

View source: R/hessian.R

hessianR Documentation

Compute Hessian matrix at the MLE

Description

Compute Hessian matrix at the MLE

Usage

hessian(mod, numerical = FALSE)

Arguments

mod

an object of class bbdml

numerical

Boolean. Defaults to FALSE. Indicator of whether to use the numeric Hessian (not recommended).

Value

Hessian matrix at the MLE. In this setting, it's hard to compute expectations to calculate the information matrix, so we return the consistent estimate using sample moments: \hat{A}(\hat{\theta}) = \sum_i \frac{\partial^2}{\partial \theta \partial \theta^T} l(\theta, W_i) evaluated at \theta = \hat{\theta}.

Examples

data(soil_phylum_small_otu1)
mod <- bbdml(formula = cbind(W, M - W) ~ DayAmdmt,
phi.formula = ~ DayAmdmt,
data = soil_phylum_small_otu1)
hessian(mod)


corncob documentation built on May 29, 2024, 7:15 a.m.