For standard distributions, compute the Fisher information matrix using
known closed-form expressions. Falls back to numerical computation for
unknown distributions.
Usage
fisher_analytical(spec, y, par, distribution = NULL)
Arguments
- spec
A model_spec object
- y
Numeric vector of observed data
- par
Named numeric vector of parameter values
- distribution
Optional distribution name. If NULL, attempts to detect
from spec$name. Supported: "normal", "exponential", "poisson", "gamma",
"binomial", "beta"
Value
A fisher_info object
Examples
spec <- model_spec_normal()
y <- rnorm(100, mean = 5, sd = 2)
info <- fisher_analytical(spec, y, c(mu = 5, sigma = 2), distribution = "normal")
print(info)