Learn R Programming

ctmm (version 0.3.3)

simulate.ctmm: Predict or simulate from a continuous-time movement model

Description

This function generates an $O(n)$ hidden-Markov Krige or simulation of continuous-time movement models described in Fleming et al (2014) and Fleming et al (2015). I.e., locations of missing or erroneous data can be efficiently predicted or simulated.

Usage

predict(object,...)
"predict"(object,data=NULL,t=NULL,dt=NULL,res=1,...)
"predict"(object,CTMM=NULL,t=NULL,dt=NULL,res=1,...)
simulate(object,nsim=1,seed=NULL,...)
"simulate"(object,nsim=1,seed=NULL,data=NULL,t=NULL,dt=NULL,res=1,...)
"simulate"(object,nsim=1,seed=NULL,CTMM=NULL,t=NULL,dt=NULL,res=1,...)

Arguments

object
A ctmm movement-model or telemetry object, which requires an additional CTMM argument.
data
Optional telemetry object on which the prediction or simulation will be conditioned.
t
Array of numeric time values over which the process will be predicted or simulated.
dt
Timestep to space the prediction or simulation over if data is specified.
res
Average number of locations to predict or simulate per data time.
CTMM
A ctmm movement-model in the same format as the output of ctmm.fit or variogram.fit.
nsim
Not yet supported.
seed
Optional random seed to fix.
...
Unused options.

Value

telemetry object with components t, x, and y.

Details

The prediction or simulation necessarily requires a ctmm model object and optionally can be conditioned off of data, if specified. If no data is provided, the simulation will be purely Gaussian. Details of the movement model parameters can be found in ctmm.fit.

References

C. H. Fleming, J. M. Calabrese, T. Mueller, K.A. Olson, P. Leimgruber, and W. F. Fagan. (2014). From fine-scale foraging to home ranges: A semi-variance approach to identifying movement modes across spatiotemporal scales. The American Naturalist, 183(5), E154-E167.

C. H. Fleming and Y. Subasi and J. M. Calabrese. (2015). A maximum-entropy description of animal movement. Physical Review E, 91, 032107.

See Also

ctmm.fit

Examples

Run this code
#Load package and data
library(ctmm)

#prepare simulation parameters
t <- 1:1000
MODEL <- ctmm(tau=c(100,10),sigma=10,mu=c(0,0))

#simulate data
SIM <- simulate(MODEL,t=t)

#plot data with Gaussian model
plot(SIM,CTMM=MODEL)

Run the code above in your browser using DataLab