Learn R Programming

crawl (version 1.3-2)

crwPredict: Predict animal locations and velocities using a fitted CTCRW model and calculate measurement error fit statistics

Description

The crwMEfilter function uses a fitted model object from crwMLE to predict animal locations (with estimated uncertainty) at times in the original data set and supplimented by times in predTime. If speedEst is set to TRUE, then animal log-speed is also estimated. In addition, the measurement error shock detection filter of de Jong and Penzer (1998) is also calculated to provide a measure for outlier detection.

Arguments

object.crwFit
A model object from crwMLE.
predTime
vector of additional prediction times (numeric or POSIXct).
speedEst
logical. Estimate animal speed or not.
flat
logical. Should the result be returned as a flat data.frame.

Value

  • List with the following elements:
  • originalDataA data.frame with is data merged with predTime.
  • alpha.hat.yA data.frame with predicted state values for each time. First column in latitude location (mu.y), second in velocity (nu.y or theta.y for drift models), and third is drift velocity (gamma.y if specified).
  • alpha.hat.xlongitude state predictions.
  • Var.hat.yarray where Var.hat.y[,,i] is the prediction covariance matrix for alpha.hat.y[,i].
  • Var.hat.xarray or covariance matrices for alpha.hat.x.
  • speed(If speedEst=TRUE) Gives log speed estimates for each time and standard errors based on delta method. If coordinates are polar, units are meters/unit Time, else, units are those specified by the coordinates.
  • fit.testA data.frame of chi-square fit (df=2) statistics and naive (pointwise) p-values.
  • If flat is set to TRUE then a data set is returned with the columns of the original data plus the state estimates, standard errors (se), speed estimates, and the fit statistics and naive p-values.

Details

The requirements for data are the same as those for fitting the model in crwMLE.

References

de Jong, P. and Penzer, J. (1998) Diagnosing shocks in time series. Journal of the American Statistical Association 93:796-806.