conditional_probabilities {otsfeatures} | R Documentation |
Computes the conditional probabilities of an ordinal time series
Description
conditional_probabilities
returns a matrix with the conditional
probabilities of an ordinal time series
Usage
conditional_probabilities(series, lag = 1, states)
Arguments
series |
An OTS. |
lag |
The considered lag (default is 1). |
states |
A numerical vector containing the corresponding states. |
Details
Given an OTS of length with range
(
),
, the function computes the
matrix
,
with
, where
is the number of elements equal to
in the realization
and
is the number
of pairs
in the realization
.
Value
A matrix with the conditional probabilities.
Author(s)
Ángel López-Oriona, José A. Vilar
References
Weiß CH (2019). “Distance-based analysis of ordinal data and ordinal time series.” Journal of the American Statistical Association.
Examples
matrix_cp <- conditional_probabilities(series = AustrianWages$data[[100]],
states = 0 : 5) # Computing the matrix of
# conditional probabilities for one series in dataset AustrianWages
[Package otsfeatures version 1.0.0 Index]