dcrwSimulate: Regressive bridge sampler

Description Usage Arguments Details Value

Description

Generate new tracks from a fitted DCRW model

Usage

1
2
3
dcrwSimulate(fit, fixed = rep(c(TRUE, FALSE, TRUE), c(1, nrow(fit$predicted) -
  2, 1)), fixed.err = NULL, point.check = function(tm, lon, lat) TRUE,
  delta0 = c(0, 0))

Arguments

fit

an object returned by dcrw

fixed

a logical vector indicating which locations in the template path are to be held fixed.

fixed.err

The covariance matrix for fixed points.

point.check

function that accepts a time, longitude and latitude and returns boolean indicating whether the state is acceptable.

delta0

initial increment

Details

Given a fitted dcrw model this function generates a new track of the same length that coincides with the fitted track at the start point and optionally other specified points along the estimated track.

Locations from the fitted track can be marked as fixed with the fixed argument. In the current implementation the first location must always be fixed. The fixed.err parameter specifies the covariance of the error in the fixed points. If this parameter is NULL, the covariance defaults to the innovation covariance Q returned by dcrwModel.

Additional constraints can be placed on the path by rejection sampling through the function point.check. This function must accept a time, longitude and latitude and return a boolean indicating whether the point is acceptable. For example, the track can be constrained to the ocean by supplying a point.check function that compares the state to a land mask and returns FALSE for locations on land.

Tracks are simulated in the plane. There is is no polar correction and without a suitable point.check function, there is nothing prevent the track extending outside the [-90,90] latitudinal limits.

Value

a dataframe representing the simulated track

date

prediction times as POSIXct.

lon

predicted longitude

lat

predicted latitude


SWotherspoon/Marseille documentation built on May 9, 2019, 12:05 p.m.