spatq_fit: Fit a spatq model by maximum likelihood

View source: R/fit_spatq.R

spatq_fitR Documentation

Fit a spatq model by maximum likelihood

Description

Use nonlinear optimization routines from nlminb or optim to fit. Can include constraints where appropriate for the chosen method. If method = "nlminb" is used, the result is restructure to match optim output using fix_nlminb_fit.

Usage

spatq_fit(
  obj,
  fit = NULL,
  method = "nlminb",
  bounds = list(lower = -Inf, upper = Inf),
  control = list()
)

Arguments

obj

A spatq_obj

fit

Previous fit, use results as starting values

method

Optimization method to use, as a string. Valid options are "nlminb" or one of the multivariate optim methods.

bounds

List with "upper" and "lower" parameter bounds; will error for unconstrained optimization methods

control

list of control arguments to pass to nlminb or optim

Value

A spatq_fit object containing the optimization output and optimization diagnostics

Author(s)

John K Best


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