Title: | Semiparametric Proportional Means Regression of Weighted Composite Endpoint |
---|---|
Description: | Implements inferential and graphic procedures for the semiparametric proportional means regression of weighted composite endpoint of recurrent event and death (Mao and Lin, 2016, <doi:10.1093/biostatistics/kxv050>). |
Authors: | Lu Mao |
Maintainer: | Lu Mao <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2025-02-18 05:26:50 UTC |
Source: | https://github.com/cran/Wcompo |
Fit a semiparametric proportional means regression model for the weighted composite endpoint of recurrent event and death (Mao and Lin, 2016). (Jared D. Huling (ORCID: 0000-0003-0670-4845) contributed to the optimization of this code.)
CompoML(id, time, status, Z, w = NULL, ep = 1e-04)
CompoML(id, time, status, Z, w = NULL, ep = 1e-04)
id |
A vector of unique patient identifiers. |
time |
A vector of event times. |
status |
A vector of event type labels. 0: censoring; 1: death;
2, 3,..., |
Z |
Covariate matrix (must be time-constant). |
w |
A |
ep |
Convergence threshold for the Newton-Raphson algorithm. |
An object of class CompoML
with the following components.
beta
: a vector of estimated regression coefficients (log-mean ratios);
var
: estimated covariance matrix for beta
;
t
: unique event times;
y
: estimated baseline mean function (of t
).
Mao, L. and Lin, D. Y. (2016). Semiparametric regression for the weighted composite endpoint of recurrent and terminal events. Biostatistics, 17, 390-403.
## load package and data library(Wcompo) head(hfmock) ## fit a weighted PM (w_D=2, w_1=1) obj <- CompoML(hfmock$id,hfmock$time,hfmock$status,hfmock[,c("Training","HF.etiology")], w=c(2,1)) ## print out the result obj oldpar <- par(mfrow = par("mfrow")) par(mfrow=c(1,2)) ## plot the estimated mean function for ## non-ischemic patients by treatment plot(obj,c(1,0),ylim=c(0,1.5),xlim=c(0,50), main="Non-ischemic", xlab="Time (months)",cex.main=1.2,lwd=2) plot(obj,c(0,0),add=TRUE,cex.main=1.2,lwd=2,lty=2) legend("topleft",lty=1:2,lwd=2,c("Exercise training","Usual care")) ## plot the estimated mean function for ## ischemic patients by treatment plot(obj,c(1,1),ylim=c(0,1.5),xlim=c(0,50), main="Ischemic", xlab="Time (months)",cex.main=1.2,lwd=2) plot(obj,c(0,1),add=TRUE,cex.main=1.2,lwd=2,lty=2) legend("topleft",lty=1:2,lwd=2,c("Exercise training","Usual care")) par(oldpar)
## load package and data library(Wcompo) head(hfmock) ## fit a weighted PM (w_D=2, w_1=1) obj <- CompoML(hfmock$id,hfmock$time,hfmock$status,hfmock[,c("Training","HF.etiology")], w=c(2,1)) ## print out the result obj oldpar <- par(mfrow = par("mfrow")) par(mfrow=c(1,2)) ## plot the estimated mean function for ## non-ischemic patients by treatment plot(obj,c(1,0),ylim=c(0,1.5),xlim=c(0,50), main="Non-ischemic", xlab="Time (months)",cex.main=1.2,lwd=2) plot(obj,c(0,0),add=TRUE,cex.main=1.2,lwd=2,lty=2) legend("topleft",lty=1:2,lwd=2,c("Exercise training","Usual care")) ## plot the estimated mean function for ## ischemic patients by treatment plot(obj,c(1,1),ylim=c(0,1.5),xlim=c(0,50), main="Ischemic", xlab="Time (months)",cex.main=1.2,lwd=2) plot(obj,c(0,1),add=TRUE,cex.main=1.2,lwd=2,lty=2) legend("topleft",lty=1:2,lwd=2,c("Exercise training","Usual care")) par(oldpar)
The Heart Failure: A Controlled Trial Investigating Outcomes of Exercise Training (HF-ACTION) study was conducted between 2003–2007 to investigate whether adding exercise training to the usual care of heart failure patients improves their cardiovascular outcomes (O'Conner et al., 2009). This is a mock dataset consisting of 963 patients with baseline information about heart failure etiology.
hfmock
hfmock
A data frame with 1,315 rows and 5 variables:
Unique patient identifier.
Event time (months).
Event type; 2 = recurrent hospitalization, 1 = death, 0 = censoring.
1 = exercise training, 0 = usual care.
1 = ischemic, 0 = non-ischemic.
O'CONNOR, C. M., WHELLAN, D. J., LEE, K. L., KETEYIAN, S. J., COOPER, L. S., ELLIS, S. J., LEIFER, E. S., KRAUS, W. E., KITZMAN, D. W., BLUMENTHAL, J. A. et al. (2009). Efficacy and safety of exercise training in patients with chronic heart failure: Hf-action randomized controlled trial. J. Am. Med. Assoc. 301, 1439–1450.
Plot the predicted mean function under the proportional means model for a new observation.
## S3 method for class 'CompoML' plot( x, z = NULL, xlab = "Time", ylab = "Mean function", lty = 1, frame.plot = FALSE, add = FALSE, ... )
## S3 method for class 'CompoML' plot( x, z = NULL, xlab = "Time", ylab = "Mean function", lty = 1, frame.plot = FALSE, add = FALSE, ... )
x |
An object returned by |
z |
Covariate vector for the new observation. If |
xlab |
A label for the x axis. |
ylab |
A label for the y axis. |
lty |
Line type for the plot. |
frame.plot |
Boolean argument indicating whether to add a rectangular frame to the plot. |
add |
If TRUE, the curve will be overlaid on an existing plot; otherwise, a separate plot will be constructed. |
... |
Other arguments that can be passed to the underlying |
No return value, called for side effects.
## see example for CompoML
## see example for CompoML
Print the analysis results of the proportional means model.
## S3 method for class 'CompoML' print(x, ...)
## S3 method for class 'CompoML' print(x, ...)
x |
An object returned by |
... |
Further arguments passed to or from other methods. |
Print the results of CompoML
object