| Title: | Additive-Multiplicative Cox-Aalen Subdistribution Hazard Model for Competing Risks |
|---|---|
| Description: | Implements the flexible additive-multiplicative Cox-Aalen subdistribution hazard regression model for competing risks data as proposed by Li and Long (2019) <doi:10.1007/s11424-019-7281-6>. The framework accommodates both time-varying non-parametric additive covariate effects through an Aalen (1980) additive model and constant multiplicative effects via a Cox proportional hazards structure, generalizing Scheike and Zhang (2002) <doi:10.1111/1467-9469.00065> and Martinussen and Scheike (2002) <doi:10.1093/biomet/89.2.283>. Includes inverse probability of censoring weighting (IPCW) with both Kaplan-Meier weights (Fine and Gray, 1999 <doi:10.1080/01621459.1999.10474144>) and covariate-dependent Cox censoring weights (He et al., 2016 <doi:10.1111/sjos.12172>; Li and Long, 2019 <doi:10.1007/s11424-019-7281-6>). Provides simultaneous estimating equations based on Huffer and McKeague (1991) <doi:10.1080/01621459.1991.10475010>, asymptotic sandwich variance estimation with censoring-weight martingale corrections, cumulative incidence function (CIF) prediction with pointwise confidence intervals, supremum-type goodness-of-fit tests for time-varying covariate effects, and Monte Carlo competing risks data simulation. |
| Authors: | Shikhar Tyagi [aut, cre] (ORCID: <https://orcid.org/0000-0003-1606-0844>), Arvind Pandey [aut], Bhupendra Singh [aut], Vrijesh Tripathi [aut] |
| Maintainer: | Shikhar Tyagi <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.1.0 |
| Built: | 2026-09-21 09:41:27 UTC |
| Source: | https://github.com/cran/CoxAalenCR |
AIC placeholder for semiparametric estimating equations.
## S3 method for class 'cox_aalen_fit' AIC(object, ..., k = 2)## S3 method for class 'cox_aalen_fit' AIC(object, ..., k = 2)
object |
an object of class |
... |
further arguments. |
k |
numeric penalty per parameter (default 2). |
Numeric NA.
Computes predicted cumulative incidence functions (CIF) for specified covariate profiles under the additive-multiplicative Cox-Aalen model with analytical pointwise standard errors and confidence intervals as derived in Theorem 4.3 of Li and Long (2019) <doi:10.1007/s11424-019-7281-6>.
cif_predict( object, newdata = NULL, newZ = NULL, newtime = NULL, se.fit = TRUE, conf.level = 0.95, ... )cif_predict( object, newdata = NULL, newZ = NULL, newtime = NULL, se.fit = TRUE, conf.level = 0.95, ... )
object |
an object of class |
newdata |
matrix or data frame of new additive covariates |
newZ |
matrix or data frame of new multiplicative covariates |
newtime |
numeric vector of time points for prediction. If |
se.fit |
logical indicating whether standard errors and confidence intervals should
be computed ( |
conf.level |
numeric confidence level for pointwise confidence intervals (default 0.95). |
... |
additional arguments (currently unused). |
A list of class "cif_predict" containing:
Numeric matrix of predicted CIF values (dimension ).
Numeric matrix of pointwise standard errors (or NULL if se.fit = FALSE).
Numeric matrix of lower confidence bounds clamped to .
Numeric matrix of upper confidence bounds clamped to .
Numeric vector of time points where predictions are evaluated.
Confidence level used.
Li, W. and Long, Y. (2019). An Additive-Multiplicative Cox-Aalen Subdistribution Hazard Model for Competing Risks Data. Journal of Systems Science and Complexity, 32(6), 1727-1746. doi:10.1007/s11424-019-7281-6
set.seed(123) dat <- simulate_coxaalen(n = 60, p = 0.3, censoring = "cox", cens_rate = 0.20) fit <- cox_aalen_fit( time = dat$time, status = dat$status, X = cbind(Intercept = 1, X = dat$X), Z = matrix(dat$Z, ncol = 1, dimnames = list(NULL, "Z")), W = dat$W ) pred <- cif_predict(fit, newdata = cbind(1, c(0.2, 0.8)), newZ = matrix(c(0.5, 0.5), ncol = 1)) print(pred$time[1:5]) print(pred$cif[, 1:5])set.seed(123) dat <- simulate_coxaalen(n = 60, p = 0.3, censoring = "cox", cens_rate = 0.20) fit <- cox_aalen_fit( time = dat$time, status = dat$status, X = cbind(Intercept = 1, X = dat$X), Z = matrix(dat$Z, ncol = 1, dimnames = list(NULL, "Z")), W = dat$W ) pred <- cif_predict(fit, newdata = cbind(1, c(0.2, 0.8)), newZ = matrix(c(0.5, 0.5), ncol = 1)) print(pred$time[1:5]) print(pred$cif[, 1:5])
Extracts multiplicative regression coefficients .
## S3 method for class 'cox_aalen_fit' coef(object, ...)## S3 method for class 'cox_aalen_fit' coef(object, ...)
object |
an object of class |
... |
further arguments. |
Named numeric vector of multiplicative regression coefficients.
Computes Wald confidence intervals for multiplicative parameters .
## S3 method for class 'cox_aalen_fit' confint(object, parm = NULL, level = 0.95, ...)## S3 method for class 'cox_aalen_fit' confint(object, parm = NULL, level = 0.95, ...)
object |
an object of class |
parm |
a specification of which parameters are to be given confidence intervals. |
level |
confidence level (default 0.95). |
... |
further arguments. |
A matrix with columns for the lower and upper confidence limits.
Fits the additive-multiplicative Cox-Aalen subdistribution hazard model for competing risks data using a formula specification.
cox_aalen( formula, data, W = NULL, weight_type = c("cox", "km"), tau = NULL, control = list() )cox_aalen( formula, data, W = NULL, weight_type = c("cox", "km"), tau = NULL, control = list() )
formula |
a two-part formula of the form |
data |
a data frame containing the variables named in |
W |
optional formula (e.g. |
weight_type |
character string specifying the IPCW weighting scheme: |
tau |
optional numeric value specifying the maximum follow-up time. |
control |
list of control parameters forwarded to |
An object of class c("cox_aalen", "cox_aalen_fit") containing the fitted
model components, formula, and matched call. See cox_aalen_fit for full details.
Li, W. and Long, Y. (2019). An Additive-Multiplicative Cox-Aalen Subdistribution Hazard Model for Competing Risks Data. Journal of Systems Science and Complexity, 32(6), 1727-1746. doi:10.1007/s11424-019-7281-6
set.seed(123) dat <- simulate_coxaalen(n = 60, p = 0.3, censoring = "cox", cens_rate = 0.20) fit <- cox_aalen( formula = survival::Surv(time, status) ~ X | Z, data = dat, W = ~ W, weight_type = "cox" ) print(fit) summary(fit)set.seed(123) dat <- simulate_coxaalen(n = 60, p = 0.3, censoring = "cox", cens_rate = 0.20) fit <- cox_aalen( formula = survival::Surv(time, status) ~ X | Z, data = dat, W = ~ W, weight_type = "cox" ) print(fit) summary(fit)
Fits the flexible additive-multiplicative Cox-Aalen subdistribution hazard regression model for competing risks data via the estimating equations approach of Li and Long (2019) <doi:10.1007/s11424-019-7281-6>.
cox_aalen_fit( time, status, X, Z = NULL, W = NULL, weight_type = c("cox", "km"), tau = NULL, control = list() )cox_aalen_fit( time, status, X, Z = NULL, W = NULL, weight_type = c("cox", "km"), tau = NULL, control = list() )
time |
numeric vector of observed follow-up times |
status |
integer vector of event status indicators: 1 = event of interest (cause 1), 0 = censored, 2 = competing risk event. Missing values are not allowed. |
X |
matrix or data frame of covariates for the additive (time-varying) component.
Must have |
Z |
matrix or data frame of covariates for the multiplicative (constant) component.
If |
W |
matrix or data frame of covariates for the censoring distribution model.
Used when |
weight_type |
character string specifying the IPCW weighting scheme: |
tau |
numeric value specifying the maximum follow-up time. Default is the maximum observed time for cause 1 events. |
control |
a list of control parameters for the Newton-Raphson solver:
|
An object of class "cox_aalen_fit" containing:
Estimated regression coefficient vector for multiplicative covariates .
Standard error vector for beta.
Character vector of variable names for beta.
Matrix of cumulative additive coefficient estimates across event times.
Numeric vector of unique event times corresponding to rows of A.
Matrix of pointwise standard errors for A.
Estimated asymptotic variance-covariance matrix for beta.
3D array of variance-covariance matrices for across event times.
Estimated coefficient vector for the censoring model (if Cox weights used).
Standard error vector for gamma.
Character string of weight type used.
Matrix of influence function values for beta.
3D array of influence function values for A.
Integer sample size.
Integer number of additive covariates.
Integer number of multiplicative covariates.
Logical indicating whether the optimization converged (TRUE or FALSE).
Integer number of iterations performed.
Maximum follow-up time used.
Matched call.
Fine, J. P. and Gray, R. J. (1999). A proportional hazards model for the subdistribution of a competing risk. Journal of the American Statistical Association, 94(446), 496-509. doi:10.1080/01621459.1999.10474144
He, P., Ewell, M. and Scheike, T. H. (2016). A proportional hazards regression model for the subdistribution with covariates-adjusted censoring weight for competing risks data. Scandinavian Journal of Statistics, 43(1), 103-122. doi:10.1111/sjos.12172
Li, W. and Long, Y. (2019). An Additive-Multiplicative Cox-Aalen Subdistribution Hazard Model for Competing Risks Data. Journal of Systems Science and Complexity, 32(6), 1727-1746. doi:10.1007/s11424-019-7281-6
set.seed(123) dat <- simulate_coxaalen(n = 60, p = 0.3, censoring = "cox", cens_rate = 0.20) fit <- cox_aalen_fit( time = dat$time, status = dat$status, X = cbind(Intercept = 1, X = dat$X), Z = matrix(dat$Z, ncol = 1, dimnames = list(NULL, "Z")), W = dat$W, weight_type = "cox" ) print(fit)set.seed(123) dat <- simulate_coxaalen(n = 60, p = 0.3, censoring = "cox", cens_rate = 0.20) fit <- cox_aalen_fit( time = dat$time, status = dat$status, X = cbind(Intercept = 1, X = dat$X), Z = matrix(dat$Z, ncol = 1, dimnames = list(NULL, "Z")), W = dat$W, weight_type = "cox" ) print(fit)
Fits a Cox proportional hazards model for the censoring distribution conditional
on censoring covariates and computes covariate-adjusted IPCW weights as proposed
by He et al. (2016) <doi:10.1111/sjos.12172> and Li and Long (2019) <doi:10.1007/s11424-019-7281-6>.
cox_weights(time, status, W = NULL)cox_weights(time, status, W = NULL)
time |
numeric vector of observed follow-up times |
status |
integer vector of event status indicators: 1 = event of interest, 0 = censored, 2 = competing risk event. Missing values are not permitted. |
W |
matrix or data frame of covariates associated with the censoring distribution.
Must have |
A list of class "cox_weights" containing:
Estimated regression coefficient vector for the censoring Cox model.
Standard error vector for gamma.
The fitted coxph model object for censoring.
Data frame containing the Breslow cumulative baseline hazard estimate
with columns time and hazard.
Numeric vector of censoring survival probabilities
evaluated at each subject's observed time.
Integer sample size.
Integer number of censoring covariates.
He, P., Ewell, M. and Scheike, T. H. (2016). A proportional hazards regression model for the subdistribution with covariates-adjusted censoring weight for competing risks data. Scandinavian Journal of Statistics, 43(1), 103-122. doi:10.1111/sjos.12172
Li, W. and Long, Y. (2019). An Additive-Multiplicative Cox-Aalen Subdistribution Hazard Model for Competing Risks Data. Journal of Systems Science and Complexity, 32(6), 1727-1746. doi:10.1007/s11424-019-7281-6
set.seed(123) dat <- simulate_coxaalen(n = 60, p = 0.3, censoring = "cox", cens_rate = 0.20) cw_res <- cox_weights(time = dat$time, status = dat$status, W = dat$W) print(cw_res$gamma)set.seed(123) dat <- simulate_coxaalen(n = 60, p = 0.3, censoring = "cox", cens_rate = 0.20) cw_res <- cox_weights(time = dat$time, status = dat$status, W = dat$W) print(cw_res$gamma)
Computes inverse probability of censoring weighting (IPCW) using the univariate Kaplan-Meier estimator for the censoring distribution as proposed by Fine and Gray (1999) <doi:10.1080/01621459.1999.10474144>.
km_weights(time, status)km_weights(time, status)
time |
numeric vector of observed follow-up times |
status |
integer vector of event status indicators: 1 = event of interest (cause 1), 0 = censored, 2 = competing risk event. Missing values are not permitted. |
A list of class "km_weights" containing:
The fitted survfit object for censoring.
Numeric vector of censoring survival probabilities
evaluated at each subject's observed time.
Integer sample size.
Integer count of events of interest.
Integer count of censored observations.
Integer count of competing risk events.
Fine, J. P. and Gray, R. J. (1999). A proportional hazards model for the subdistribution of a competing risk. Journal of the American Statistical Association, 94(446), 496-509. doi:10.1080/01621459.1999.10474144
set.seed(123) dat <- simulate_coxaalen(n = 50, p = 0.3, censoring = "independent", cens_rate = 0.20) km_res <- km_weights(time = dat$time, status = dat$status) print(head(km_res$weights_obs))set.seed(123) dat <- simulate_coxaalen(n = 50, p = 0.3, censoring = "independent", cens_rate = 0.20) km_res <- km_weights(time = dat$time, status = dat$status) print(head(km_res$weights_obs))
Pseudo log-likelihood for estimating equation models.
## S3 method for class 'cox_aalen_fit' logLik(object, ...)## S3 method for class 'cox_aalen_fit' logLik(object, ...)
object |
an object of class |
... |
further arguments. |
An object of class "logLik" (evaluates to NA with df and nobs attributes).
Returns the number of observations used in model fitting.
## S3 method for class 'cox_aalen_fit' nobs(object, ...)## S3 method for class 'cox_aalen_fit' nobs(object, ...)
object |
an object of class |
... |
further arguments. |
An integer representing the number of observations.
Displays predicted cumulative incidence functions (CIF) with optional confidence bands.
plot_cif( fit, newdata = NULL, newZ = NULL, conf_level = 0.95, xlab = "Time", ylab = "Cumulative Incidence", main = "Predicted Cumulative Incidence Function", col = NULL, ... )plot_cif( fit, newdata = NULL, newZ = NULL, conf_level = 0.95, xlab = "Time", ylab = "Cumulative Incidence", main = "Predicted Cumulative Incidence Function", col = NULL, ... )
fit |
a fitted object of class |
newdata |
optional matrix or data frame of new additive covariates |
newZ |
optional matrix or data frame of new multiplicative covariates |
conf_level |
numeric confidence level for confidence bands (default 0.95). |
xlab |
character label for the x-axis (default |
ylab |
character label for the y-axis (default |
main |
character title for the plot (default |
col |
optional vector of colors for the predicted curves. |
... |
additional graphical parameters passed to |
No return value, called for side effects.
Plots the estimated non-parametric cumulative additive coefficient curves
over time along with 95% pointwise confidence bands.
plot_cumulative_coef( fit, conf_level = 0.95, xlab = "Time", ylab = "Cumulative Coefficient", main = NULL, ... )plot_cumulative_coef( fit, conf_level = 0.95, xlab = "Time", ylab = "Cumulative Coefficient", main = NULL, ... )
fit |
a fitted object of class |
conf_level |
numeric confidence level for confidence bands (default 0.95). |
xlab |
character label for the x-axis (default |
ylab |
character label for the y-axis (default |
main |
optional main title prefix. |
... |
additional graphical parameters. |
No return value, called for side effects.
Plots predicted cumulative incidence functions or cumulative additive coefficient paths.
## S3 method for class 'cox_aalen' plot(x, which = c("cif", "cumulative_coef"), ...)## S3 method for class 'cox_aalen' plot(x, which = c("cif", "cumulative_coef"), ...)
x |
an object of class |
which |
character string specifying which plot to produce: |
... |
further arguments passed to |
No return value, called for side effects.
S3 plot method for objects of class "cox_aalen_fit".
## S3 method for class 'cox_aalen_fit' plot(x, which = c("cif", "cumulative_coef"), ...)## S3 method for class 'cox_aalen_fit' plot(x, which = c("cif", "cumulative_coef"), ...)
x |
an object of class |
which |
character string specifying which plot to produce: |
... |
further arguments passed to plotting routines. |
No return value, called for side effects.
Predicts cumulative incidence functions using fitted model.
## S3 method for class 'cox_aalen' predict( object, newdata = NULL, newtime = NULL, se.fit = TRUE, conf.level = 0.95, ... )## S3 method for class 'cox_aalen' predict( object, newdata = NULL, newtime = NULL, se.fit = TRUE, conf.level = 0.95, ... )
object |
an object of class |
newdata |
optional data frame of new observation profiles. |
newtime |
optional numeric vector of prediction times. |
se.fit |
logical indicating whether standard errors should be computed. |
conf.level |
numeric confidence level (default 0.95). |
... |
further arguments. |
An object of class "cif_predict".
Prints the matched call and model summary.
## S3 method for class 'cox_aalen' print(x, ...)## S3 method for class 'cox_aalen' print(x, ...)
x |
an object of class |
... |
further arguments passed to or from other methods. |
No return value, called for side effects.
Prints a concise summary of the fitted additive-multiplicative Cox-Aalen model.
## S3 method for class 'cox_aalen_fit' print(x, ...)## S3 method for class 'cox_aalen_fit' print(x, ...)
x |
an object of class |
... |
further arguments passed to or from other methods. |
No return value, called for side effects.
Prints the formatted simulation study performance metrics.
## S3 method for class 'simulation_study' print(x, ...)## S3 method for class 'simulation_study' print(x, ...)
x |
an object of class |
... |
further arguments. |
No return value, called for side effects.
Prints the formatted summary table.
## S3 method for class 'summary.cox_aalen_fit' print(x, ...)## S3 method for class 'summary.cox_aalen_fit' print(x, ...)
x |
an object of class |
... |
further arguments passed to or from other methods. |
No return value, called for side effects.
Prints the summary of time-varying effect goodness-of-fit tests.
## S3 method for class 'time_varying_test' print(x, ...)## S3 method for class 'time_varying_test' print(x, ...)
x |
an object of class |
... |
further arguments. |
No return value, called for side effects.
Generates competing risks survival data exactly following the simulation design in Section 5 of Li and Long (2019) <doi:10.1007/s11424-019-7281-6>.
simulate_coxaalen( n, p = 0.3, alpha = 1, beta1 = 1, beta2 = 1, censoring = c("independent", "cox", "threshold_uniform"), cens_rate = c(0.2, 0.4) )simulate_coxaalen( n, p = 0.3, alpha = 1, beta1 = 1, beta2 = 1, censoring = c("independent", "cox", "threshold_uniform"), cens_rate = c(0.2, 0.4) )
n |
integer sample size. |
p |
numeric baseline subdistribution probability |
alpha |
numeric parameter |
beta1 |
numeric true coefficient |
beta2 |
numeric true coefficient |
censoring |
character string specifying the censoring scenario: |
cens_rate |
numeric target censoring rate: |
A data frame with rows and columns:
Observed follow-up time .
Event status indicator: 1 = cause 1 (event of interest), 2 = cause 2 (competing risk), 0 = censored.
Additive covariate generated from .
Multiplicative covariate generated from .
Censoring-dependent covariate (equals ).
Li, W. and Long, Y. (2019). An Additive-Multiplicative Cox-Aalen Subdistribution Hazard Model for Competing Risks Data. Journal of Systems Science and Complexity, 32(6), 1727-1746. doi:10.1007/s11424-019-7281-6
set.seed(123) dat <- simulate_coxaalen(n = 100, p = 0.3, censoring = "cox", cens_rate = 0.20) head(dat) table(dat$status)set.seed(123) dat <- simulate_coxaalen(n = 100, p = 0.3, censoring = "cox", cens_rate = 0.20) head(dat) table(dat$status)
Conducts a Monte Carlo simulation study to evaluate the empirical bias, standard errors, and 95% coverage probability of the Cox-Aalen model estimators under various censoring scenarios.
simulation_study( n_sim = 50L, n = 100L, p = 0.3, alpha = 1, beta1 = 1, beta2 = 1, censoring = c("independent", "cox", "threshold_uniform"), cens_rate = 0.2, weight_type = c("cox", "km") )simulation_study( n_sim = 50L, n = 100L, p = 0.3, alpha = 1, beta1 = 1, beta2 = 1, censoring = c("independent", "cox", "threshold_uniform"), cens_rate = 0.2, weight_type = c("cox", "km") )
n_sim |
integer number of simulation replications (default 50). |
n |
integer sample size per replication (default 100). |
p |
numeric baseline subdistribution parameter (default 0.3). |
alpha |
numeric time-varying parameter (default 1.0). |
beta1 |
numeric true multiplicative coefficient (default 1.0). |
beta2 |
numeric true competing risk coefficient (default 1.0). |
censoring |
character string: |
cens_rate |
numeric target censoring rate (0.20 or 0.40). |
weight_type |
character string: |
An object of class "simulation_study" containing:
Data frame with columns Parameter, True, Bias,
Empirical_SE, Average_SE, and Coverage_95.
List of simulation configuration parameters.
Li, W. and Long, Y. (2019). An Additive-Multiplicative Cox-Aalen Subdistribution Hazard Model for Competing Risks Data. Journal of Systems Science and Complexity, 32(6), 1727-1746. doi:10.1007/s11424-019-7281-6
set.seed(123) sim_res <- simulation_study(n_sim = 5, n = 40, p = 0.3, censoring = "independent") print(sim_res)set.seed(123) sim_res <- simulation_study(n_sim = 5, n = 40, p = 0.3, censoring = "independent") print(sim_res)
Summary method for formula-fitted Cox-Aalen model.
## S3 method for class 'cox_aalen' summary(object, ...)## S3 method for class 'cox_aalen' summary(object, ...)
object |
an object of class |
... |
further arguments passed to or from other methods. |
An object of class "summary.cox_aalen".
Produces a detailed summary of the fitted model parameters, standard errors, z-values, p-values, and cumulative additive functions.
## S3 method for class 'cox_aalen_fit' summary(object, ...)## S3 method for class 'cox_aalen_fit' summary(object, ...)
object |
an object of class |
... |
further arguments passed to or from other methods. |
An object of class "summary.cox_aalen_fit" containing summary tables and fit statistics.
Clinical trial dataset of 641 women aged 50 years or older with early breast cancer treated at Princess Margaret Hospital between 1992 and 2000, analyzing the effect of breast irradiation plus tamoxifen vs. tamoxifen alone under competing risks as analyzed in Li and Long (2019) <doi:10.1007/s11424-019-7281-6>, Fyles et al. (2004) <doi:10.1056/NEJMoa040595>, and Melania Pintilie (2006, ISBN:978-0-470-87068-6).
tamoxifentamoxifen
A data frame with 641 rows and 5 variables:
Follow-up time in years.
Event status: 1 = second malignancy (event of interest), 2 = death without second malignancy (competing risk), 0 = censored.
Patient age in years at study entry (mean 66.45, standard deviation 8.91).
Pathological tumor size in centimeters (mean 1.55, standard deviation 0.77).
Treatment indicator: 1 = radiation plus tamoxifen, 0 = tamoxifen alone.
Princess Margaret Hospital breast cancer study, published in Fyles et al. (2004) and analyzed in Li and Long (2019).
Fyles, A. W., McCready, D. R., Manchul, L. A., et al. (2004). Tamoxifen with or without breast irradiation in women 50 years of age or older with early breast cancer. New England Journal of Medicine, 351(10), 963-970. doi:10.1056/NEJMoa040595
Li, W. and Long, Y. (2019). An Additive-Multiplicative Cox-Aalen Subdistribution Hazard Model for Competing Risks Data. Journal of Systems Science and Complexity, 32(6), 1727-1746. doi:10.1007/s11424-019-7281-6
Pintilie, M. (2006). Competing Risks: A Practical Perspective. John Wiley & Sons, Chichester. ISBN:978-0-470-87068-6.
data(tamoxifen) head(tamoxifen) table(tamoxifen$status)data(tamoxifen) head(tamoxifen) table(tamoxifen$status)
Performs supremum-type Kolmogorov-Smirnov and Cramer-von Mises goodness-of-fit tests to evaluate whether additive covariates have time-varying or constant effects, implementing Remark 4.4 of Li and Long (2019) <doi:10.1007/s11424-019-7281-6> using Gaussian multiplier resampling (Lin et al., 1993 <doi:10.1093/biomet/80.3.557>; Scheike and Zhang, 2002 <doi:10.1111/1467-9469.00065>).
time_varying_test(fit, B = 500L)time_varying_test(fit, B = 500L)
fit |
a fitted model object of class |
B |
integer number of Monte Carlo resampling iterations (default 500). |
A list of class "time_varying_test" containing:
A data frame with columns Covariate, Sup_Stat (supremum statistic),
p_value_sup (resampling p-value for supremum test), CvM_Stat (Cramer-von Mises statistic),
and p_value_cvm.
Integer number of resampling iterations used.
Number of additive covariates tested.
Li, W. and Long, Y. (2019). An Additive-Multiplicative Cox-Aalen Subdistribution Hazard Model for Competing Risks Data. Journal of Systems Science and Complexity, 32(6), 1727-1746. doi:10.1007/s11424-019-7281-6
Lin, D. Y., Wei, L. J., Yang, I. and Ying, Z. (1993). Checking the Cox model with cumulative sums of martingale-based residuals. Biometrika, 80(3), 557-572. doi:10.1093/biomet/80.3.557
Scheike, T. H. and Zhang, M. J. (2002). An additive-multiplicative Cox-Aalen regression model. Scandinavian Journal of Statistics, 29(1), 75-88. doi:10.1111/1467-9469.00065
set.seed(123) dat <- simulate_coxaalen(n = 50, p = 0.3, censoring = "independent", cens_rate = 0.20) fit <- cox_aalen_fit( time = dat$time, status = dat$status, X = cbind(Intercept = 1, X = dat$X), Z = matrix(dat$Z, ncol = 1, dimnames = list(NULL, "Z")) ) test_res <- time_varying_test(fit, B = 100) print(test_res)set.seed(123) dat <- simulate_coxaalen(n = 50, p = 0.3, censoring = "independent", cens_rate = 0.20) fit <- cox_aalen_fit( time = dat$time, status = dat$status, X = cbind(Intercept = 1, X = dat$X), Z = matrix(dat$Z, ncol = 1, dimnames = list(NULL, "Z")) ) test_res <- time_varying_test(fit, B = 100) print(test_res)
Extracts the asymptotic variance-covariance matrix of .
## S3 method for class 'cox_aalen_fit' vcov(object, ...)## S3 method for class 'cox_aalen_fit' vcov(object, ...)
object |
an object of class |
... |
further arguments. |
Matrix of variance-covariance estimates for multiplicative parameters.