Find maximum likelihood estimates for a model_spec.
Value
A list with:
- par
MLE parameter estimates
- loglik
Log-likelihood at MLE
- convergence
Convergence code from optim
- hessian
Hessian matrix at MLE (if computed)
- spec
The original model_spec
- y
The data
Examples
spec <- model_spec_normal()
y <- rnorm(100, mean = 5, sd = 2)
fit <- fit_model(spec, y)
fit$par