Skip to content

Commit

Permalink
Doc updates for CRAN checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ngreifer committed Aug 23, 2024
1 parent 2dbf063 commit 1e68e20
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions R/weightit2bart.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
#' See [`method_glm`] for additional references on propensity score weighting more generally.
#'
#' @examplesIf requireNamespace("dbarts", quietly = TRUE)
#' library("cobalt")
#' \donttest{library("cobalt")
#' data("lalonde", package = "cobalt")
#'
#' #Balancing covariates between treatment groups (binary)
Expand All @@ -95,7 +95,7 @@
#' 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,
Expand Down
44 changes: 22 additions & 22 deletions R/weightit2super.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
#' See [`method_glm`] for additional references.
#'
#' @examplesIf all(sapply(c("SuperLearner", "MASS"), requireNamespace, quietly = TRUE))
#' library("cobalt")
#' \donttest{library("cobalt")
#' data("lalonde", package = "cobalt")
#'
#' #Balancing covariates between treatment groups (binary)
Expand All @@ -128,26 +128,26 @@
#' "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
Expand All @@ -159,7 +159,7 @@
#' SL.method = "method.balance",
#' criterion = "ks.max"))
#' summary(W4)
#' bal.tab(W4, stats = c("m", "ks"))
#' bal.tab(W4, stats = c("m", "ks"))}
NULL

weightit2super <- function(covs, treat, s.weights, subset, estimand, focal,
Expand Down

0 comments on commit 1e68e20

Please sign in to comment.