crwPostIS | R Documentation |
The crwPostIS draws a set of states from the posterior distribution of a fitted CTCRW model. The draw is either conditioned on the fitted parameter values or "full" posterior draw with approximated parameter posterior
crwPostIS(object.sim, fullPost = TRUE, df = Inf, scale = 1, thetaSamp = NULL)
object.sim |
A crwSimulator object from |
fullPost |
logical. Draw parameter values as well to simulate full posterior |
df |
degrees of freedom for multivariate t distribution approximation to parameter posterior |
scale |
Extra scaling factor for t distribution approximation |
thetaSamp |
If multiple parameter samples are available in object.sim,
setting |
The crwPostIS draws a posterior sample of the track state matrices. If fullPost was set to TRUE when the object.sim was build in crwSimulator then a pseudo-posterior draw will be made by first sampling a parameter value from a multivariate t distribution which approximates the marginal posterior distribution of the parameters. The covariance matrix from the fitted model object is used to scale the MVt approximation. In addition, the factor "scale" can be used to further adjust the approximation. Further, the parameter simulations are centered on the fitted values.
To correct for the MVt approximation, the importance sampling weight is also supplied. When calculating averages of track functions for Bayes estimates one should use the importance sampling weights to calculate a weighted average (normalizing first, so the weights sum to 1).
List with the following elements:
alpha.sim.y |
A matrix a simulated latitude state values |
alpha.sim.x |
Matrix of simulated longitude state values |
locType |
Indicates prediction types with a "p" or observation times with an "o" |
Time |
Initial state covariance for latitude |
loglik |
log likelihood of simulated parameter |
par |
Simulated parameter value |
log.isw |
non normalized log importance sampling weight |
Devin S. Johnson
See demo(northernFurSealDemo)
for example.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.