opt.joint.GRW
), unbiased random walk (opt.joint.URW
), stasis (opt.joint.Stasis
) and OU models (opt.joint.OU
).opt.joint.GRW(x, pool = TRUE, cl = list(fnscale = -1), meth = "L-BFGS-B", hess = FALSE)
opt.joint.URW(x, pool = TRUE, cl = list(fnscale = -1), meth = "L-BFGS-B", hess = FALSE)
opt.joint.Stasis(x, pool = TRUE, cl = list(fnscale = -1), meth = "L-BFGS-B", hess = FALSE)
opt.joint.OU(x, pool = TRUE, cl = list(fnscale = -1), meth = "L-BFGS-B", hess = FALSE)
paleoTS
objectoptim
optim
optim
optim
optim
hess = TRUE
)optim
optim
.
Arguments meth
, cl
, and hess
are passed to optim
; see the help for that function for details.
These are included to allow sophisticated users greater control over the optimization; the defaults seem to work well for most,
but not all sequences. For meth="L-BFGS-B"
, some parameters are constrained to be non-negative, which is useful parameters
which cannot truly be negative, such as vstep
(random walk) and omega
(stasis model).
Initial estimates to start the optimization come in part from analytical solutions based on assuming equal sampling error across
samples and evenly spaced samples in time (functions mle.GRW
, mle.URW
and mle.Stasis
).logL.joint.GRW
, opt.GRW
x<- sim.GRW(ns=30, ms=1, vs=1)
plot(x)
# easier to use fit3models.joint()
m.urw<- opt.joint.URW(x)
m.grw<- opt.joint.GRW(x)
m.sta<- opt.joint.Stasis(x)
cat(m.urw$AICc, m.grw$AICc, m.sta$AICc, "") # print AICc scores
Run the code above in your browser using DataLab