size.test.mean.ps: Sample size for a test of a paired-samples mean difference

View source: R/statpsych1.R

size.test.mean.psR Documentation

Sample size for a test of a paired-samples mean difference

Description

Computes the sample size required to test a difference in population means with desired power in a paired-samples design. Set the Pearson correlation planning value to the smallest value within a plausible range, and set the variance planning value to the largest value within a plausible range for a conservatively large sample size.

Usage

size.test.mean.ps(alpha, pow, var, es, cor)

Arguments

alpha

alpha level for hypothesis test

pow

desired power

var

planning value of average variance of the two measurements

es

planning value of mean difference

cor

planning value of correlation

Value

Returns the required sample size

Examples

size.test.mean.ps(.05, .80, 1.25, .5, .75) 

# Should return:
#      Sample size
# [1,]          22
 


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