Learn R Programming

mcStats (version 0.1.0)

showChiSq.Test: Show Chi-Square Test

Description

show results of a chi-square test visually using chisq.test

Usage

showChiSq.Test(x, y = NULL, p = rep(1/length(x), length(x)),
  simulate.p.value = FALSE, nreps = 2000, verbose = 1)

Arguments

x

a numeric vector or matrix. x and can also be factors

y

a numeric vector

p

a vector of proabilities the same length as x. Used for goodness-of-fit tests. Must be a valid distribution

simulate.p.value

boolean, if TRUE use simulation to estimate p-value

nreps

if simulate.p.value = TRUE number of simulations to complete

verbose

level of visual output, 0 = silent

Value

results of chisq.test call

Examples

Run this code
# NOT RUN {
showChiSq.Test(x = c(1,2,1), y= c(1,2,2))
# }

Run the code above in your browser using DataLab