View source: R/lrt_stationarity_cat.R
| run_stationarity_tests_cat | R Documentation |
Performs tests for time-invariance and stationarity constraints. For
order = 1, the stationarity test corresponds to strict stationarity;
for order > 1, it tests marginal-constancy plus time-invariant
transitions.
Currently supports complete data only.
run_stationarity_tests_cat(
y,
order = 1,
blocks = NULL,
homogeneous = TRUE,
n_categories = NULL,
test = c("lrt", "score", "mlrt")
)
y |
Integer matrix with n_subjects rows and n_time columns. Each entry should be a category code from 1 to c. |
order |
Antedependence order p. Default is 1. |
blocks |
Optional integer vector of length n_subjects specifying group membership. |
homogeneous |
Logical. If TRUE (default), parameters are shared across all groups. |
n_categories |
Number of categories. If NULL, inferred from data. |
test |
Type of test statistic. One of |
A list containing:
Result of test_timeinvariance_cat
Result of test_stationarity_cat
Summary data frame
y <- simulate_cat(200, 6, order = 1, n_categories = 2)
result <- run_stationarity_tests_cat(y, order = 1)
print(result$table)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.