irt.hte: Power for detecting treatment effect heterogeneity in an...

irt.hteR Documentation

Power for detecting treatment effect heterogeneity in an individually randomized trial with a continuous outcome

Description

This function performs power and sample size calculations for detecting a treatment-by-covariate interaction effect in a two-arm randomized trial with a continuous outcome. Can solve for power, beta, n1 or n.ratio.

Usage

irt.hte(
  n1 = NULL,
  n.ratio = 1,
  beta = NULL,
  sd.x = NULL,
  sd.yx = NULL,
  alpha = 0.05,
  power = NULL,
  sides = 2,
  v = FALSE
)

Arguments

n1

The sample size for group 1.

n.ratio

The ratio n2/n1 between the sample sizes of two groups; defaults to 1 (equal group sizes).

beta

The regression coefficient for the treatment-by-covariate interaction term.

sd.x

The standard deviation of the covariate.

sd.yx

The standard deviation of the outcome variable adjusting for the covariate.

alpha

The significance level (type 1 error rate); defaults to 0.05.

power

The specified level of power.

sides

Either 1 or 2 (default) to specify a one- or two- sided hypothesis test.

v

Either TRUE for verbose output or FALSE (default) to output computed argument only.

Details

Shieh G (2009) Detecting interaction effects in moderated multiple regression with continuous variables: power and sample size considerations. Organizational Research Methods 12(3):510-528.

Yang S, Li F, Starks MA, Hernandez AF, Mentz RJ, Choudhury KR (2020) Sample size requirements for detecting treatment effect heterogeneity in cluster randomized trials. Statistics in Medicine 39:4218-4237.

Value

A list of the arguments (including the computed one).

Examples

irt.hte(n1 = 540, n.ratio = 1, beta = 1, sd.x = 12.7, sd.yx = 71)

powertools documentation built on April 4, 2025, 5:02 a.m.