Computes the marginal probabilities of an ordinal time series
Computes the marginal probabilities of an ordinal time series
marginal_probabilities returns a vector with the marginal probabilities of an ordinal time series
UTF-8
marginal_probabilities(series, states)
Arguments
series: An OTS (numerical vector with integers).
states: A numerical vector containing the corresponding states
Returns
A vector with the marginal probabilities.
Details
Given an OTS of length T with range S={s0,s1,s2,…,sn} (s0<s1<s2<…<sn), Xt={X1,…,XT}, the function computes the vector p=(p0,…,pn), with pi=TNi, where Ni is the number of elements equal to si in the realization Xt.
Examples
vector_mp <- marginal_probabilities(series = AustrianWages$data[[100]],states =0:5)# Computing the vector of# marginal probabilities for one series in dataset AustrianWages