simulate.4M: Simulate data from an object of class 'Model4M'.

Description Usage Arguments Value Examples

Description

Simulate data from an object of class Model4M.

Usage

1
2
3
4
## S4 method for signature 'Model4M'
simulate(object, nsim = 1, seed = NULL,
  refit = T, keep.locations = T, keep.data = T, keep.residuals = T,
  Use.HMM = useHMM(object), Set.Model.4M = SetModel4M(object), ...)

Arguments

object

An object of class Model4M.

nsim

How many simulations should there be?

seed

Sets the RNG seed. If NULL, does not alter the current RNG settings.

refit

Should a model be refit to each set of simulated data?

keep.locations

Should the simulated locations be kept?

keep.data

Should the simulated movement data be kept?

keep.residuals

If refit = T, should the residuals be kept?

Use.HMM

If refit = T, should an HMM be fit? Overrides the value stored in model and Set.Model.4M.

Set.Model.4M

If refit = T, which SetModel4M object should be used to refit the data? Use.HMM is controlled separately.

...

Used to pass arguments to internal functions.

Value

Returns an object of class Simulate4M containing simulations and/or results of refitting the simulations.

Examples

1
2
3
4
sealData<- data4M(greyseal)
sealData<- interpolate(sealData,Time.Step = 1)
seal4M2<- fit(sealData)
sim4M2<- simulate(seal4M2,nsim = 5)

lawlerem/markmodmover documentation built on Feb. 12, 2020, 8:30 p.m.