Learn R Programming

RISCA (version 1.0.1)

gc.sl.time: Marginal Effect for Censored Outcome by G-computation with a Super Learner for the Outcome Model.

Description

This function allows to estimate the (population-average) marginal effect of an exposure or a treatment by G-computation for a censored times-to-event, the Q-model being specified by a Super Learner.

Usage

gc.sl.time(object, max.time, effect, estim.tune, estim.weights,
  methods, conditional,  iterations, length.out)

Value

effect

A character string with the type of selected effect.

max.time

A scalar related to the maximum time of follow-up for the RMST computation.

RMST0

A table related to the RMST in the unexposed/untreated sample: estimate is the estimated value, ci.lower and ci.upper represent the 95% confidence interval.

RMST1

A table related to the RMST in the exposed/treated sample: estimate is the estimated value, ci.lower and ci.upper represent the 95% confidence interval.

delta

A table related to the difference between the RMST in the exposed/treated sample minus in the unexposed/untreated one: estimate is the estimated value, ci.lower and ci.upper represent the 95% confidence interval, and p.value is the p-value of the bilateral test of the null hypothesis RMST0 = RMST1.

logHR

A table related to the logarithm of the average HR: estimate is the estimated value, std.error is the corresponding standard error, ci.lower and ci.upper represent the 95% confidence interval, and p.value is the p-value of the bilateral test of the null hypothesis HR = 1.

table.surv

This data frame presents the survival probabilities (survival) in each group (variable) according to the times. The number of individuals at risk (n.risk) is also provided.

logHR.conditional.values

A vector with the estimated individual HRs (only if conditional = TRUE).

logHR.conditional

A table related to the logarithm of the conditional HR (only if conditional = TRUE): estimate is the estimated value, std.error is the corresponding standard error, ci.lower and ci.upper represent the 95% confidence interval, and p.value is the p-value of the bilateral test of the null hypothesis HR = 1.

learner

A list with the same arguments (RMST0, RMST1, etc.) for the other algorithms/model included in the Super Learner ans declared in the argument methods (only if methods=NULL).

Arguments

object

An object returned by the function sl.time. It shall be included the exposition/treatment of interest in the argument group of the sl.time function.

max.time

The maximum time of follow-up to estimate of restricted mean survival time (RMST). The default value is NULL, which corresponds to object$pro.time if this argument is not NULL, or the time at which half of the sample is still at-risk otherwise.

effect

The type of marginal effect to be estimated. Three types are possible (see details): "ATE" (by default), "ATT" and "ATU".

estim.tune

A logical value. If TRUE, the tuning parameters of the algorithms of the Super Learner are estimated at each boostraap iteration. The default is TRUE.

estim.weights

A logical value. If TRUE, the weights of the algorithms of the Super Learner are estimated at each bootstrap iteration. The default is TRUE.

methods

A vector of character with the methods for which the marginal effect are computing. The methods included in object$methods or "sl" are allowed. You can use "all" if you want to estimate the marginal effect of the Super Learner and all the included algorithmsor models. You can use "sl" if you want only the estimation for the Super Learner. The default value is "sl".

conditional

A logical value. If TRUE, the conditional (subject-specific) Hazard Ratio (HR) is also computing. See the help related to the hr.sl.time function for more details on this option. The default is FALSE.

iterations

The number of bootstrap resamples to estimate of the variances and the confidence intervals.

length.out

An non-negative number argument related to the desired length of time intervals to compute the marginal estimands. The default is 100.

Author

Yohann Foucher <Yohann.Foucher@univ-nantes.fr>

Details

The ATE corresponds to Average Treatment effect on the Entire population, i.e. the marginal effect if all the sample is treated versus all the sample is untreated. The ATT corresponds to Average Treatment effect on the Treated, i.e. the marginal effect if the treated patients (group = 1) would have been untreated. The ATU corresponds to Average Treatment effect on the Untreated , i.e. the marginal effect if the untreated patients (group = 0) would have been treated. The RMST is the mean survival time of all subjects in the study population followed up to max.time.

References

Chatton et al. G-computation versus inverse probability weighting for time-to-event analyses. Manuscript in progress. 2019.

Examples

Run this code

data(dataDIVAT2)

#The outcome model base on a Super Learner and the first 150 individuals of the data base
sl1<-sl.time( methods=c("aft.gamma", "ph.gompertz"),  metric="ibs",
  data=dataDIVAT2[1:150,],  times="times", failures="failures", group="ecd",
  cov.quanti=c("age"),  cov.quali=c("hla", "retransplant"), cv=3)
  
#Marginal effect of the treatment (ATE): use 1000 iterations instead of 2
gc.ate <- gc.sl.time(sl1, max.time=12, effect="ATE", iterations=2, 
  estim.tune=FALSE, estim.weights=FALSE)

#Plot the survival curves
plot(gc.ate, ylab="Confounder-adjusted survival",
 xlab="Time post-transplantation (years)", col=c(1,2))

Run the code above in your browser using DataLab