EnvStats (version 2.8.1)

FcnsByCatPower: EnvStats Functions for Power and Sample Size Calculations

Description

The EnvStats functions listed below are useful for power and sample size calculations.

Arguments

Details

Confidence Intervals

Function NameDescription
ciTablePropConfidence intervals for binomial proportion, or
difference between two proportions, following Bacchetti (2010)
ciBinomHalfWidthCompute the half-width of a confidence interval for a
Binomial proportion or the difference between two proportions.
ciBinomNCompute the sample size necessary to achieve a specified
half-width of a confidence interval for a Binomial proportion or
the difference between two proportions.
plotCiBinomDesignCreate plots for a sampling design based on a confidence interval
for a Binomial proportion or the difference between two proportions.
ciTableMeanConfidence intervals for mean of normal distribution, or
difference between two means, following Bacchetti (2010)
ciNormHalfWidthCompute the half-width of a confidence interval for the mean of a
Normal distribution or the difference between two means.
ciNormNCompute the sample size necessary to achieve a specified half-width
of a confidence interval for the mean of a Normal distribution or
the difference between two means.
plotCiNormDesignCreate plots for a sampling design based on a confidence interval
for the mean of a Normal distribution or the difference between
two means.
ciNparConfLevelCompute the confidence level associated with a nonparametric
confidence interval for a percentile.
ciNparNCompute the sample size necessary to achieve a specified
confidence level for a nonparametric confidence interval for
a percentile.
plotCiNparDesignCreate plots for a sampling design based on a nonparametric
confidence interval for a percentile.

Hypothesis Tests

Function NameDescription
aovNCompute the sample sizes necessary to achieve a
specified power for a one-way fixed-effects analysis
of variance test.
aovPowerCompute the power of a one-way fixed-effects analysis of
variance test.
plotAovDesignCreate plots for a sampling design based on a one-way
analysis of variance.
propTestNCompute the sample size necessary to achieve a specified
power for a one- or two-sample proportion test.
propTestPowerCompute the power of a one- or two-sample proportion test.
propTestMddCompute the minimal detectable difference associated with
a one- or two-sample proportion test.
plotPropTestDesignCreate plots involving sample size, power, difference, and
significance level for a one- or two-sample proportion test.
tTestAlphaCompute the Type I Error associated with specified values for
for power, sample size(s), and scaled MDD for a one- or
two-sample t-test.
tTestNCompute the sample size necessary to achieve a specified
power for a one- or two-sample t-test.
tTestPowerCompute the power of a one- or two-sample t-test.
tTestScaledMddCompute the scaled minimal detectable difference
associated with a one- or two-sample t-test.
plotTTestDesignCreate plots for a sampling design based on a one- or
two-sample t-test.
tTestLnormAltNCompute the sample size necessary to achieve a specified
power for a one- or two-sample t-test, assuming lognormal
data.
tTestLnormAltPowerCompute the power of a one- or two-sample t-test, assuming
lognormal data.
tTestLnormAltRatioOfMeansCompute the minimal or maximal detectable ratio of means
associated with a one- or two-sample t-test, assuming
lognormal data.
plotTTestLnormAltDesignCreate plots for a sampling design based on a one- or
two-sample t-test, assuming lognormal data.
linearTrendTestNCompute the sample size necessary to achieve a specified
power for a t-test for linear trend.
linearTrendTestPowerCompute the power of a t-test for linear trend.
linearTrendTestScaledMdsCompute the scaled minimal detectable slope for a t-test
for linear trend.
plotLinearTrendTestDesignCreate plots for a sampling design based on a t-test for
linear trend.

Prediction Intervals

Normal Distribution Prediction Intervals

Function NameDescription
predIntNormHalfWidthCompute the half-width of a prediction
interval for a normal distribution.
predIntNormKCompute the required value of \(K\) for
a prediction interval for a Normal
distribution.
predIntNormNCompute the sample size necessary to
achieve a specified half-width for a
prediction interval for a Normal
distribution.
plotPredIntNormDesignCreate plots for a sampling design
based on the width of a prediction
interval for a Normal distribution.
predIntNormTestPowerCompute the probability that at least
one future observation (or mean)
falls outside a prediction interval
for a Normal distribution.
plotPredIntNormTestPowerCurveCreate plots for a sampling
design based on a prediction interval
for a Normal distribution.
predIntNormSimultaneousTestPowerCompute the probability that at
least one set of future observations
(or means) violates the given rule
based on a simultaneous prediction
interval for a Normal distribution.
plotPredIntNormSimultaneousTestPowerCurveCreate plots for a sampling design
based on a simultaneous prediction
interval for a Normal distribution.

Lognormal Distribution Prediction Intervals

Function NameDescription
predIntLnormAltTestPowerCompute the probability that at least
one future observation (or geometric
mean) falls outside a prediction
interval for a lognormal distribution.
plotPredIntLnormAltTestPowerCurveCreate plots for a sampling design
based on a prediction interval for a
lognormal distribution.
predIntLnormAltSimultaneousTestPowerCompute the probability that at least
one set of future observations (or
geometric means) violates the given
rule based on a simultaneous
prediction interval for a lognormal
distribution.
plotPredIntLnormAltSimultaneousTestPowerCurveCreate plots for a sampling design
based on a simultaneous prediction
interval for a lognormal distribution.

Nonparametric Prediction Intervals

Function NameDescription
predIntNparConfLevelCompute the confidence level associated with
a nonparametric prediction interval.
predIntNparNCompute the required sample size to achieve
a specified confidence level for a
nonparametric prediction interval.
plotPredIntNparDesignCreate plots for a sampling design based on
the confidence level and sample size of a
nonparametric prediction interval.
predIntNparSimultaneousConfLevelCompute the confidence level associated with
a simultaneous nonparametric prediction
interval.
predIntNparSimultaneousNCompute the required sample size for a
simultaneous nonparametric prediction
interval.
plotPredIntNparSimultaneousDesignCreate plots for a sampling design based on
a simultaneous nonparametric prediction
interval.
predIntNparSimultaneousTestPowerCompute the probability that at least one
set of future observations violates the
given rule based on a nonparametric
simultaneous prediction interval.
plotPredIntNparSimultaneousTestPowerCurveCreate plots for a sampling design based on
a simultaneous nonparametric prediction
interval.

Tolerance Intervals

Function NameDescription
tolIntNormHalfWidthCompute the half-width of a tolerance
interval for a normal distribution.
tolIntNormKCompute the required value of \(K\) for a
tolerance interval for a Normal distribution.
tolIntNormNCompute the sample size necessary to achieve a
specified half-width for a tolerance interval
for a Normal distribution.
plotTolIntNormDesignCreate plots for a sampling design based on a
tolerance interval for a Normal distribution.
tolIntNparConfLevelCompute the confidence level associated with a
nonparametric tolerance interval for a specified
sample size and coverage.
tolIntNparCoverageCompute the coverage associated with a
nonparametric tolerance interval for a specified
sample size and confidence level.
tolIntNparNCompute the sample size required for a nonparametric
tolerance interval with a specified coverage and
confidence level.
plotTolIntNparDesignCreate plots for a sampling design based on a
nonparametric tolerance interval.