pi.var.upper | R Documentation |
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.
pi.var.upper(alpha, var, n1, n2)
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 |
Returns an upper prediction estimate (UL) of an estimated variance in a future study
pi.var.upper(.2, 15, 40, 100)
# Should return:
# UL
# [1] 18.78522
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.