crwSamplePar {crawl} | R Documentation |
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, size=1000, df=Inf, scale=1)
object.sim |
A simulation object from crwSimulator . |
size |
Size of the parameter importance sample |
df |
Degrees of freedom for the t approximation to the parameter posterior |
scale |
Scale multiplier for the covariance matrix of the t approximation |
The crwSimulator function produces a list and preprocesses the necessary
components for repeated track simulation from a fitted CTCRW model from
crwMLE
. If df=Inf (default) then a multivariate normal distribution
is used to approximate the parameter posterior.
List with the following elements:
x |
Longitude coordinate with NA at prediction times |
y |
Similar to above for latitude |
locType |
Indicates prediction types with a "p" or observation times with an "o" |
P1.y |
Initial state covariance for latitude |
P1.x |
Initial state covariance for longitude |
a1.y |
Initial latitude state |
a1.x |
Initial longitude state |
n.errX |
number of longitude error model parameters |
n.errY |
number of latitude error model parameters |
delta |
vector of time differences |
driftMod |
Logical. indicates random drift model |
stopMod |
Logical. Indicated stop model fitted |
stop.mf |
stop model design matrix |
err.mfX |
Longitude error model design matrix |
err.mfY |
Latitude error model design matrix |
mov.mf |
Movement model design matrix |
fixPar |
Fixed values for parameters in model fitting |
Cmat |
Covaraince matrix for parameter sampling distribution |
Lmat |
Cholesky decomposition of Cmat |
par |
fitted parameter values |
N |
Total number of locations |
loglik |
log likelihood of the fitted model |
Time |
vector of observation times |
coord |
names of coordinate vectors in original data |
Time.name |
Name of the observation times vector in the original data |
thetaSampList |
A list containing a data frame of parameter vectors and their associated probabilities for a resample |
Devin S. Johnson
See northernFurSeal
for example.