intpow: Approximate Power of Cox Model Interaction Tests

View source: R/intpow.R

intpowR Documentation

Approximate Power of Cox Model Interaction Tests

Description

Approximates the power of the large sample partial likelihood tests for a treatment by biologic marker interaction test in a Cox model using the normal approximation, assuming exponential distributions.

Usage

intpow(
  n,
  prx,
  prz,
  ri,
  rt,
  rf,
  l0,
  acc.per,
  add.fu,
  alpha2 = 0.05,
  hazs = NULL
)

Arguments

n

Sample size

prx

Proportion randomized to treatment 1 (x=1)

prz

Proportion positive for the marker (z=1)

ri

Interaction ratio: the treatment hazard ratio (treatment 1 / treatment 0) in the marker positive group divided by the treatment hazard ratio in the marker negative group

rt

Average treatment hazard ratio

rf

Average marker hazard ratio (positive/negative)

l0

Overall average hazard

acc.per

Number of time units of accrual

add.fu

Number of time units of follow-up after the end of accrual

alpha2

Two-sided type I error rate for the interaction test

hazs

Vector giving the constant hazard rates in the 4 groups, in the order (x,z)=(0,0),(0,1),(1,0),(1,1)

Details

For a Cox model with two binary factors (x=treatment and z=biologic marker), intpow computes the power of the large sample partial likelihood tests for no interaction. Constant hazards are assumed within each of the 4 covariate combinations.

Let p(x,z) be the sample proportion and h(x,z) be the hazard for treatment x in marker group z. Treatment is assumed independent of the marker, so the proportion of the sample in the 4 combinations is p(0,0)=(1-prx)*(1-prz), p(0,1)=(1-prx)*prz, p(1,0)=prx*(1-prz), p(1,1)=prx*prz.

The hazards can either be given explicitly (argument hazs) or through the ratios and the overall average hazard. The ratios are defined by ri=h(1,1)*h(0,0)/(h(0,1)*h(1,0)), rt=((1-prz)*h(1,0)+prz*h(1,1))/((1-prz)*h(0,0)+prz*h(0,1)), and rf=((1-prx)*h(0,1)+prx*h(1,1))/((1-prx)*h(0,0)+prx*h(1,0)).

Given a set of ratios and an average hazard l0, hazsf computes the hazards in the individual groups to give the specified ratios and to satisfy the constraint p(0,0)*h(0,0)+p(0,1)*h(0,1)+p(1,0)*h(1,0)+p(1,1)*h(1,1)=l0. hazsf is called by intpow if hazs is not specified.

The calculations assume a clinical trial setting with accrual uniform over the period (0,acc.per) and an additional add.fu units of follow-up after completion of accrual. Thus censoring is assumed uniform on (add.fu, add.fu+acc.per).

expinf computes the expected information matrix (per subject) from the Cox partial likelihood containing the covariates x, z, and x*z.

siminf calculates the Wald statistic for the interaction test and the partial likelihood variance estimate of the variance of the interaction coefficient for a single simulated sample from this model.

intpow calculates the power for the Wald test for the null hypothesis that coefficient of the interaction term = 0 using the large sample normal approximation. In large samples, this test is equivalent to the score and partial likelihood ratio tests for this hypothesis.

Value

intpow returns a list with components:

power

The power of the interaction test

hazards

The vector of hazards from hazsf

var

The inverse expected information matrix (per sample)

nevents

The expected number of events in each of the x by z combinations

hazsf returns the vector of hazards meeting the constraints on the ratios and average hazard, in the order (x,z)=(0,0),(0,1),(1,0),(1,1)

expinf returns the expected information matrix per subject

siminf returns a vector containing the Wald test statistic and the estimated variance of the interaction term

Examples

intpow(n = 2800, prx = 0.5, prz = 0.25, ri = 0.6, rt = 0.8, rf = 2,
       l0 = 0.045, acc.per = 2.5, add.fu = 3)


raredd/desmon documentation built on May 7, 2024, 3:46 p.m.