Compute the power in joint modeling of longitudinal and survival data when the variance-covariance matrix Sigma_Theta is unknown and the trajectories are order k.
The function computes power for a one-sided test, either
It creates a powerLongSurv
object.
powerLongSurv(N, nevents, tmedian, meantf, p, t, SigmaTheta, sigmae_2, ordtraj,
beta = 0, alpha = 0.05, tol = 1.5e-8)
An object of S4 class powerLongSurv
,
which has the following 12 components
character string
character string
numeric vector
numeric vector
integer
integer
numeric
numeric
numeric
numeric matrix
integer
numeric matrix
numeric
numeric
numeric
numeric specifying the total sample size; minimum 20.
numeric specifying the number of events; at least 20 and at most N.
numeric specifying the median survival time; positive
numeric specifying the mean follow-up time; positive and no greater than max(t).
numeric vector of estimated subject proportions with 2,3,... measurements, respectively, zero proportions allowed.
numeric vector of measurement times, distinct positive components;
same length as p
.
numeric matrix specifying the covariance matrix Sigma_Theta
numeric specifying the measurement error; positive.
integer specifying the order of trajectories, must be less the order of Sigma_Theta
numeric specifying the effect of the trajectory; default value 0.
numeric, strictly between 0.0 and 1.0, specifying the Type-I Error (2-sided), default value 0.05.
numeric, For floating point objects x and y, if |x-y| <= tol, x==y. Passed to R function all.equal.
Emil A. Cornea, Liddy M. Chen, Bahjat F. Qaqish, Haitao Chu, and Joseph G. Ibrahim
Maintainer: Shannon T. Holloway <sthollow@ncsu.edu>
The function powerLongSurv
is used to calculate the power in joint
modeling of longitudinal and survival data.
L. M. Chen, J. G. Ibrahim, and H. Chu. Sample size and power determination in joint modeling of longitudinal and survival data. Statist. Med. 2011, 30 2295-2309
powerLongSurv-class
, show-methods
## Example 1.
## **********
## Input elements of Sigma_theta in forumula 4.6;
SigmaTheta <- matrix(c(1.2,0.0,0.0,0.0,0.7,0.0,0.0,0.0,0.8),nrow=3,ncol=3)
N <- 200; # Total sample size;
nevents <- 140; # Number of events;
tmedian <- 0.7; # median survival;
meantf <- 1.4; # mean follow-up time;
beta <- 0.2; # Effect of the trajectory;
alpha <- 0.05;# Type-I Error (2-sided);
sigmae_2 <- 0.09; # measurement error;
## schedule of measurement;
t <- c(0.4, 0.8, 1.2, 1.6, 2) ; # maximum 2 year follow-up;
## Input estimated proportion subjects with 2,3,4,5,6 measurements;
## This is \xi in formula 4.6;
## The data is obtained from the simulated data for the calculation in table 2;
p <- c(0.3, 0.4, 0.15, 0.1, 0.05);
## Input the order of trajectories
ordtraj <- 1 ## linear trajectories
## Call function
## Linear Trajectories
pLSl <- powerLongSurv(N, nevents, tmedian, meantf, p, t, SigmaTheta,
sigmae_2, ordtraj, beta, alpha=0.05)
pLSl
show(pLSl)
unclass(pLSl)
## Constant Trajectories
powerLongSurv(N, nevents, tmedian, meantf, p, t, SigmaTheta, sigmae_2,
ordtraj=0, beta, alpha=0.05)
## Quadratic Trajectories
powerLongSurv(N, nevents, tmedian, meantf, p, t, SigmaTheta, sigmae_2,
ordtraj=2, beta, alpha=0.05)
## ***************************************************************************
## Example 2.
## **********
## Input elements of Sigma_theta in forumula 4.6;
SigmaTheta <- matrix(c(1.2,0.0,0.0,0.0,0.7,0.0,0.0,0.0,0.8),nrow=3,ncol=3)
N <- 200; # Total sample size;
nevents <- 140; # Number of events;
tmedian <- 0.7; # median survival;
meantf <- 1.4; # mean follow-up time;
beta <- 0.2; # Effect of the trajectory;
alpha <- 0.05;# Type-I Error (2-sided);
sigmae_2 <- 0.09; # measurement error;
## schedule of measurement;
t <- c(0.4, 0.8, 1.2, 1.6);
## Input estimated proportion subjects with 2,3,4,5,6 measurements;
## This is \xi in formula 4.6;
## The data is obtained from the simulated data for the calculation in table 2;
p <- c(0.3, 0.4, 0.2, 0.1);
## Input the order of trajectories
ordtraj <- 2 ## quadratic trajectories
## Call function
## Quadratic Trajectories
pLSq <- powerLongSurv(N,nevents,tmedian,meantf,p,t,SigmaTheta,sigmae_2,ordtraj,beta, alpha = 0.05)
pLSq
show(pLSq)
unclass(pLSq)
## Constant Trajectories
powerLongSurv(N, nevents, tmedian, meantf, p, t, SigmaTheta, sigmae_2,
ordtraj=0, beta, alpha=0.05)
## Linear Trajectories
powerLongSurv(N, nevents, tmedian, meantf, p, t, SigmaTheta, sigmae_2,
ordtraj=1, beta, alpha=0.05)
Run the code above in your browser using DataLab