| get_example_statistics {adestr} | R Documentation |
Generate a list of estimators and p-values to use in examples
Description
This function generates a list of objects of class PointEstimator,
IntervalEstimators, and PValues to use in
examples of the analyze function.
Usage
get_example_statistics(
point_estimators = TRUE,
interval_estimators = TRUE,
p_values = TRUE
)
Arguments
point_estimators |
logical indicating whether point estimators should be included in output list |
interval_estimators |
logical indicating whether interval estimators should be included in output list |
p_values |
logical indicating whether p-values should be included in output list |
Details
Point estimators
The following PointEstimators are included:
Confidence intervals
The following IntervalEstimators are included:
P-Values
The following PValues are included:
Value
a list of PointEstimators, IntervalEstimators and
PValue.
Examples
set.seed(123)
dat <- data.frame(
endpoint = c(rnorm(28, 0.3)),
stage = rep(1, 28)
)
analyze(data = dat,
statistics = list(),
data_distribution = Normal(FALSE),
design = get_example_design(),
sigma = 1)
# The results suggest recruiting 32 patients for the second stage
dat <- rbind(
dat,
data.frame(
endpoint = rnorm(32, mean = 0.3),
stage = rep(2, 32)))
analyze(data = dat,
statistics = get_example_statistics(),
data_distribution = Normal(FALSE),
design = get_example_design(),
sigma = 1)
[Package adestr version 1.0.0 Index]