Learn R Programming

Introduction

The Coxmos R package is an end-to-end pipeline designed for the study of survival analysis for high dimensional data. Updating classical methods and adding new ones based on sPLS technologies. Furthermore, includes multiblock functions to work with multiple sets of information to improve survival accuracy.

The pipeline includes three basic analysis blocks:

  1. Computing cross-validation functions and getting the models.

  2. Evaluating all the models to select the better one for multiple metrics.

  3. Understanding the results in terms of the global model and the original variables.

Coxmos contains the necessary functions and documentation to obtain from raw data the final models after compare them, evaluate with test data, study the performance individually and in terms of components and graph all the results to understand which variables are more relevant for each case of study.

Installation

Dependencies requiring manual installation

Some of the metrics available in Coxmos are optional based and will not be included in the standard Coxmos installation. A list of all optional packages are shown below:

  • nsROC:
  • smoothROCtime:
  • survivalROC:
  • risksetROC:
  • ggforce:
  • RColorConesa:

Installing Coxmos

The Coxmos R package and all the remaining dependencies can be installed from CRAN:

install.packages("Coxmos")

Or from GitHub using devtools

devtools::install_github("BiostatOmics/Coxmos")

In case of using Github, to access vignettes, you will need to force building with devtools::install_github(build_vignettes = TRUE). Please note that this will also install all suggested packages required for vignette build and might increase install time. Alternatively, an HTML version of the vignette is available under the vignettes folder.

Getting started

In order to use Coxmos, you will need the following items:

  • An explanatory X matrix.
  • A response survival Y matrix (with two columns, "time" and "event").

Please note that two toy datasets are included in the package. Details to load and use them can be found in the package's vignette.

Contact

If you encounter a problem, please open an issue via GitHub.

References

If you use Coxmos in your research, please cite the original publication:

Copy Link

Version

Install

install.packages('Coxmos')

Monthly Downloads

238

Version

1.1.2

License

CC BY 4.0

Issues

Pull Requests

Stars

Forks

Maintainer

Pedro Salguero Garcia

Last Published

March 5th, 2025

Functions in Coxmos (1.1.2)

RocFun

ROC estimation function
cv.isb.splsdacox

Iterative SB.sPLS-DACOX-Dynamic Cross-Validation
cv.isb.splsdrcox

Iterative SB.sPLS-DRCOX-Dynamic Cross-Validation
NR

The normal reference bandwidth selection for weighted data
Csurv

Survival probability conditional to the observed data estimation for right censored data.
Y_proteomic

Y_proteomic Data
cv.isb.splsdrcox_penalty

Iterative SB.sPLS-DRCOX-Dynamic Cross-Validation
cv.isb.splsicox

Iterative SB.sPLS-ICOX-Dynamic Cross-Validation
cox.prediction

cox.prediction
coxEN

coxEN
cox

cox
deleteZeroOrNearZeroVariance

deleteZeroOrNearZeroVariance
cenROC

Estimation of the time-dependent ROC curve for right censored survival data
deleteZeroOrNearZeroVariance.mb

deleteZeroOrNearZeroVariance.mb
cv.sb.splsdrcox

SB.sPLS-DRCOX-Dynamic Cross-Validation
cv.sb.splsdacox

SB.sPLS-DACOX-Dynamic Cross-Validation
cv.splsdrcox_penalty

sPLS-DRCOX Cross-Validation
cv.splsicox

sPLS-ICOX Cross-Validation
getTestKM

getTestKM
getTestKM.list

getTestKM.list
deleteNearZeroCoefficientOfVariation

deleteNearZeroCoefficientOfVariation
deleteNearZeroCoefficientOfVariation.mb

deleteNearZeroCoefficientOfVariation.mb
getEPV

getEPV
getEPV.mb

getEPV.mb
cv.mb.splsdacox

MB.sPLS-DACOX Cross-Validation
cv.mb.splsdrcox

MB.sPLS-DRCOX Cross-Validation
loadingplot.Coxmos

loadingplot.Coxmos
loadingplot.fromVector.Coxmos

loadingplot.fromVector.Coxmos
eval_Coxmos_model_per_variable.list

eval_Coxmos_model_per_variable.list
cv.splsdrcox

Cross validation sPLS-DRCOX
cv.splsdacox

Cross validation splsdacox_dynamic
cv.sb.splsdrcox_penalty

SB.sPLS-DRCOX Cross-Validation
cv.sb.splsicox

Cross validation cv.sb.splsicox
getCutoffAutoKM.list

getCutoffAutoKM.list
getDesign.MB

getDesign.MB
eval_Coxmos_models

eval_Coxmos_models
integ

Numerical Integral function using Simpson's rule
muro

The value of squared integral x^2 k(x) dx and integral x k(x) K(x) dx
mb.splsdrcox

MB.sPLS-DRCOX
mb.splsdacox

MB.sPLS-DACOX
dnorkernel

Derivative of normal distribution
plot_PLS_Coxmos

plot_PLS_Coxmos
plot_cox.event

plot_cox.event
plot_evaluation

plot_evaluation
plot_evaluation.list

plot_evaluation.list
isb.splsicox

Iterative single-block sPLS-ICOX
plot_observation.pseudobeta

plot_pseudobeta.newObservation
plot_observation.eventHistogram

plot_observation.eventHistogram
plot_cox.event.list

plot_cox.event.list
plot_divergent.biplot

plot_divergent.biplot
getAutoKM

getAutoKM
factorToBinary

factorToBinary
ker_dis_i

Distribution function without the ith observation
eval_Coxmos_model_per_variable

eval_Coxmos_model_per_variable
getAutoKM.list

getAutoKM.list
print.Coxmos

print.Coxmos
predict.Coxmos

predict.Coxmos
norm01

norm01
plot_observation.eventDensity

plot_observation.eventDensity
plot_time.list

Time consuming plot.
plot_pseudobeta.list

plot_pseudobeta.list
plot_multipleObservations.LP.list

plot_multipleObservations.LP.list
plot_forest.list

plot_forest.list
save_ggplot

save_ggplot
isb.splsdacox

Iterative single-block sPLS-DACOX Dynamic
plot_multipleObservations.LP

plot_multipleObservations.LP
isb.splsdrcox

Iterative single-block sPLS-DRCOX Dynamic
isb.splsdrcox_penalty

Iterative single-block sPLS-DRCOX
getCutoffAutoKM

getCutoffAutoKM
plot_proportionalHazard

plot_proportionalHazard
kfunction

Kernel distribution function
kfunc

Function to evaluate the matrix of data vector minus the grid points divided by the bandwidth value.
plot_observation.pseudobeta.list

plot_observation.pseudobeta.list
splsdacox

sPLS-DACOX Dynamic
splsdrcox

sPLS-DRCOX Dynamic
plot_Coxmos.PLS.model

plot_Coxmos.PLS.model
plot_Coxmos.MB.PLS.model

plot_Coxmos.MB.PLS.model
plot_forest

plot_forest
plot_events

plot_events
sb.splsicox

SB.sPLS-ICOX
wquantile

Weighted quartile estimation
sb.splsdrcox_penalty

SB.sPLS-DRCOX
plot_pseudobeta

plot_pseudobeta
plot_proportionalHazard.list

plot_proportionalHazard.list
wbw

Function to select the bandwidth parameter needed for smoothing the time-dependent ROC curve.
save_ggplot_lst

save_ggplot_lst
w.starplot.Coxmos

w.starplot.Coxmos
wIQR

Weighted inter-quartile range estimation
sb.splsdacox

SB.sPLS-DACOX-Dynamic
sb.splsdrcox

SB.sPLS-DRCOX-Dynamic
splsdrcox_penalty

sPLS-DRCOX
wvar

Weighted variance estimation
splsicox

sPLS-ICOX
Y_multiomic

Y_multiomic Data
PI

The plug-in bandwidth selection for weighted data
Beran

Estimation of the conditional distribution function of the response, given the covariate under random censoring.
CV

The cross-validation bandwidth selection for weighted data
X_proteomic

X_proteomic Data
X_multiomic

X_multiomic Data
coxSW

coxSW
cv.coxEN

coxEN Cross-Validation