edland.linear.power {longpower}R Documentation

Linear mixed model sample size calculations.

Description

This function performs sample size calculations for the linear mixed model with random intercepts and slopes when used to test for differences in fixed effects slope between groups. Input parameters are random effect variance and residual error variance as estimated by a REML fit to representative pilot data or data from a representative prior clinical trial or cohort study.

Usage

edland.linear.power(
  n = NULL,
  delta = NULL,
  power = NULL,
  t = NULL,
  lambda = 1,
  sig2.int = 0,
  sig2.s = NULL,
  sig.b0b1 = 0,
  sig2.e = NULL,
  sig2.int_2 = NULL,
  sig2.s_2 = NULL,
  sig.b0b1_2 = NULL,
  sig2.e_2 = NULL,
  sig.level = 0.05,
  p = NULL,
  p_2 = NULL,
  alternative = c("two.sided", "one.sided"),
  tol = NULL
)

Arguments

n

sample size, group 1

delta

group difference in fixed effect slopes

power

power

t

the observation times

lambda

allocation ratio (sample size group 1 divided by sample size group 2)

sig2.int

variance of random intercepts, group 1

sig2.s

variance of random slopes, group 1

sig.b0b1

covariance of random slopes and intercepts,group 1

sig2.e

residual variance, group 1

sig2.int_2

variance of random intercepts, group 2 (defaults to sig2.int)

sig2.s_2

variance of random slopes, group 2 (defaults to sig2.s)

sig.b0b1_2

covariance of random slopes and intercepts, group 2 (defaults to sig.b0b1)

sig2.e_2

residual variance, group 2 (defaults to sig2.e)

sig.level

type one error

p

proportion vector for group 1, if i indexes visits, p[i] = the proportion whose last visit was at visit i (p sums to 1)

p_2

proportion vector for group 2 (defaults to p)

alternative

one- or two-sided test

tol

not used (no root finding used in this implementation).

Details

Default settings perform sample size / power / effect size calculations assuming equal covariance of repeated measures in the 2 groups, equal residual error variance across groups, equal allocation to groups, and assuming no study subject attrition. Specifically, variance parameters required for default settings are sig2.s, the variance of random slopes, and sig2.e, the residual error variance, both either known or estimated from a mixed model fit by REML to prior data.

This function will also provide sample size estimates for linear mixed models with random intercept only by setting sig2.s = 0 (although, this is not generally recommended).

This function was generalized April 2020. The function is back compatible, although the order of arguments has changed. The new function accommodates different variance parameters across groups, unequal allocation across groups, and study subject attrition (loss to followup), which may also vary across groups.

Value

One of the number of subject required per arm, the power, or detectable effect size given sig.level and the other parameter estimates.

Author(s)

Michael C. Donohue, Steven D. Edland

References

Ard and Edland, S.D. (2011) Power calculations for clinical trials in Alzheimer's disease. Journal of Alzheimer's Disease. 21:369-377.

See Also

lmmpower, diggle.linear.power, liu.liang.linear.power, hu.mackey.thomas.linear.power

Examples


## Not run: 
browseVignettes(package = "longpower")

## End(Not run)
# An Alzheimer's Disease example using ADAS-cog pilot estimates
t <- seq(0,1.5,0.25)
edland.linear.power(delta=1.5, t=t, sig2.s = 24, sig2.e = 10, sig.level=0.05, power = 0.80)


[Package longpower version 1.0.25 Index]