regress | R Documentation |
Computes linear regression for all independent variables on the specified dependent variable. Linear modeling of multiple independent variables uses stepwise regression modeling. If specified, preconditions for (multi-)collinearity and for homoscedasticity are checked.
regress(
data,
dependent_var,
...,
check_independenterrors = FALSE,
check_multicollinearity = FALSE,
check_homoscedasticity = FALSE
)
data |
a tibble or a tdcmm model |
dependent_var |
The dependent variable on which the linear model is fitted. Specify as column name. |
... |
Independent variables to take into account as (one or many) predictors for the dependent variable. Specify as column names. At least one has to be specified. |
check_independenterrors |
if set, the independence of errors among any two cases is being checked using a Durbin-Watson test |
check_multicollinearity |
if set, multicollinearity among all specified independent variables is being checked using the variance inflation factor (VIF) and the tolerance (1/VIF); this check can only be performed if at least two independent variables are provided, and all provided variables need to be numeric |
check_homoscedasticity |
if set, homoscedasticity is being checked using a Breusch-Pagan test |
a tdcmm model
WoJ %>% regress(autonomy_selection, ethics_1)
WoJ %>% regress(autonomy_selection, work_experience, trust_government)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.