Skip to content

Commit

Permalink
suppress warnings in multcomp::glht summary
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbivand committed Nov 24, 2023
1 parent 1eee77d commit 179c54c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: spatialreg
Version: 1.3-1
Date: 2023-11-22
Version: 1.3-2
Date: 2023-11-24
Title: Spatial Regression Analysis
Encoding: UTF-8
Authors@R: c(person("Roger", "Bivand", role = c("cre", "aut"), email = "[email protected]", comment=c(ORCID="0000-0003-2392-6140")),
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Version 1.3-1 (development)
# Version 1.3-2 (development)

* suppress warning from `multcomp::glht` as the test which throws the warning is discarded

# Version 1.3-1 (2023-11-23)

* move `expm` from Imports to Suggests #42

Expand Down
4 changes: 2 additions & 2 deletions R/ML_models.R
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ errorsarlm <- function(formula, data = list(), listw, na.action, weights=NULL,
indirImps <- sum_lm_target$coefficients[(m2+1):m, 1:2, drop=FALSE]
rownames(indirImps) <- rownames(cm)
}
lc <- summary(multcomp::glht(lm.target, linfct=cm))
suppressWarnings(lc <- summary(multcomp::glht(lm.target, linfct=cm)))
totImps <- cbind("Estimate"=lc$test$coefficients, "Std. Error"=lc$test$sigma)
} else if (is.formula(Durbin)) {
#FIXME
Expand Down Expand Up @@ -337,7 +337,7 @@ errorsarlm <- function(formula, data = list(), listw, na.action, weights=NULL,
}
}
rownames(indirImps) <- xn
lc <- summary(multcomp::glht(lm.target, linfct=cm))
suppressWarnings(lc <- summary(multcomp::glht(lm.target, linfct=cm)))
totImps <- cbind("Estimate"=lc$test$coefficients, "Std. Error"=lc$test$sigma)
if (!is.null(zero_fill)) {
if (length(zero_fill) > 0L) {
Expand Down
4 changes: 2 additions & 2 deletions R/SLX_WX.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ lmSLX <- function(formula, data = list(), listw, na.action, weights=NULL, Durbin
indirImps <- sum_lm_model$coefficients[(m2+1):m, 1:2, drop=FALSE]
rownames(indirImps) <- rownames(cm)
}
lc <- summary(multcomp::glht(lm.model, linfct=cm))
suppressWarnings(lc <- summary(multcomp::glht(lm.model, linfct=cm)))
totImps <- cbind("Estimate"=lc$test$coefficients, "Std. Error"=lc$test$sigma)
} else if (is.formula(Durbin)) {
#FIXME
Expand Down Expand Up @@ -174,7 +174,7 @@ lmSLX <- function(formula, data = list(), listw, na.action, weights=NULL, Durbin
}
}
rownames(indirImps) <- xn
lc <- summary(multcomp::glht(lm.model, linfct=cm))
suppressWarnings(lc <- summary(multcomp::glht(lm.model, linfct=cm)))
totImps <- cbind("Estimate"=lc$test$coefficients,
"Std. Error"=lc$test$sigma)
if (!is.null(zero_fill)) {
Expand Down

0 comments on commit 179c54c

Please sign in to comment.