levelcross: levelcross

Description Usage Arguments Value

Description

Calculate an empirical level-crossing function to assist in the selection of state boundaries.

Usage

1
levelcross(tseries, evalpts = NULL, npts = 100, lag=1)

Arguments

tseries

A vector of values defining a time series. The times at which these values were collected are not recorded, but knowledge of this feature will inform the selection of the lag.

evalpts

Optional; the points at which the level-crossing function is evaluated can be supplied. If not, evalpts will be automatically determined according to the min/max of tseries and npts.

npts

If evalpts are not supplied, npts points evenly-spaced between the minimum and maximum of tseries will be used.

lag

Number of observations separating points that will be assessed for level crossing.

Value

A list consisting of two elements:

evalpts

Either the supplied or calculated points at which the level-crossing function is evaluated.

lvlcrs

A vector where each element corresponds to the proportion of the data that crossed the corresponding element of evalpts.


vancebee/MarkovSCD documentation built on May 13, 2019, 1:37 a.m.