From 0f18b44d8e2bba4783c97bee05bce184bf9aa03f Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 7 May 2024 15:23:51 +0200 Subject: [PATCH] docs --- NAMESPACE | 1 + R/wtd_mwu.R | 5 +++++ R/wtd_sd.R | 4 ++-- man/weighted_sd.Rd | 7 +++++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 6f37dd39..2872f936 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -120,6 +120,7 @@ export(weighted_correlation) export(weighted_mannwhitney) export(weighted_mean) export(weighted_median) +export(weighted_ranktest) export(weighted_sd) export(weighted_se) export(weighted_ttest) diff --git a/R/wtd_mwu.R b/R/wtd_mwu.R index 03a3fb37..d0e9fa3d 100644 --- a/R/wtd_mwu.R +++ b/R/wtd_mwu.R @@ -67,3 +67,8 @@ weighted_mannwhitney_helper <- function(dat, vars) { mw } + + +#' @rdname weighted_sd +#' @export +weighted_ranktest <- weighted_mannwhitney.formula diff --git a/R/wtd_sd.R b/R/wtd_sd.R index 779d5464..b7db04d8 100644 --- a/R/wtd_sd.R +++ b/R/wtd_sd.R @@ -13,8 +13,8 @@ #' \cr \cr #' \code{weighted_ttest()} computes a weighted t-test, while \code{weighted_mannwhitney()} #' computes a weighted Mann-Whitney-U test or a Kruskal-Wallis test -#' (for more than two groups). \code{weighted_chisqtest()} computes a weighted -#' Chi-squared test for contigency tables. +#' (for more than two groups). `weighted_ranktest()` is an alias for `weighted_mannwhitney()`. +#' \code{weighted_chisqtest()} computes a weighted Chi-squared test for contingency tables. #' #' @param x (Numeric) vector or a data frame. For \code{survey_median()}, \code{weighted_ttest()}, #' \code{weighted_mannwhitney()} and \code{weighted_chisqtest()} the bare (unquoted) variable diff --git a/man/weighted_sd.Rd b/man/weighted_sd.Rd index 38743bf6..3044601e 100644 --- a/man/weighted_sd.Rd +++ b/man/weighted_sd.Rd @@ -15,6 +15,7 @@ \alias{weighted_mannwhitney} \alias{weighted_mannwhitney.default} \alias{weighted_mannwhitney.formula} +\alias{weighted_ranktest} \alias{weighted_sd} \alias{wtd_sd} \alias{weighted_se} @@ -47,6 +48,8 @@ weighted_mannwhitney(data, ...) \method{weighted_mannwhitney}{formula}(formula, data, ...) +weighted_ranktest(formula, data, ...) + weighted_sd(x, weights = NULL) wtd_sd(x, weights = NULL) @@ -134,8 +137,8 @@ hypothesis. \cr \cr \code{weighted_ttest()} computes a weighted t-test, while \code{weighted_mannwhitney()} computes a weighted Mann-Whitney-U test or a Kruskal-Wallis test -(for more than two groups). \code{weighted_chisqtest()} computes a weighted -Chi-squared test for contigency tables. +(for more than two groups). \code{weighted_ranktest()} is an alias for \code{weighted_mannwhitney()}. +\code{weighted_chisqtest()} computes a weighted Chi-squared test for contingency tables. } \note{ \code{weighted_chisq()} is a convenient wrapper for \code{\link{crosstable_statistics}}.