PRMas: Analytical sample size calculation for PRM design problem

Description Usage Arguments Value References

Description

Due to discrete nature of sample size, the power is not a continuous function. This function utilizes the analytical power calculation function PRSap() to compute an approximate sample size n under a given m (number of measures per unit), which has power closest to the desired power.

Usage

1
PRMas(pwr = 0.8, alpha = 0.05, m, s2w, s2b, mu, rho, REML = TRUE)

Arguments

pwr

desired power. Default to 0.8

alpha

desired significance level. Default to 0.05

m

number of repeated measures for each subject

s2w

within subject variation

s2b

between subject variation

mu

mean measure difference

rho

null threshold of acceptable RMS value

REML

using REML instead of MLE. Default to TRUE.

Value

n

computed number of units

pwr

actual power under the computed sample size

References

Bai,Y., Wang,Z., Lystig,T.C., and Wu,B. (2018) Statistical test with sample size and power calculation for paired repeated measures designs of method comparison studies.


baolinwu/SPprm documentation built on May 9, 2019, 8:41 a.m.