Closed njrockwood closed 3 years ago
> model.2 <- lm(mpg ~ disp + hp, data = mtcars)
> ols_correlations(model.2)
Correlations
-------------------------------------------
Variable Zero Order Partial Part
-------------------------------------------
disp -0.848 -0.606 -0.382
hp -0.776 -0.326 -0.173
-------------------------------------------
The example code for
ols_correlations()
works fine for the example model with 4 predictors, as well as a model with 3, but returns an error for models with 2 predictors. It would make sense to return an error for models with a single predictor, but the function should work for models with 2 predictors. I've had similar issues with usingols_correlations()
on other models with 2 predictors.