Attempting to run this line of code but receiving this error message:
ols_test_breusch_pagan(wls_model)
# Error in ols_test_breusch_pagan(wls_model) :
# could not find function "ols_test_breusch_pagan"
Can anyone help diagnose? I've tried installing packages, etc. Used to work, now not.
Additional Code for Reference:
bptest(wls_model)
# Error in bptest(wls_model) : could not find function "bptest"
plot(fitted(model4), resid(model4), xlab='Fitted Values', ylab='Residuals')
abline(0,0)
wt <- 1/lm(abs(model4$residuals) ~ model4$fitted.values)$fitted.values^2
wls_model <- lm(formula= revenue ~ Resource + Days + Resource.Location.Name.1, data=data1, weights=wt)
summary(wls_model)
Attempted to install olsr packages, different strings of code, etc. Still receiving error (typically run this code without problem so not sure what's going wrong now).