chitest.plot2: Plot the Chi-square Test

Description Usage Arguments Value Examples

View source: R/ch12-fn.R

Description

Plot the Result of Chi-square Test

Usage

1
2
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

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

tjssu/Rstat documentation built on Aug. 8, 2020, 12:38 p.m.