power.lwyy.test {agpower} | R Documentation |
Power calculations for one-sided two-sample test of LWYY model parameter.
Description
Function to compute power at one-sided Type I control level alp/2
or
determine parameters to target given power to test the hypotheses
H0: RR = 1
vs HA: RR < 1
for the LWYY (Andersen-Gill with robust standard
errors) model.
Usage
power.lwyy.test(
N = NULL,
RR = NULL,
bta1 = NULL,
thta,
L = NULL,
tau = NULL,
lam = NULL,
alp = 0.05,
pow = NULL,
ar = 0.5,
frailty.type = c("unblind", "blind"),
lam.type = c("base", "pool")
)
Arguments
N |
Sample size. |
RR , bta1 |
Rate ratio, log-transform of rate ratio. Provide at most one of RR and bta1. |
thta |
Variance of frailty parameter. |
L |
Number of events. |
tau |
Expected follow-up time. |
lam |
Event rate. If lam.type = "base", it is the event rate for control. If lam.type = "pool", it is the pooled rate. |
alp |
Two-sided alpha-level. |
pow |
Target power. |
ar |
Allocation ratio (Number control / Total) |
frailty.type |
Indicates whether frailty variance is based on blinded information ("blind") or unblinded ("unblind"). Default "unblind". |
lam.type |
Indicates whether event rate is based on control rate ("base") or pooled rate ("pool"). Ignored if lam = NULL. Default "base". |
Details
An object of class "power.lwyytest" has the following components:
-
method
: Description of the test. -
N
: Total sample size.N = Nc + Nt
, whereNc = ar * N
is the number on control andNt = (1-ar) * N
is the number on treatment. -
RR
,RRCV
: Rate ratio powered for and critical value for rate ratio. -
bta1
,bta1CV
: The log ofRR
,RRCV
. -
thta
: The variance of the frailty parameter. -
thtap
: If frailty.type = "blind", the input variance from a blinded source. -
L
: Number of events. Note that all else being equal, an increase (decrease) inN
requires a decrease (increase) inL
. -
tau
,lam0
: The mean follow-up time and control event rate. Note iftau = 1
, thenlam0
may be interpreted as mean cumulative intensity on control. -
lamp
: If lam.type = "pool" and argumentlam
is not null, the input rate from a blinded source. -
alp
:alp/2
is the one-sided Type I control level of the testH0: RR = 1
vsHA: RR < 1
. -
pow
: Power of the test. -
ar
: Allocation to control ratioNc/N
. -
note
: Set of key notes about the assessment.
Value
An object of class "power.lwyytest", a list of arguments, including those computed, with method
and note elements
.
Examples
x = power.lwyy.test(N = 1000, RR = 0.8, thta = 1, L = 1000, tau = 0.9, alp = 0.05, ar = 0.5)
print(x)
x = power.lwyy.test(N = 1000, RR = 0.8, thta = 1, tau = 0.9, lam = 1.23, alp = 0.05, ar = 0.5)
print(x)
x = power.lwyy.test(N = 1000, RR = 0.8, thta = 1, tau = NULL, lam = 1.23, alp = 0.05, ar = 0.5)
print(x, digits = 3)