stmodelKM-class: Class '"stmodelKM"'

stmodelKM-classR Documentation

Class "stmodelKM"

Description

This is the S4 class for the stepp model of survival data using Kaplan-Meier method.

Value

The new method returns the stmodelKM object.

The estimate method returns a list with the following fields:

model

the stepp model - "KMe"

sObs1

a vector of effect estimates of all subpopulations based on the first treatment

sSE1

a vector of standard errors of effect estimates of all subpopulations based on the first treatment

oObs1

effect estimate of the entire population based on the first treatment

oSE1

the standard error of the effect estimate of the entire population based on the first treatment

sObs2

a vector of effect estimates of all subpopulations based on the group treatment

sSE2

a vector of standard errors of effect estimates of all subpopulations based on the first treatment

oObs2

effect estimate of the entire population based on the first treatment

oSE2

the standard error of the effect estimate of the entire population based on the first treatment

skmw

Wald's statistics for the effect estimate differences between the two treatments

logHR

a vector of log hazard ratio estimate of the subpopulations comparing first and second treatments

logHRSE

a vector of standard error of the log hazard ratio estimate of the subpopulations comparing first and second treatment

ologHR

the log hazard ratio estimate of the entire population comparing first and second treatment

ologHRSE

the standard error of the log hazard ratio estimate of the entire population comparing first and second treatment

logHRw

Wald's statistics for the log hazard ratio between the two treatment

The test method returns a list with the following fields:

model

the stepp model - "KMt"

sigma

the covariance matrix for subpopulations based on effect differences

hasigma

the homogeneous association covariance matrix for subpopulations based on effect differences

HRsigma

the covariance matrix for the subpopulations based on hazard ratios

haHRsigma

the homogeneous association covariance matrix for subpopulations based on hazard ratios

pvalue

the supremum pvalue based on effect difference

chi2pvalue

the chisquare pvalue based on effect difference

hapvalue

the homogeneous association pvalue based on effect difference

Objects from the Class

Objects can be created by calls of the form new("stmodelKM", ...) or by
the constructor function stmodel.KM.

Slots

coltrt:

Object of class "numeric"
the treatment variable

survTime:

Object of class "numeric"
the time to event variable

censor:

Object of class "numeric"
the censor variable

trts:

Object of class "numeric"
a vector containing the codes for the 2 treatment groups, first and second treatment groups, respectively

timePoint:

Object of class "numeric"
timepoint to estimate survival

Extends

Class "stmodel", directly.

Methods

estimate

signature(.Object = "stmodelKM"):
estimate the effect in absolute and relative scale of the overall population and each subpopulation.

print

signature(.Object = "stmodelKM"):
print the estimate, covariance matrices and statistics.

test

signature(.Object = "stmodelKM"):
perform the permutation tests or GEE and obtain various statistics.

Author(s)

Wai-Ki YIp

See Also

stwin, stsubpop, stmodelCI, stmodelGLM, steppes, stmodel, stepp.win, stepp.subpop, stepp.KM, stepp.CI, stepp.GLM, stepp.test, estimate, generate

Examples

showClass("stmodelKM")

#GENERATE TREATMENT VARIABLE:
N <- 1000
Txassign <- sample(c(1,2), N, replace=TRUE, prob=c(1/2, 1/2))
n1 <- length(Txassign[Txassign==1])
n2 <- N - n1
#GENERATE A COVARIATE:
covariate <- rnorm(N, 55, 7)
#GENERATE SURVIVAL AND CENSORING VARIABLES ASSUMING A TREATMENT COVARIATE INTERACTION:
Entry <- sort( runif(N, 0, 5) )
SurvT1 <- .5
beta0 <-  -65 / 75
beta1 <- 2 / 75
Surv <- rep(0, N)
lambda1 <- -log(SurvT1) / 4
Surv[Txassign==1] <- rexp(n1, lambda1)
Surv[Txassign==2] <- rexp(n2, (lambda1*(beta0+beta1*covariate[Txassign==2])))
EventTimes <- rep(0, N)
EventTimes <- Entry + Surv
censor <- rep(0, N)
time <- rep(0,N)
for ( i in 1:N )
   {
     censor[i] <- ifelse( EventTimes[i] <= 7, 1, 0 )
     time[i] <- ifelse( EventTimes[i] < 7, Surv[i], 7 - Entry[i] ) 
   }

modKM <- new("stmodelKM", coltrt=Txassign, survTime=time, censor=censor, trts=c(1,2), timePoint=4)


stepp documentation built on June 22, 2024, 9:24 a.m.

Related to stmodelKM-class in stepp...