Learn R Programming

LearnNonparam (version 1.2.7)

ChiSquare: Chi-Square Test on Contingency Table

Description

Performs chi-square test on contingency tables.

Arguments

Super classes

LearnNonparam::PermuTest -> LearnNonparam::ContingencyTableTest -> ChiSquare

Methods

Public methods

Inherited methods


Method new()

Create a new ChiSquare object.

Usage

ChiSquare$new(type = c("permu", "asymp"), n_permu = 10000)

Arguments

type

a character string specifying the way to calculate the p-value.

n_permu

an integer indicating number of permutations for the permutation distribution. If set to 0, all permutations will be used.

Returns

A ChiSquare object.

Examples

Run this code
t <- pmt(
    "table.chisq", n_permu = 0
)$test(Table5.4.2)$print()

t$type <- "asymp"
t

Run the code above in your browser using DataLab