Minimal error checking is done in this function.
Normal calling function is MARSS_tmb()
which in
turn calls this function. Note when MARSS is updated, the
normal calling function will be MARSS::MARSS()
. Restrictions
MARSStmb(MLEobj)
A properly formatted MARSS model as output by MARSS_tmb()
A MARSS::marssMLE object
No time-varying parameters
Currently only DFA models are coded up
x0 and V0 fixed (stochastic prior)
Q is fixed (not estimated)
This function returns MARSS::marssMLE object. For the iter.record
element
of the object, the following are returned as a list:
obj.function
is the raw output from the TMB::MakeADFun()
call.
opt.output
is the raw output from the optimization call (optim or nlminb)
library(MARSS)
data(lakeWAplankton, package = "MARSS")
phytoplankton <- c("Cryptomonas", "Diatoms", "Greens", "Unicells", "Other.algae")
dat <- as.data.frame(lakeWAplanktonTrans) |>
subset(Year >= 1980 & Year <= 1989) |>
subset(select=phytoplankton) |>
t() |>
MARSS::zscore()
# set-up the model
mod <- MARSS_tmb(dat, model=list(m=3, tinitx=1), form="dfa", fit=FALSE)
# fit
fit <- MARSStmb(mod)