chitest.plot2: Plot the Chi-square Test

View source: R/ch12-fn.R

chitest.plot2R Documentation

Plot the Chi-square Test

Description

Plot the Result of Chi-square Test

Usage

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

Number of plot points in the critical region, Default: 20

Value

None.

Examples

# 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")

adoocavo/Rstat_M1 documentation built on March 19, 2022, 3:34 a.m.