chitest.plot2: Plot the Chi-square Test

Description Usage Arguments Value Examples

View source: R/chitest.plot2.R

Description

Plot the Result of the Chi-square Test

Usage

1
chitest.plot2(stat, df, alp = 0.05, side = "two", pup = 0.999, dig = 4, ppt = 20)

Arguments

stat

Chi-square test statistic

df

Degree of freedom

alp

Level of significance, Default: 0.05

side

Type of the alternative hypothesis, Default: 'two'

pup

Maximum probability for the range of x-axis, Default: 0.999

dig

Number of digits below the decimal point, Default: 4

ppt

Num

Value

None.

Examples

1
2
3
4
5
6
7
8
9
# Goodness-of-fit Test
x <- c(31, 26, 22, 18, 13, 10)
(ct <- chisq.test(x))
chitest.plot2(stat = ct$stat, df = ct$para, side = "up")
# Test of Homogeneity
x <- c(20, 16, 29, 21, 14, 14, 22, 26, 25, 13, 18, 24, 32, 18, 8, 8, 18, 33, 16, 25)
x <- matrix(x, nrow = 4, ncol = 5, byrow = TRUE)
(ct <- chisq.test(x))
chitest.plot2(stat = ct$stat, df = ct$para, side = "up")

jhk0530/Rstat documentation built on Dec. 20, 2021, 11:11 p.m.