Skip to contents

Performs common assumption checks for survey analyses using base R where possible: Shapiro-Wilk tests, skewness/kurtosis screening, Levene and Brown-Forsythe tests, regression residual checks, VIF, Cook's distance, expected-count checks, and sparse-cell warnings.

Usage

sframe_assumption_results(
  data,
  variables = NULL,
  group = NULL,
  outcome = NULL,
  predictors = NULL,
  table_vars = NULL
)

Arguments

data

A data.frame.

variables

Numeric variables for normality screening.

group

Optional grouping variable for Levene/Brown-Forsythe tests.

outcome

Optional regression outcome.

predictors

Optional regression predictors.

table_vars

Optional 2 categorical variables for expected-count checks.

Value

An object of class sframe_assumption_report. Its apa names the checks that ran, or says that none ran and which arguments each check needs.

Examples

demo <- sframe_demo("tourism_services")
ar <- sframe_assumption_results(demo$responses, variables = c("sat_1", "sat_2"),
                         group = "visit_type")
print(ar)