myX2c: The Monte-Carlo chi-square test...

Description Usage Arguments Details Value

View source: R/citest.R

Description

The Monte-Carlo chi-square test

Usage

1
myX2c(x, y, C, B=5000)

Arguments

x

the first variable (vector of values)

y

the second variable (vector of values)

C

the variables to condition on - either a vector, or a list of vectors

B

the number of Monte Carlo runs (defaults to 5000 if given NULL)

Details

This is the reimplementation of Monte Carlo chi-square test to be sure it works correctly. The Monte Carlo loop is implemented using Rcpp and uses the R function r2dtable() to generate random contingency tables with fixed marginals.

Value

the P-value of the test


ddgraph documentation built on May 31, 2017, 11:51 a.m.

Search within the ddgraph package
Search all R packages, documentation and source code