StabCat.surv: parameter stability test for categorical partitioning...

View source: R/StabCat_surv.R

StabCat.surv R Documentation

parameter stability test for categorical partitioning variable

Description

Performs parameter stability test (Kundu, 2020) with categorical partitioning variable to determine whether the parameters of exponential time-to-event distribution and exponential censoring distribution remain same across all distinct values of given categorical partitioning variable.

Usage

StabCat.surv(data, timevar, censorvar, splitvar, 
              time.dist="exponential", cens.dist="NA", event.ind=1, print=FALSE)

Arguments

data

name of the dataset. It must contain variable specified for timevar (indicating follow-up times), censorvar (indicating censoring status) and the caterogrical partitioning variable of interest specified in splitvar. Note that, only numerically coded categorical variable should be specified.

timevar

name of the variable with follow-up times.

censorvar

name of the variable with censoring status.

time.dist

name of time-to-event distribution. It can be one of the following distributions: "exponential", "weibull", "lognormal" or "normal".

cens.dist

name of censoring distribution. It can be one of the following distributions: "exponential", "weibull", "lognormal", "normal" or "NA". If specified "NA", then parameter instability test corresponding to censoring distribution will not be performed.

event.ind

value of the censoring variable indicating event.

splitvar

the categorical partitioning variable of interest. It's value should not change over time.

print

if TRUE, then additional information including estimated parameters, score function and its variance will be printed.

Details

StabCat.surv() performs the following omnibus test

H_0:lambda_{(g)}=lambda_0 vs. H_1: lambda_{(g)} ^= lambda_0, for all g

where, theta_{(g)} is the true value of theta for subjects with X=C_g. theta includes all the parameters of time to event distribution and also parameters of censoring distribution, if specified. C_g is the any value realized by categorical partitioning variable X.

Exponential distribution: f(t)=lambda*exp(-lambda*t)

Weibull distribution: f(t)=alpha*lambda*t^(alpha-1)*exp(-lambda*t^alpha)

Lognormal distribution: f(t)=(1/t)*(1/sqrt(2*pi*sigma^2))*exp[-(1/2)*(log(t)-mu)/sigma^2]

Normal distribution: f(t)=(1/sqrt(2*pi*sigma^2))*exp[-(1/2)*(t-mu)/sigma^2]

Value

pval

p-value for parameter instability test

type

1, if event times are more heterogeneous; 2, if censoring times are more hetergeneous.

Author(s)

Madan Gopal Kundu madan_g.kundu@yahoo.com

References

Kundu, M. G., and Ghosh, S. (2021). Survival trees based on heterogeneity in time-to-event and censoring distributions using parameter instability test. Statistical Analysis and Data Mining: The ASA Data Science Journal, 14(5), 466-483.

See Also

StabCont.surv, SurvCART, plot, text

Examples

       

#--- time-to-event distribution: exponential, censoring distribution: None    
out1<- StabCat.surv(data=lung, timevar="time", censorvar="status", splitvar="sex", event.ind=2) 
out1$pval

#--- time-to-event distribution: weibull, censoring distribution: None  
StabCat.surv(data=lung, timevar="time", censorvar="status", splitvar="sex", 
             time.dist="weibull", event.ind=2) 

#--- time-to-event distribution: weibull, censoring distribution: exponential
StabCat.surv(data=lung, timevar="time", censorvar="status", splitvar="sex", 
             time.dist="weibull", cens.dist="exponential", event.ind=2)

LongCART documentation built on May 18, 2022, 1:06 a.m.