Skip to content

Commit

Permalink
test Durbin for missing in errorsarlm
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbivand committed May 31, 2024
1 parent 564fc66 commit be854d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/ML_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ errorsarlm <- function(formula, data = list(), listw, na.action, weights=NULL,
mf <- eval(mf, parent.frame())
mt <- attr(mf, "terms")
if (attr(mt, "intercept") == 1 && !any(attr(mt, "factors") == 1) &&
(is.formula(Durbin) || isTRUE(Durbin))) {
(!missing(Durbin)) && (is.formula(Durbin) || isTRUE(Durbin))) {
warning("intercept-only model, Durbin invalid and set FALSE")
Durbin <- FALSE
}
Expand Down

0 comments on commit be854d6

Please sign in to comment.