crwPredict | R Documentation |
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 supplemented 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.
crwPredict(object.crwFit, predTime = NULL, return.type = "minimal", ...)
object.crwFit |
A model object from |
predTime |
vector of desired prediction times (numeric or POSIXct). Alternatively, a character vector specifying a time interval (see Details). |
return.type |
character. Should be one of |
... |
Additional arguments for testing new features |
The requirements for data
are the same as those for fitting the model
in crwMLE
.
predTime
can be either passed as a separate vector of POSIXct or
numeric values for all prediction times expected in the returned object.
Note, previous versions of crwPredict
would return both times
specified via predTime
as well as each original observed time. This is
no longer the default (see return.type
). If the original data were
provided as a POSIXct type, then crwPredict
can derive a sequence of
regularly spaced prediction times from the original data. This is specified
by providing a character string that corresponds to the by
argument
of the seq.POSIXt
function (e.g. '1 hour', '30 mins').
crwPredict
will round the first observed time up to the nearest unit
(e.g. '1 hour' will round up to the nearest hour, '30 mins' will round up to
the nearest minute) and start the sequence from there. The last observation
time is truncated down to the nearest unit to specify the end time.
There are three possible return types specified with return.type
:
minimal |
a data.frame with a minimal set of columns:
|
flat |
a data set is returned with the columns of the original data plus the state estimates, standard errors (se), and speed estimates |
list |
List with the following elements: |
originalData |
A data.frame with |
alpha.hat |
Predicted state |
Var.hat |
array where |
Devin S. Johnson
de Jong, P. and Penzer, J. (1998) Diagnosing shocks in time series. Journal of the American Statistical Association 93:796-806.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.