Learn R Programming

JMdesign (version 1.3)

JMdesign-package: Joint Modeling of Longitudinal and Survival Data - Power Calculation

Description

R function for power determination in joint modeling of longitudinal and survival data with k-th order trajectories and unknown variance-covariance matrix Sigma_theta.

Arguments

Author

Emil A. Cornea, Liddy M. Chen, Bahjat F. Qaqish, Haitao Chu, and Joseph G. Ibrahim

Maintainer: Shannon T. Holloway <sthollow@ncsu.edu>

Details

Package:JMdesign
Type:Package
Version:1.1
Date:2014-10-21
License:GPL-2

The package contains the R-function powerLongSurv to perform power calculations for joint modeling of longitudinal and survival data when trajectories are of k-th order and the variance-covariance matrix Sigma_theta is unknown.

References

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

See Also

powerLongSurv, powerLongSurv-class, show-methods

Examples

Run this code
## 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