pi.var.upper: Upper prediction limit for an estimated variance

View source: R/statpsych1.R

pi.var.upperR Documentation

Upper prediction limit for an estimated variance

Description

Computes an upper prediction limit for the estimated variance in a future study for a planned sample size. The prediction limit uses a variance estimate from a prior study. Several confidence interval sample size functions in this package require a planning value of the estimated variance that is expected in the planned study. The upper variance prediction limit is useful as a variance planning value for the sample size required to obtain a confidence interval with desired width. This strategy for specifying a variance planning value is useful in applications where the population variance in the prior study is assumed to be very similar to the population variance in the planned study.

Usage

pi.var.upper(alpha, var, n0, n)

Arguments

alpha

alpha value for upper 1-alpha confidence

var

estimated variance from prior study

n0

sample size used to estimate variance

n

planned sample size of future study

Value

Returns an upper prediction estimate (UL) of an estimated variance in a future study

References

\insertRef

Hahn1972statpsych

Examples

pi.var.upper(.05, 15, 40, 100)

# Should return:
#      UL
# 23.9724
 


statpsych documentation built on Sept. 11, 2024, 7:42 p.m.