Learn R Programming

BayesianHybridDesign (version 0.1.0)

fisher: Fisher's Exact Test for a 2x2 Contingency Table

Description

A wrapper for stats::fisher.test to conveniently compare response rates between two arms (experimental and control).

Usage

fisher(Yc, nc, Yt, nt, alternative = "greater")

Value

An object of class htest as returned by stats::fisher.test.

Arguments

Yc

A scalar integer. The number of subjects with a response in the control arm.

nc

A scalar integer. The total number of subjects in the control arm.

Yt

A scalar integer. The number of subjects with a response in the experimental (treatment) arm.

nt

A scalar integer. The total number of subjects in the experimental arm.

alternative

A character string specifying the alternative hypothesis. Must be one of "two.sided" (default), "greater" or "less".

See Also

Examples

Run this code
fisher(Yc=12, nc=40, Yt=19, nt=40)

Run the code above in your browser using DataLab