Learn R Programming

c212 (version 0.98)

c212.fisher.test: Fisher Exact Test

Description

Perform a Fisher exact test on clinical trial data.

Usage

c212.fisher.test(trial.data, alternative = "two.sided")

Arguments

trial.data

A file or data frame containing the trial data. The data frame must contain the columns B (body-system), AE (adverse event), Group (1 - control, 2 treatment), Count (total number of events), Total (total number of participants).

alternative

Alternative hypothesis may be "two.sided", "greater" or "less". The default is "two.sided".

Value

Dataframe containing the results of the test. A copy of the input dataframe with an additional column p containing the p-value from the test.

Details

Perform a Fisher exact test on clinical trial data.

Examples

Run this code
# NOT RUN {
data(c212.trial.data)
f = c212.fisher.test(c212.trial.data)

# }
# NOT RUN {
data(c212.trial.data)
f = c212.fisher.test(c212.trial.data)
head(f)
          B j       AE            p
1 Bdy-sys_1 1 Adv-Ev_1 2.892876e-01
2 Bdy-sys_2 1 Adv-Ev_2 5.333164e-03
3 Bdy-sys_2 2 Adv-Ev_3 1.601311e-02
4 Bdy-sys_2 3 Adv-Ev_4 6.502108e-01
5 Bdy-sys_2 4 Adv-Ev_5 7.437946e-01
6 Bdy-sys_3 1 Adv-Ev_6 3.746249e-08

# }

Run the code above in your browser using DataLab