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.
irt.hte(
n1 = NULL,
n.ratio = 1,
beta = NULL,
sd.x = NULL,
sd.yx = NULL,
alpha = 0.05,
power = NULL,
sides = 2,
v = FALSE
)A list of the arguments (including the computed one).
The sample size for group 1.
The ratio n2/n1 between the sample sizes of two groups; defaults to 1 (equal group sizes).
The regression coefficient for the treatment-by-covariate interaction term.
The standard deviation of the covariate.
The standard deviation of the outcome variable adjusting for the covariate.
The significance level (type 1 error rate); defaults to 0.05.
The specified level of power.
Either 1 or 2 (default) to specify a one- or two- sided hypothesis test.
Either TRUE for verbose output or FALSE (default) to output computed argument only.
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.
irt.hte(n1 = 540, n.ratio = 1, beta = 1, sd.x = 12.7, sd.yx = 71)
Run the code above in your browser using DataLab