powerPaired2x2 {exact2x2} | R Documentation |
Power for exact McNemar's test
Description
Calculate the power for the exact McNemar's test (i.e., exact2x2
with paired=TRUE
) given the number of pairs
and the probability of a positive response only in the test individual in the pair (pb), and the probability of a positive response only in the control individual in the pair (pc).
Usage
powerPaired2x2(pb, pc, npairs, sig.level = 0.05,
alternative = c("two.sided", "one.sided"),
strict = FALSE, nullOddsRatio = 1, errbound = 10^-6, ...)
Arguments
pb |
probability of a (0,1) response for a pair, meaning negative response in the control individual and a positive response in the test individual |
pc |
probability of a (1,0) response for a pair, meaning positive response in the control individual and a negative response in the test individual |
npairs |
the number of pairs |
sig.level |
significance level (also called alpha-level) |
alternative |
either 'one.sided' or 'two.sided' (see |
strict |
use strict interpretation in two-sided case (i.e., TRUE allows rejections in the 'wrong' direction) |
nullOddsRatio |
null odds ratio, internally passed to |
errbound |
error bound, |
... |
arguments passed to |
Details
When alternative='one.sided'
then the test automatically picks the side that is most powerful.
At this point there is no ssPaired2x2 function.
Value
An object of class 'power.htest' with elements:
power |
power |
npairs |
number of pairs |
pb |
probability of a (control,test)=(0,1) response for a pair |
pc |
probability of a (control,test)=(1,0) response for a pair |
sig.level |
significance level or alpha-level |
alternative |
either one-sided or two-sided |
nullOddsRatio |
null odds ratio (or boundary between null and alternative for one-sided tests) |
note |
notes about calculation (e.g., errbound value) |
method |
description of method |
Examples
powerPaired2x2(.5,.3,npairs=20)