study.exact: Compute the exact confidence interval and p-value based on a...

Description Usage Arguments Value Author(s) Examples

View source: R/study.exact.R

Description

Compute the exact confidence interval and p-value for risk difference, risk ratio, rate difference and rate ratio based on data from an individual study.

Usage

1
2
3
study.exact(x1, x2, n1, n2, type="risk difference", BB.grdnum=2000, cov.prob=0.95, 

midp=T)

Arguments

x1

The number of events in arm 1.

x2

The number of events in arm 2.

n1

The sample size of arm 1 when type="risk difference" or "risk ratio"; The total follow-up time for patients in arm 1 when type="rate difference" or "rate ratio".

n2

The sample size of arm 2 when type="risk difference" or "risk ratio"; The total follow-up time for patients in arm 2 when type="rate difference" or "rate ratio".

type

Indicate the parameter of interest: it can be "risk difference" (the difference of two binomial proportions); "risk ratio" (the ratio of two binomial proportions); "rate difference" (the difference of two Poission rates) and "rate ratio" (the ratio of two Poisson rates).

BB.grdnum

The number of grid points used in searching the limits of the confidence interval

cov.prob

The coverage level of the constructed confidence interval

midp

The binary indicator for if the mid-p value is used in constructing the exact confidence interval.

Value

est

the point estimator

lower

the lower end of the confidence interval

upper

the upper end of the confidence interval

status

1 if the confidence interval is within the pre-specified range and 0 otherwise

p

the p value

Author(s)

Yilei Yu

Examples

1
2
3
4
study.exact(1, 2, 12, 10, BB.grdnum=100, type="risk difference")
study.exact(1, 2, 12, 10, BB.grdnum=100, type="rate difference")
study.exact(1, 2, 12, 10, BB.grdnum=100, type="risk ratio")
study.exact(1, 2, 12, 10, BB.grdnum=100, type="rate ratio")

exactmeta documentation built on May 2, 2019, 3:24 a.m.