sim_post: simulate from the posterior of a 'ssm' fit.

View source: R/sim_post.R

sim_postR Documentation

simulate from the posterior of a ssm fit.

Description

simulates track locations from the joint precision matrix of a ssm model fit. Currently, the joint precision of the SSM movement parameters is not included (ie. a full posterior simulation).

Usage

sim_post(x, what = "predicted", reps = 1, sim_only = FALSE)

Arguments

x

a ssm fit object with class ssm_df

what

simulate fitted or predicted locations

reps

number of replicate tracks to simulate from the ssm model fit object

sim_only

logical, do not include ssm estimated locations in output (default is FALSE)

Value

a fG_sim_post object containing the paths simulated from a ssm fit object

Examples

fit <- fit_ssm(ellie, model = "crw", time.step = 24)
psim <- sim_post(fit, "p", reps = 10)
plot(psim, type = "lines")


ianjonsen/foieGras documentation built on Jan. 17, 2025, 11:15 p.m.