Validates se_type and clusters arguments for lm2(). Also handles creating a data frame from vectors if data is not provided.
validate_lm2(
formula,
data = NULL,
se_type = "HC3",
se_type_missing = TRUE,
dots = list(),
calling_env = parent.frame()
)A list containing:
data: The data frame to use (either provided or constructed from vectors)
se_type: The validated/adjusted se_type
has_clusters: Logical indicating if clusters are being used
A formula specifying the model.
An optional data frame containing the variables.
The type of standard error to use.
Logical. Whether se_type was not explicitly provided by user.
Additional arguments passed to lm_robust (to check for clusters).
The environment in which to look for variables if data is not provided.