Learn R Programming

corncob (version 0.4.2)

hessian: Compute Hessian matrix at the MLE

Description

Compute Hessian matrix at the MLE

Usage

hessian(mod, numerical = FALSE)

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}\).

Arguments

mod

an object of class bbdml

numerical

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

Examples

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

Run the code above in your browser using DataLab