The crwSimulator
function uses a fitted model object from
crwMLE
and a set of prediction times to construct a list from which
crwPostIS
will draw a sample from either the posterior
distribution of the state vectors conditional on fitted parameters or a full
posterior draw from an importance sample of the parameters.
crwSimulator(
object.crwFit,
predTime = NULL,
method = "IS",
parIS = 1000,
df = Inf,
grid.eps = 1,
crit = 2.5,
scale = 1,
quad.ask = TRUE,
force.quad
)
List with the following elements:
Longitude coordinate with NA at prediction times
Similar to above for latitude
Indicates prediction types with a "p" or observation times with an "o"
Initial state covariance for latitude
Initial state covariance for longitude
Initial latitude state
Initial longitude state
number of longitude error model parameters
number of latitude error model parameters
vector of time differences
Logical. indicates random drift model
Logical. Indicated stop model fitted
stop model design matrix
Longitude error model design matrix
Latitude error model design matrix
Movement model design matrix
Fixed values for parameters in model fitting
Covaraince matrix for parameter sampling distribution
Cholesky decomposition of Cmat
fitted parameter values
Total number of locations
log likelihood of the fitted model
vector of observation times
names of coordinate vectors in original data
Name of the observation times vector in the original data
A list containing a data frame of parameter vectors and their associated probabilities for a resample
A model object from crwMLE
.
vector of additional prediction times.
Method for obtaining weights for movement parameter samples
Size of the parameter importance sample
Degrees of freedom for the t approximation to the parameter posterior
Grid size for method="quadrature"
Criterion for deciding "significance" of quadrature points (difference in log-likelihood)
Scale multiplier for the covariance matrix of the t approximation
Logical, for method='quadrature'. Whether or not the sampler should ask if quadrature sampling should take place. It is used to stop the sampling if the number of likelihood evaluations would be extreme.
A logical indicating whether or not to force the execution of the quadrature method for large parameter vectors.
Devin S. Johnson
The crwSimulator function produces a list and preprocesses the necessary
components for repeated track simulation from a fitted CTCRW model from
crwMLE
. The method
argument can be one of "IS"
or "quadrature"
. If method="IS" is chosen standard importance
sampling will be used to calculate the appropriate weights via t proposal
with df degrees of freedom. If df=Inf (default) then a multivariate normal
distribution is used to approximate the parameter posterior. If
method="quadrature"
, then a regular grid over the posterior is used
to calculate the weights. The argument grid.eps
controls the
quadrature grid. The arguments are approximately the upper and lower limit
in terms of standard deviations of the posterior. The default is
grid.eps
, in units of 1sd. If object.crwFit
was fitted with
crwArgoFilter
, then the returned list will also include p.out
,
which is the approximate probability that the observation is an outlier.
See demo(northernFurSealDemo)
for example.