Skip to contents

Performs K-fold cross-validation for models fitted with big_pls_cox() or big_pls_cox_gd(). The routine mirrors the behaviour of the cross-validation helpers available in the original plsRcox package while operating on big.matrix inputs.

Usage

cv.big_pls_cox(
  data,
  nfold = 5L,
  nt = 5L,
  keepX = NULL,
  givefold,
  allCVcrit = FALSE,
  times.auc = NULL,
  times.prederr = NULL,
  method = c("efron", "breslow"),
  verbose = TRUE,
  ...
)

cv.big_pls_cox_gd(
  data,
  nfold = 5L,
  nt = NULL,
  keepX = NULL,
  givefold,
  allCVcrit = FALSE,
  times.auc = NULL,
  times.prederr = NULL,
  method = c("efron", "breslow"),
  verbose = TRUE,
  ...
)

Arguments

data

A list with entries x, time and status matching the arguments of big_pls_cox() or big_pls_cox_gd(). x can be either a numeric matrix/data frame or a bigmemory::big.matrix.

nfold

Integer giving the number of folds to use.

nt

Number of latent components to evaluate.

keepX

Optional integer vector passed to the modelling function to enforce naive sparsity (see big_pls_cox()).

givefold

Optional list of fold indices. When supplied, it must contain nfold integer vectors whose union is seq_len(nrow(data$x)).

allCVcrit

Logical; when FALSE (default) only the recommended integrated AUC computed with survivalROC is returned. When TRUE, the 13 additional criteria from plsRcox are also evaluated.

times.auc

Optional time grid used for time-dependent AUC computations. Defaults to an equally spaced grid between zero and the maximum observed time.

times.prederr

Optional time grid used for prediction error curves. Defaults to the same grid as times.auc without the last ten evaluation points to avoid instabilities.

method

Ties handling method passed to survival::coxph.

verbose

Logical; print progress information.

...

Additional arguments forwarded to the underlying modelling function.

Value

A list containing cross-validation summaries. When allCVcrit = FALSE, the list holds

nt

Number of components assessed.

cv.error10

Mean iAUC of survivalROC across folds for 0 to nt components.

cv.se10

Estimated standard errors for cv.error10.

folds

Fold assignments.

lambda.min10

Component minimising the cross-validated error.

lambda.1se10

Largest component within one standard error of the optimum.

When allCVcrit = TRUE, the full set of 14 criteria (log partial likelihood, iAUC variants and Brier scores) is returned together with their associated standard errors and one-standard-error selections.

Details

The function returns cross-validated estimates for each component (including the null model) using either big_pls_cox() or big_pls_cox_gd(), depending on the engine argument. The implementation reuses the internal indicators (getIndicCV, getIndicCViAUCSurvROCTest) to provide consistent metrics with the legacy plsRcox helpers.