The crwSamplePar
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.
crwSamplePar(
object.sim,
method = "IS",
size = 1000,
df = Inf,
grid.eps = 1,
crit = 2.5,
scale = 1,
quad.ask = T,
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
Covariance 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 simulation object from crwSimulator
.
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 crwSamplePar function uses the information in a
crwSimulator
object to create a set of weights for importance
sample-resampling of parameters in a full posterior sample of parameters and
locations using crwPostIS
. This function is usually called
from crwPostIS
. The average user should have no need to call
this function directly.
See demo(northernFurSealDemo)
for example.