diff --git a/NEWS.md b/NEWS.md index 037caf0..46a67dd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -13,8 +13,12 @@ WeightIt News and Updates * `moments` can now be set to 0 when `quantile` is supplied to ensure balance on the quantiles without the moments for the methods that accepts `quantiles`. Thanks to @BERENZ for the suggestion. +* For `ordinal_weightit` objects, `summary()` now has the option to omit thresholds from the output. + * Fixed a bug in `ordinal_weightit()` where the Hessian (and therefore the HC0 robust variance) were calculated incorrectly when come coefficients were aliased (i.e., due to linearly dependent predictors). +* Fixed a bug in `print.summary.glm_weightit()` when confidence intervals were requested. A new printing function is used that produces slightly nicer tables. + * Fixes to vignettes and tests to satisfy CRAN checks. * Minor bug, performance, and readability fixes. diff --git a/man/glm_weightit-methods.Rd b/man/glm_weightit-methods.Rd index 5f93463..686bbaf 100644 --- a/man/glm_weightit-methods.Rd +++ b/man/glm_weightit-methods.Rd @@ -45,6 +45,8 @@ \item{method}{the kind of test used to compare models. Currently only \code{"Wald"} is allowed.} \item{tolerance}{for the Wald test, the tolerance used to determine if models are symbolically nested.} + +\item{thresholds}{\code{logical}; whether to include thresholds in the \code{summary()} output for \code{ordinal_weightit} objects. Default is \code{TRUE}.} } \value{ \code{summary()} returns a \code{summary.glm_weightit()} object, which has its own print method. For \code{coxph_weightit()} objects, the \code{print()} and \code{summary()} methods are more like those for \code{glm} objects then for \code{coxph} objects. diff --git a/man/method_bart.Rd b/man/method_bart.Rd index 1c35286..282c34e 100644 --- a/man/method_bart.Rd +++ b/man/method_bart.Rd @@ -85,7 +85,7 @@ When \code{include.obj = TRUE}, the \code{bart2} fit(s) used to generate the pre \examples{ \dontshow{if (requireNamespace("dbarts", quietly = TRUE)) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -library("cobalt") +\donttest{library("cobalt") data("lalonde", package = "cobalt") #Balancing covariates between treatment groups (binary) @@ -94,7 +94,7 @@ data("lalonde", package = "cobalt") method = "bart", estimand = "ATT")) summary(W1) bal.tab(W1) -\donttest{ + #Balancing covariates with respect to race (multi-category) (W2 <- weightit(race ~ age + educ + married + nodegree + re74, data = lalonde, diff --git a/man/method_super.Rd b/man/method_super.Rd index 0d0b22d..be87193 100644 --- a/man/method_super.Rd +++ b/man/method_super.Rd @@ -111,7 +111,7 @@ When \code{include.obj = TRUE}, the SuperLearner fit(s) used to generate the pre \examples{ \dontshow{if (all(sapply(c("SuperLearner", "MASS"), requireNamespace, quietly = TRUE))) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} -library("cobalt") +\donttest{library("cobalt") data("lalonde", package = "cobalt") #Balancing covariates between treatment groups (binary) @@ -122,26 +122,26 @@ data("lalonde", package = "cobalt") "SL.glm.interaction"))) summary(W1) bal.tab(W1) -\donttest{ - #Balancing covariates with respect to race (multi-category) - (W2 <- weightit(race ~ age + educ + married + - nodegree + re74, data = lalonde, - method = "super", estimand = "ATE", - SL.library = c("SL.glm", "SL.stepAIC", - "SL.glm.interaction"))) - summary(W2) - bal.tab(W2) - - #Balancing covariates with respect to re75 (continuous) - #assuming t(8) conditional density for treatment - (W3 <- weightit(re75 ~ age + educ + married + - nodegree + re74, data = lalonde, - method = "super", density = "dt_8", - SL.library = c("SL.glm", "SL.ridge", - "SL.glm.interaction"))) - summary(W3) - bal.tab(W3) -} + +#Balancing covariates with respect to race (multi-category) +(W2 <- weightit(race ~ age + educ + married + + nodegree + re74, data = lalonde, + method = "super", estimand = "ATE", + SL.library = c("SL.glm", "SL.stepAIC", + "SL.glm.interaction"))) +summary(W2) +bal.tab(W2) + +#Balancing covariates with respect to re75 (continuous) +#assuming t(8) conditional density for treatment +(W3 <- weightit(re75 ~ age + educ + married + + nodegree + re74, data = lalonde, + method = "super", density = "dt_8", + SL.library = c("SL.glm", "SL.ridge", + "SL.glm.interaction"))) +summary(W3) +bal.tab(W3) + #Balancing covariates between treatment groups (binary) # using balance SuperLearner to minimize the maximum # KS statistic @@ -153,7 +153,7 @@ bal.tab(W1) SL.method = "method.balance", criterion = "ks.max")) summary(W4) -bal.tab(W4, stats = c("m", "ks")) +bal.tab(W4, stats = c("m", "ks"))} \dontshow{\}) # examplesIf} } \references{