chi_results: Results of Chi2-test in APA standard

Description Usage Arguments Value Author(s) Examples

View source: R/test_results.R

Description

Function to print results of a Chi2-test in APA standard (Chi2(df) = chi2; p = p)

Usage

1

Arguments

x

a numeric vector or a factor

y

a numeric vector or a factor

Value

"Chi2(df) = chi2; p = p"

Author(s)

Dominik Vogel

Examples

1
2
3
4
5
6
7
8
df <- data.frame(id = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10),
                  treatment = factor(c("treated", "treated", "not-treated", "treated",
                                       "treated", "treated", "not-treated",
                                       "treated", "not-treated", "treated")),
                   improvement = factor(c("improved","improved","not-improved","improved",
                                          "improved", "improved", "not-improved",
                                          "not-improved", "not-improved", "improved")))
chi_results(df$treatment, df$improvement)

DominikVogel/vogelR documentation built on May 23, 2019, 4:12 p.m.