carefulChisq: Calculate Chi-square test between two variables, catch errors...

Description Usage Arguments Value See Also

Description

Given names of two variables x1 and x2 in a data frame df calculate the P value for the Chi-square test between them. Use tryCatch to collect warnings and errors. Monte-Carlo simulation is performed by default for more accurate P values.

Usage

1
carefulChisq(x1, x2, df, sim.p.value = TRUE)

Arguments

x1

name of one factor variable in a data frame df

x2

name of another factor variable in a data frame df

df

data frame

sim.p.value

if it TRUE (default) P value is computed for a Monte carlo test

Value

p.value

P value or the error/warning message

statistic

Test statistic or the error/warning message

test.type

String indicating the test type: chi-square test, monte carlo simulation

See Also

chisq.test


moosik/snorm documentation built on May 23, 2019, 6:11 a.m.