This function checks the sparsity of a design matrix and provides a recommendation if the matrix is considered sparse.
Usage
check_design_matrix_sparsity(
matrix,
sparsity_threshold = 0.9,
min_matrix_size = 50,
name = "checked"
)
Arguments
- matrix
A numeric matrix to be checked for sparsity.
- sparsity_threshold
A numeric value between 0 and 1 indicating the threshold for considering a matrix sparse. Default is 0.9.
- min_matrix_size
An integer indicating the minimum size of the matrix for which to perform the sparsity check. Default is 50.
- name
A character string specifying the name of the design matrix. Default is "checked".
Value
This function is used for its side effect of providing an informational message if the matrix is sparse. It returns NULL invisibly.
See also
Functions used for checking inputs
check_calendar_timestep()
,
check_group()
,
check_group_date_unique()
,
check_max_delay()
,
check_module()
,
check_modules_compatible()
,
check_numeric_timestep()
,
check_observation_indicator()
,
check_quantiles()
,
check_timestep()
,
check_timestep_by_date()
,
check_timestep_by_group()