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 approximate 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. 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 similar to the population variance in the planned study. This variance planning value can be used to revise the planned sample size in the future study.

Usage

pi.var.upper(alpha, var, n1, n2)

Arguments

alpha

alpha value for upper 1-alpha confidence

var

estimated variance from prior study

n1

sample size used to estimate variance

n2

planned sample size of future study

Value

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

Examples

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

# Should return:
#           UL
# [1] 18.78522
 


statpsych documentation built on July 9, 2023, 6:50 p.m.