powerLongFull {powerMediation}R Documentation

Power calculation for longitudinal study with 2 time point

Description

Power calculation for testing if mean changes for 2 groups are the same or not for longitudinal study with 2 time point.

Usage

powerLongFull(delta, 
              sigma1, 
              sigma2, 
              n, 
              rho = 0.5, 
              alpha = 0.05)

Arguments

delta

absolute difference of the mean changes between the two groups: δ=μ1μ2\delta=|\mu_1 - \mu_2| where μ1\mu_1 is the mean change over time tt in group 1, μ2\mu_2 is the mean change over time tt in group 2.

sigma1

the standard deviation of baseline values within a treatment group

sigma2

the standard deviation of follow-up values within a treatment group

n

sample size per group

rho

correlation coefficient between baseline and follow-up values within a treatment group.

alpha

Type I error rate.

Details

The power formula is based on Equation 8.31 on page 336 of Rosner (2006).

power=Φ(Z1α/2+δnσd2) power=\Phi\left(-Z_{1-\alpha/2}+\frac{\delta\sqrt{n}}{\sigma_d \sqrt{2}}\right)

where σd=σ12+σ222ρσ1σ2\sigma_d = \sigma_1^2+\sigma_2^2-2\rho\sigma_1\sigma_2, δ=μ1μ2\delta=|\mu_1 - \mu_2|, μ1\mu_1 is the mean change over time tt in group 1, μ2\mu_2 is the mean change over time tt in group 2, σ12\sigma_1^2 is the variance of baseline values within a treatment group, σ22\sigma_2^2 is the variance of follow-up values within a treatment group, ρ\rho is the correlation coefficient between baseline and follow-up values within a treatment group, and ZuZ_u is the u-th percentile of the standard normal distribution.

We wish to test μ1=μ2\mu_1 = \mu_2.

Value

power for testing for difference of mean changes.

Note

The test is a two-sided test. For one-sided tests, please double the significance level. For example, you can set alpha=0.10 to obtain one-sided test at 5% significance level.

Author(s)

Weiliang Qiu stwxq@channing.harvard.edu

References

Rosner, B. Fundamentals of Biostatistics. Sixth edition. Thomson Brooks/Cole. 2006.

See Also

ssLong, ssLongFull, powerLong.

Examples

    # Example 8.33 on page 336 of Rosner (2006)
    # power=0.80
    powerLongFull(delta=5, sigma1=15, sigma2=15, n=85, rho=0.7, alpha=0.05)

[Package powerMediation version 0.3.4 Index]