fail_drop {mmiCATs} | R Documentation |
This internal function is designed to handle failures in cluster-specific model fitting and variable dropping issues in the context of cluster-adjusted robust inference functions. It checks for model fitting failures and whether independent variables have been dropped in the model.
fail_drop(drop, fail, clust.mod, ind_variables)
drop |
Logical; if TRUE, allows the function to return |
fail |
Logical; indicates whether the model fitting process has failed. |
clust.mod |
A model object resulting from cluster-specific fitting. |
ind_variables |
A character vector of independent variable names expected in the model. |
If fail
is TRUE and drop
is FALSE, the function stops with an
error message.
If fail
is TRUE and drop
is TRUE, it returns NA
.
If fail
is FALSE, it returns the coefficients for the independent
variables in clust.mod
.