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

**Confidence Intervals**

Function Name | Description |

`ciTableProp` | Confidence intervals for binomial proportion, or |

difference between two proportions, following Bacchetti (2010) | |

`ciBinomHalfWidth` | Compute the half-width of a confidence interval for a |

Binomial proportion or the difference between two proportions. | |

`ciBinomN` | Compute the sample size necessary to achieve a specified |

half-width of a confidence interval for a Binomial proportion or | |

the difference between two proportions. | |

`plotCiBinomDesign` | Create plots for a sampling design based on a confidence interval |

for a Binomial proportion or the difference between two proportions. | |

`ciTableMean` | Confidence intervals for mean of normal distribution, or |

difference between two means, following Bacchetti (2010) | |

`ciNormHalfWidth` | Compute the half-width of a confidence interval for the mean of a |

Normal distribution or the difference between two means. | |

`ciNormN` | Compute 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. | |

`plotCiNormDesign` | Create plots for a sampling design based on a confidence interval |

for the mean of a Normal distribution or the difference between | |

two means. | |

`ciNparConfLevel` | Compute the confidence level associated with a nonparametric |

confidence interval for a percentile. | |

`ciNparN` | Compute the sample size necessary to achieve a specified |

confidence level for a nonparametric confidence interval for | |

a percentile. | |

`plotCiNparDesign` | Create plots for a sampling design based on a nonparametric |

confidence interval for a percentile. |

**Hypothesis Tests**

Function Name | Description |

`aovN` | Compute the sample sizes necessary to achieve a |

specified power for a one-way fixed-effects analysis | |

of variance test. | |

`aovPower` | Compute the power of a one-way fixed-effects analysis of |

variance test. | |

`plotAovDesign` | Create plots for a sampling design based on a one-way |

analysis of variance. | |

`propTestN` | Compute the sample size necessary to achieve a specified |

power for a one- or two-sample proportion test. | |

`propTestPower` | Compute the power of a one- or two-sample proportion test. |

`propTestMdd` | Compute the minimal detectable difference associated with |

a one- or two-sample proportion test. | |

`plotPropTestDesign` | Create plots involving sample size, power, difference, and |

significance level for a one- or two-sample proportion test. | |

`tTestAlpha` | Compute 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. | |

`tTestN` | Compute the sample size necessary to achieve a specified |

power for a one- or two-sample t-test. | |

`tTestPower` | Compute the power of a one- or two-sample t-test. |

`tTestScaledMdd` | Compute the scaled minimal detectable difference |

associated with a one- or two-sample t-test. | |

`plotTTestDesign` | Create plots for a sampling design based on a one- or |

two-sample t-test. | |

`tTestLnormAltN` | Compute the sample size necessary to achieve a specified |

power for a one- or two-sample t-test, assuming lognormal | |

data. | |

`tTestLnormAltPower` | Compute the power of a one- or two-sample t-test, assuming |

lognormal data. | |

`tTestLnormAltRatioOfMeans` | Compute the minimal or maximal detectable ratio of means |

associated with a one- or two-sample t-test, assuming | |

lognormal data. | |

`plotTTestLnormAltDesign` | Create plots for a sampling design based on a one- or |

two-sample t-test, assuming lognormal data. | |

`linearTrendTestN` | Compute the sample size necessary to achieve a specified |

power for a t-test for linear trend. | |

`linearTrendTestPower` | Compute the power of a t-test for linear trend. |

`linearTrendTestScaledMds` | Compute the scaled minimal detectable slope for a t-test |

for linear trend. | |

`plotLinearTrendTestDesign` | Create plots for a sampling design based on a t-test for |

linear trend. | |

**Prediction Intervals**

*Normal Distribution Prediction Intervals*

Function Name | Description |

`predIntNormHalfWidth` | Compute the half-width of a prediction |

interval for a normal distribution. | |

`predIntNormK` | Compute the required value of K for |

a prediction interval for a Normal | |

distribution. | |

`predIntNormN` | Compute the sample size necessary to |

achieve a specified half-width for a | |

prediction interval for a Normal | |

distribution. | |

`plotPredIntNormDesign` | Create plots for a sampling design |

based on the width of a prediction | |

interval for a Normal distribution. | |

`predIntNormTestPower` | Compute the probability that at least |

one future observation (or mean) | |

falls outside a prediction interval | |

for a Normal distribution. | |

`plotPredIntNormTestPowerCurve` | Create plots for a sampling |

design based on a prediction interval | |

for a Normal distribution. | |

`predIntNormSimultaneousTestPower`
| Compute 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. | |

`plotPredIntNormSimultaneousTestPowerCurve` | Create plots for a sampling design |

based on a simultaneous prediction | |

interval for a Normal distribution. | |

*Lognormal Distribution Prediction Intervals*

Function Name | Description |

`predIntLnormAltTestPower` | Compute the probability that at least |

one future observation (or geometric | |

mean) falls outside a prediction | |

interval for a lognormal distribution. | |

`plotPredIntLnormAltTestPowerCurve` | Create plots for a sampling design |

based on a prediction interval for a | |

lognormal distribution. | |

`predIntLnormAltSimultaneousTestPower` | Compute 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. | |

`plotPredIntLnormAltSimultaneousTestPowerCurve` | Create plots for a sampling design |

based on a simultaneous prediction | |

interval for a lognormal distribution. | |

*Nonparametric Prediction Intervals*

Function Name | Description |

`predIntNparConfLevel` | Compute the confidence level associated with |

a nonparametric prediction interval. | |

`predIntNparN` | Compute the required sample size to achieve |

a specified confidence level for a | |

nonparametric prediction interval. | |

`plotPredIntNparDesign` | Create plots for a sampling design based on |

the confidence level and sample size of a | |

nonparametric prediction interval. | |

`predIntNparSimultaneousConfLevel` | Compute the confidence level associated with |

a simultaneous nonparametric prediction | |

interval. | |

`predIntNparSimultaneousN` | Compute the required sample size for a |

simultaneous nonparametric prediction | |

interval. | |

`plotPredIntNparSimultaneousDesign` | Create plots for a sampling design based on |

a simultaneous nonparametric prediction | |

interval. | |

`predIntNparSimultaneousTestPower` | Compute the probability that at least one |

set of future observations violates the | |

given rule based on a nonparametric | |

simultaneous prediction interval. | |

`plotPredIntNparSimultaneousTestPowerCurve` | Create plots for a sampling design based on |

a simultaneous nonparametric prediction | |

interval. | |

**Tolerance Intervals**

Function Name | Description |

`tolIntNormHalfWidth` | Compute the half-width of a tolerance |

interval for a normal distribution. | |

`tolIntNormK` | Compute the required value of K for a |

tolerance interval for a Normal distribution. | |

`tolIntNormN` | Compute the sample size necessary to achieve a |

specified half-width for a tolerance interval | |

for a Normal distribution. | |

`plotTolIntNormDesign` | Create plots for a sampling design based on a |

tolerance interval for a Normal distribution. | |

`tolIntNparConfLevel` | Compute the confidence level associated with a |

nonparametric tolerance interval for a specified | |

sample size and coverage. | |

`tolIntNparCoverage` | Compute the coverage associated with a |

nonparametric tolerance interval for a specified | |

sample size and confidence level. | |

`tolIntNparN` | Compute the sample size required for a nonparametric |

tolerance interval with a specified coverage and | |

confidence level. | |

`plotTolIntNparDesign` | Create plots for a sampling design based on a |

nonparametric tolerance interval. | |

EnvStats documentation built on May 30, 2017, 2:24 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.