fit_spatq: Fit a spatq model by maximum likelihood

View source: R/fit_spatq.R

fit_spatqR Documentation

Fit a spatq model by maximum likelihood

Description

Uses optim to find an optimum. If a previous fit is not provided, the first fit uses the conjugate gradient method to improve quickly. After that, the BFGS method is used to refine the optimization. Termination tolerances and control parameters for optim can be provided through spatq_optcontrol.

Usage

fit_spatq(obj, fit = NULL, optcontrol = spatq_optcontrol())

report_spatq(obj)

sdreport_spatq(
  obj,
  bias.correct = !is.null(obj$env$random),
  bias.correct.control = list(sd = TRUE),
  getJointPrecision = FALSE,
  ...
)

hessian_spatq(obj, fit)

Arguments

obj

A spatq ADFun, as returned by prepare_adfun or make_sim_adfun

fit

Previous fit to use as starting values

optcontrol

a

bias.correct

Use bias correction for sdreport?

bias.correct.control

Control list for bias.correct

getJointPrecision

Return the joint fixed and random effect precision matrix from sdreport?

...

additional arguments to pass to sdreport

Value

An optimization object, report list, or sdreport list

Functions

  • report_spatq: Get object report

  • sdreport_spatq: Get object sdreport

  • hessian_spatq: Get finite difference Hessian

Author(s)

John Best


jkbest2/spatq documentation built on Sept. 22, 2022, 3:22 a.m.