Constructs a serial dependence plot based on the ordinal Cohen's kappa considering the block distance
Constructs a serial dependence plot based on the ordinal Cohen's kappa considering the block distance
plot_ordinal_cohens_kappa constructs a serial dependence plot of an ordinal time series based on the ordinal Cohen's kappa considering the block distance
UTF-8
states: A numerical vector containing the corresponding states.
max_lag: The maximum lag represented in the plot (default is 10).
alpha: The significance level for the corresponding hypothesis test (default is 0.05).
plot: Logical. If plot = TRUE (default), returns the serial dependence plot. Otherwise, returns a list with the values of the ordinal Cohens's kappa, the critical value and the corresponding p-values.
title: The title of the graph.
bar_width: The width of the corresponding bars.
...: Additional parameters for the function.
Returns
If plot = TRUE (default), returns the serial dependence plot based on the ordinal Cohens's kappa. Otherwise, the function returns a list with the values of the ordinal Cohens's kappa, the critical value and the corresponding p-values.
Details
Constructs a serial dependence plot based on the ordinal Cohens's kappa, κd(l), for several lags, where d is the block distance between ordinal states, that is, d(si,sj)=∣i−j∣ for two states si and sj. A dashed lined is incorporated indicating the critical value of the test based on the following asymptotic approximation (under the i.i.d. assumption):
where T is the series length, fk is the estimated cumulative probability for state sk
and dispd is the DIVC estimate of the dispersion.
Examples
plot_ock <- plot_ordinal_cohens_kappa(series = AustrianWages$data[[100]],states =0:5, max_lag =3)# Representing# the serial dependence plotlist_ck <- plot_ordinal_cohens_kappa(series = AustrianWages$data[[100]],states =0:5, max_lag =3, plot =FALSE)# Obtaining# the values of the ordinal Cohens's kappa, the critical value and the p-values