Package 'NPHMC'

Title: Sample Size Calculation for the Proportional Hazards Mixture Cure Model
Description: An R-package for calculating sample size of a survival trial with or without cure fractions.
Authors: Chao Cai, Songfeng Wang, Wenbin Lu, Jiajia Zhang
Maintainer: Chao Cai <[email protected]>
License: GPL-2
Version: 2.3
Built: 2024-11-29 08:46:01 UTC
Source: CRAN

Help Index


An R-package for Estimating Sample Size of Proportional Hazards Mixture Cure Model

Description

Estimating sample size for survival trial with or without cure fractions

Details

Package: NPHMC
Type: Package
Version: 2.2
Date: 2013-09-23
License: GPL-2
LazyLoad: yes

Author(s)

Chao Cai, Songfeng Wang, Wenbin Lu, Jiajia Zhang

Maintainer: Chao Cai <[email protected]>

References

S. Wang, J. Zhang, and W. Lu. Sample size calculation for the proportional hazards cure model. Statistics in medicine, 31:3959-3971, 2012

C. Cai, et al., smcure: An R-Package for estimating semiparametric mixture cure models. Computer Methods and Programs in Biomedicine, 108(3):1255-60, 2012

See Also

smcure


Eastern Cooperative Oncology Group (ECOG) Data

Description

Example data of nonparametric estimation approach with treatment as only covariate

Usage

data(e1684szdata)

Format

A data frame with 285 observations on the following 3 variables:

Time

observed relapse-free time

Status

censoring indicator (1 = event of interest happens, and 0 = censoring)

X

arm indicator (1 = treatment and 0 = control)

Examples

data(e1684szdata)

Function One

Description

The first integrate function

Usage

f1(t, survdist, k, lambda0)

Arguments

t

time variable

survdist

survival distribution of uncured patients. It can be "exp" or "weib".

k

if survdist = "weib", the shape parameter k needs to be specified. By default k = 1, which refers to the exponential distribution.

lambda0

the scale parameter of exponential distribution or Weibull distribution for survival times of uncured patients in the control arm.

The density function of Weibull distribution with shape parameter k and scale parameter λ0\lambda_{0} is given by

f(t)=λ0k(λ0t)k1exp((λ0t)k),f(t)=\lambda_{0}k(\lambda_{0}t)^{k-1}\exp(-(\lambda_{0}t)^k),

for t>0t > 0, and the corresponding survival distribution is

S(t)=exp((λ0t)k).S(t)=\exp(-(\lambda_0 t)^k).


Function Two

Description

The second integrate function

Usage

f2(t, accrualtime, followuptime, accrualdist, survdist, k, lambda0)

Arguments

t

time variable

accrualtime

length of accrual period.

followuptime

length of follow-up time.

accrualdist

accrual pattern. It can be "uniform", "increasing" or "decreasing".

survdist

survival distribution of uncured patients. It can be "exp" or "weib".

k

if survdist = "weib", the shape parameter k needs to be specified. By default k = 1, which refers to the exponential distribution.

lambda0

the scale parameter of exponential distribution or Weibull distribution for survival times of uncured patients in the control arm.

The density function of Weibull distribution with shape parameter k and scale parameter λ0\lambda_0 is given by

f(t)=λ0k(λ0t)k1exp((λ0t)k),f(t)=\lambda_{0}k(\lambda_{0}t)^{k-1}\exp(-(\lambda_{0}t)^k),

for t>0t > 0, and the corresponding survival distribution is

S(t)=exp((λ0t)k).S(t)=\exp(-(\lambda_0 t)^k).


Function Three

Description

The third integrate function

Usage

f3(t, beta0, gamma0, pi0, survdist, k, lambda0)

Arguments

t

time variable

beta0

log hazard ratio of uncured patients

gamma0

log odds ratio of cure rates between two arms

pi0

cure rate for the control arm, which is between 0 and 1.

survdist

survival distribution of uncured patients. It can be "exp" or "weib".

k

if survdist = "weib", the shape parameter k needs to be specified. By default k = 1, which refers to the exponential distribution.

lambda0

the scale parameter of exponential distribution or Weibull distribution for survival times of uncured patients in the control arm.

The density function of Weibull distribution with shape parameter k and scale parameter λ0\lambda_0 is given by

f(t)=λ0k(λ0t)k1exp((λ0t)k),f(t)=\lambda_{0}k(\lambda_{0}t)^{k-1}\exp(-(\lambda_{0}t)^k),

for t>0t > 0, and the corresponding survival distribution is

S(t)=exp((λ0t)k).S(t)=\exp(-(\lambda_0 t)^k).


Function Four

Description

The fourth integrate function

Usage

f4(t, accrualtime, followuptime, accrualdist, beta0, gamma0, pi0, survdist,
 k, lambda0)

Arguments

t

time variable

accrualtime

length of accrual period.

followuptime

length of follow-up time.

accrualdist

accrual pattern. It can be "uniform", "increasing" or "decreasing".

beta0

log hazard ratio of uncured patients

gamma0

log odds ratio of cure rates between the two arms

pi0

cure rate for the control arm, which is between 0 and 1.

survdist

survival distribution of uncured patients. It can be "exp" or "weib".

k

if survdist = "weib", the shape parameter k needs to be specified. By default k = 1, which refers to the exponential distribution.

lambda0

the scale parameter of exponential distribution or Weibull distribution for survival times of uncured patients in the control arm.

The density function of Weibull distribution with shape parameter k and scale parameter λ0\lambda_0 is given by

f(t)=λ0k(λ0t)k1exp((λ0t)k),f(t)=\lambda_{0}k(\lambda_{0}t)^{k-1}\exp(-(\lambda_{0}t)^k),

for t>0t > 0, and the corresponding survival distribution is

S(t)=exp((λ0t)k).S(t)=\exp(-(\lambda_0 t)^k).


Cumulative hazard function

Description

Cumulative Hazard Function for Exponential and Weibull Distributions

Usage

H0(t, survdist, k, lambda0)

Arguments

t

time variable

survdist

survival distribution of uncured patients. It can be "exp" or "weib".

k

if survdist = "weib", the shape parameter k needs to be specified. By default k = 1, which refers to the exponential distribution.

lambda0

the scale parameter of exponential distribution or Weibull distribution for survival times of uncured patients in the control arm.

The density function of Weibull distribution with shape parameter k and scale parameter λ0\lambda_0 is given by

f(t)=λ0k(λ0t)k1exp((λ0t)k),f(t)=\lambda_{0}k(\lambda_{0}t)^{k-1}\exp(-(\lambda_{0}t)^k),

for t>0t > 0, and the corresponding survival distribution is

S(t)=exp((λ0t)k).S(t)=\exp(-(\lambda_0 t)^k).


M Function

Description

M integrate function

Usage

m(t, beta0, gamma0, pi0, survdist, k, lambda0)

Arguments

t

time variable

beta0

log hazard ratio of uncured patients

gamma0

log odds ratio of cure rates between two arms

pi0

cure rate for the control arm, which is between 0 and 1.

survdist

survival distribution of uncured patients. It can be "exp" or "weib".

k

if survdist = "weib", the shape parameter k needs to be specified. By default k = 1, which refers to the exponential distribution.

lambda0

the scale parameter of exponential distribution or Weibull distribution for survival times of uncured patients in the control arm.

The density function of Weibull distribution with shape parameter k and scale parameter λ0\lambda_0 is given by

f(t)=λ0k(λ0t)k1exp((λ0t)k),f(t)=\lambda_{0}k(\lambda_{0}t)^{k-1}\exp(-(\lambda_{0}t)^k),

for t>0t > 0, and the corresponding survival distribution is

S(t)=exp((λ0t)k).S(t)=\exp(-(\lambda_0 t)^k).


Title

Description

Title

Usage

NPHMC(
  n = NULL,
  power = 0.8,
  alpha = 0.05,
  accrualtime = NULL,
  followuptime = NULL,
  p = 0.5,
  accrualdist = c("uniform", "increasing", "decreasing"),
  hazardratio = NULL,
  oddsratio = NULL,
  pi0 = NULL,
  survdist = c("exp", "weib"),
  k = 1,
  lambda0 = NULL,
  data = NULL
)

Arguments

n

sample size needed for power calculation

power

powered needed for sample size calculation

alpha

level of significance of statistical test (default is 0.05)

accrualtime

level of accrual period

followuptime

length of follow up time

p

proportion of subjects in treatment arm (default is 0.5)

accrualdist

accrual pattern (uniform, decreasing, increasing)

hazardratio

hazard ratio of uncured patients between two arms (must be greater than 0)

oddsratio

odds ratio of cured patients between two arms. It must be greater than 0. If it is 0, the model is reduced to standard proportional hazards model.

pi0

cure rate for the control arm (between 0 and 1)

survdist

distribution of uncured patients (exp or weib)

k

shape parameter if survdist = 'weib' (By default, it is 1 referrring to exponential distribution)

lambda0

scale parameter of exponential or Weibull distribution for survival times of uncured patients in the control arm.

data

observed or historical data if available

Value

a NPHMC object

Examples

NPHMC(power=0.90,alpha=0.05,accrualtime=3,followuptime=4,p=0.5,accrualdist="uniform",
hazardratio=2/2.5,oddsratio=2.25,pi0=0.1,survdist="exp",k=1,lambda0=0.5)
data(e1684szdata)
NPHMC(power=0.80,alpha=0.05,accrualtime=4,followuptime=3,p=0.5,accrualdist="uniform",
     data=e1684szdata)
n=seq(100, 500, by=50)
NPHMC(n=n, alpha=0.05,accrualtime=3,followuptime=4,p=0.5,
     accrualdist="uniform", hazardratio=2/2.5,oddsratio=2.25,pi0=0.1,survdist="exp",
     k=1,lambda0=0.5)
n=seq(100, 500, by=50)
NPHMC(n=n,alpha=0.05,accrualtime=4,followuptime=3,p=0.5,
     accrualdist="uniform",data=e1684szdata)

S0 Function

Description

Baseline survival function for mixture cure model

Usage

S0(t, pi0, survdist, k, lambda0)

Arguments

t

time variable

pi0

cure rate for the control arm, which is between 0 and 1.

survdist

survival distribution of uncured patients. It can be "exp" or "weib".

k

if survdist = "weib", the shape parameter k needs to be specified. By default k = 1, which refers to the exponential distribution.

lambda0

scale parameter of exponential distribution or Weibull distribution for survival times of uncured patients in the control arm.

The density function of Weibull distribution with shape parameter k and scale parameter λ0\lambda_0 is given by

f(t)=λ0k(λ0t)k1exp((λ0t)k),f(t)=\lambda_{0}k(\lambda_{0}t)^{k-1}\exp(-(\lambda_{0}t)^k),

for t>0t > 0, and the corresponding survival distribution is

S(t)=exp((λ0t)k).S(t)=\exp(-(\lambda_0 t)^k).


Sc Function

Description

Survival distribution of censoring times

Usage

Sc(t, accrualtime, followuptime, accrualdist)

Arguments

t

time variable

accrualtime

length of accrual period.

followuptime

length of follow-up time.

accrualdist

accrual pattern. It can be "uniform", "increasing" or "decreasing".