CI.BE | R Documentation |
Utility function to calculate the 1–2α CI given point estimate, CV, and n for the various designs covered in this package.
CI.BE(alpha = 0.05, pe, CV, n, design = "2x2", robust = FALSE)
alpha |
Type I error probability, significance level. Defaults to 0.05. |
pe |
Point estimate (GMR). |
CV |
Coefficient of variation as ratio (not percent). |
n |
Total number of subjects if a scalar is given. |
design |
Character string describing the study’s design. |
robust |
Defaults to |
Returns the 1–2α
confidence interval.
Returns a vector with named elements lower
, upper
if
arguments pe
and CV
are scalars, else a matrix with
columns lower
, upper
is returned.
The function assumes an evaluation using log-transformed data.
The function assumes equal variances in case of design="parallel"
and the higher order crossover designs.
The implemented formula covers balanced and unbalanced designs.
Whether the function vectorizes properly is not thoroughly tested.
D. Labes
# 90% confidence interval for the 2x2 crossover
# n(total) = 24
CI.BE(pe = 0.95, CV = 0.3, n = 24)
# should give
# lower upper
# 0.8213465 1.0988055
# same total number but unequal sequences
CI.BE(pe = 0.95, CV = 0.3, n = c(13, 11))
# lower upper
# 0.8209294 1.0993637
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.