size.ci.mean.ps: Sample size for a paired-samples mean difference confidence...

View source: R/statpsych1.R

size.ci.mean.psR Documentation

Sample size for a paired-samples mean difference confidence interval

Description

Computes the sample size required to estimate a difference in population means with desired confidence interval precision in a paired-samples design. This function requires a planning value for the average of the variances for the two measurements. Set the Pearson correlation planning value to the smallest value within a plausible range for a conservatively large sample size. Set the variance planning value to the largest value within a plausible range for a conservatively large sample size.

Usage

size.ci.mean.ps(alpha, var, cor, w)

Arguments

alpha

alpha level for 1-alpha confidence

var

planning value of average variance of the two measurements

cor

planning value of correlation between measurements

w

desired confidence interval width

Value

Returns the required sample size

Examples

size.ci.mean.ps(.05, 265, .8, 10)

# Should return:
# Sample size
#          19
 


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