R/survey_package_functions.R

Defines functions svychisq.tbl_svy

#' Chisquared tests of association for survey data.
#' @param formula Model formula specifying margins for the table (using + only)
#' @param design survey object
#' @param formula See details in \code{\link[survey]{svychisq}}
#' @param design See details in \code{\link[survey]{svychisq}}
#' @param na.rm See details in \code{\link[survey]{svychisq}}
#' @param ... See details in \code{\link[survey]{svychisq}}
#' @name svychisq
#' @export
#' @importFrom survey svychisq
NULL

#' @export
svychisq.tbl_svy <- function(formula, design,
                             statistic = c("F", "Chisq", "Wald",
                                           "adjWald", "lincom",
                                           "saddlepoint"),
                             na.rm = TRUE, ...) {
  design$variables <- as.data.frame(design$variables)
  NextMethod()
}

Try the srvyr package in your browser

Any scripts or data that you put into this service are public.

srvyr documentation built on March 7, 2023, 6:39 p.m.