chisq.pow: Compute the power using a chi-squared test.

Description Usage Arguments Value See Also Examples

Description

chisq.pow computes (via simulation) the power of an experiment that will be analyzed using a chi-square test.

Usage

1
chisq.pow(x, y = NULL, n, r = 10000, alpha = 0.05, conf.level = 0.95)

Arguments

x

a list containing probabilities of each category.

y

an optional list with the probabilities of the second group.

n

sample size.

r

number of simulations to compute power.

alpha

significance threshhold.

conf.level

size of confidence intervals.

mu

mean value according to null hypothesis (default = 0). Only used in one sample t-tests.

Value

The probability of finding p < α with the experiment description.

See Also

chisq.pow, chisq.ppow, chisq.explore, and chisq.pexplore.

Examples

1
2
chisq.pow(x=c(0.2, 0.5, 0.3), n=32) # Chi-squared distribution against chance with 32 observations.
chisq.pow(x=c(0.2, 0.5, 0.3), y=c(0.8, 0.1, 0.1)) # Compare both group with 16 observations in each group.

julianje/mcpa documentation built on May 13, 2019, 6:14 p.m.