# model
model <- lm(mpg ~ disp + hp + wt + drat, data = mtcars)
# use fitted values of the model
ols_test_breusch_pagan(model)
# use independent variables of the model
ols_test_breusch_pagan(model, rhs = TRUE)
# use independent variables of the model and perform multiple tests
ols_test_breusch_pagan(model, rhs = TRUE, multiple = TRUE)
# bonferroni p value adjustment
ols_test_breusch_pagan(model, rhs = TRUE, multiple = TRUE, p.adj = 'bonferroni')
# sidak p value adjustment
ols_test_breusch_pagan(model, rhs = TRUE, multiple = TRUE, p.adj = 'sidak')
# holm's p value adjustment
ols_test_breusch_pagan(model, rhs = TRUE, multiple = TRUE, p.adj = 'holm')
Run the code above in your browser using DataLab