Learn R Programming

SMARTAR (version 1.1.0)

smartsize: sample size calculation

Description

Return a message that contains the estimated strategy-specified means and their confidence interval, as well as the asymptotic variance-covariance matrix for these estimates.

Usage

smartsize(
  sim = NULL,
  delta = NULL,
  df = NULL,
  alpha = 0.05,
  beta = 0.2,
  global = TRUE,
  family = c("gaussian", "binomial")[1]
)

Arguments

sim

A numeric matrix containing the values of treatment sequence-specific parameters to generate the SMART data, including the values of stage-specific treatments, intermediate outcome and final primary outcome.

delta

The standardized effect size for sample size calculation.

df

The degrees of freedom for the chisquare test.

alpha

Type I error rate.

beta

Type II error rate.

global

If TRUE then power the SMART based on a global test, otherwise power the SMART based on a pairwise test. The default is TRUE

family

A character string to specify the type of final primary outcome. The default is family=<U+201C>gaussian<U+201D>, which refers to the continuous primary outcome. If family=<U+201D>binomial<U+201D> then the primary outcome will be treated as binary variable.

Value

Standardized effect size and total sample size for SMART

  • delta: standardized effect size

  • n: total sample size

References

Murphy, S. A. (2005). An experimental design for the development of adaptive treatment strategies. Statistics in Medicine. 24(10): 1455-1481.

Ogbagaber S. B., Karp, J., and Wahed A.S. (2015). Design of sequentially randomization trials for testing adaptive treatment strategies. Statistics in Medicine. DOI: 10.1002/sim.6747.