| clean_data | R Documentation |
Prepare and validate data for tseLCA estimation
clean_data(
data,
Y.names,
Zp.names = NULL,
Zo.name = NULL,
incomplete = FALSE,
include.intercept = TRUE,
verbose = FALSE,
Zp.formula = NULL,
Y.levels = NULL
)
data |
A data.frame. |
Y.names |
Character vector of item column names. |
Zp.names |
Character vector of covariate column names, or |
Zo.name |
Single distal outcome column name, or |
incomplete |
Logical. If |
include.intercept |
Logical. Include an intercept in the covariate
design built from |
verbose |
Logical. Print row-drop messages. |
Zp.formula |
One-sided formula for the covariate design (e.g.
|
Y.levels |
Named list of indicator categories, as returned by
|
A named list with:
N_Y x K expanded one-hot indicator matrix for Steps 1 & 2.
N_Y x K design/mask matrix (NULL when incomplete = FALSE).
Integer vector of category counts per item.
Named list of the categories of each item.
Integer indices of rows kept for Steps 1 & 2 (into original n).
n_Z x (Q+1) covariate design matrix, or NULL.
The covariate formula, its terms, and the factor levels used, or NULL.
Positions of Z-complete rows within keep_Y.
N_Zo x 1 distal outcome matrix, or NULL.
Positions of Zo-complete rows within keep_Y.
Indices of Zo-complete rows (into original n).
With covariates, positions of the distal rows within the covariate rows (distal rows then also need complete covariates); otherwise NULL.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.