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

316

Version

1.1.5

License

CC BY 4.0

Issues

Pull Requests

Stars

Forks

Maintainer

Pedro Salguero

Last Published

September 22nd, 2025

Functions in Coxmos (1.1.5)

cv.isb.splsdrcox

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

Coxmos Modeling Function
cox.prediction

cox.prediction
cv.isb.splsdacox

Iterative SB.sPLS-DACOX-Dynamic Cross-Validation
cenROC

Estimation of the time-dependent ROC curve for right censored survival data
coxEN

coxEN
coxSW

coxSW
cv.coxEN

coxEN Cross-Validation
cox

cox
cv.coxmos

Cross-Validation for COX Models
cv.isb.splsdrcox_penalty

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

Iterative SB.sPLS-ICOX-Dynamic Cross-Validation
cv.mb.splsdacox

MB.sPLS-DACOX Cross-Validation
cv.sb.splsdacox

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

Cross validation splsdacox_dynamic
cv.sb.splsdrcox_penalty

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

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

Cross validation cv.sb.splsicox
cv.mb.coxmos

Multiblock COX Cross-Validation Function
cv.mb.splsdrcox

MB.sPLS-DRCOX Cross-Validation
dnorkernel

Derivative of normal distribution
deleteZeroOrNearZeroVariance.mb

deleteZeroOrNearZeroVariance.mb
eval_Coxmos_model_per_variable

eval_Coxmos_model_per_variable
cv.splsicox

sPLS-ICOX Cross-Validation
eval_Coxmos_model_per_variable.list

eval_Coxmos_model_per_variable.list
cv.splsdrcox

Cross validation sPLS-DRCOX
deleteNearZeroCoefficientOfVariation

deleteNearZeroCoefficientOfVariation
cv.splsdrcox_penalty

sPLS-DRCOX Cross-Validation
deleteZeroOrNearZeroVariance

deleteZeroOrNearZeroVariance
deleteNearZeroCoefficientOfVariation.mb

deleteNearZeroCoefficientOfVariation.mb
getAutoKM.list

getAutoKM.list
getDesign.MB

getDesign.MB
getAutoKM

getAutoKM
eval_Coxmos_models

eval_Coxmos_models
getCutoffAutoKM.list

getCutoffAutoKM.list
getEPV

getEPV
factorToBinary

factorToBinary
getEPV.mb

getEPV.mb
getTestKM

getTestKM
getCutoffAutoKM

getCutoffAutoKM
isb.splsicox

Iterative single-block sPLS-ICOX
kfunc

Function to evaluate the matrix of data vector minus the grid points divided by the bandwidth value.
isb.splsdrcox

Iterative single-block sPLS-DRCOX Dynamic
kfunction

Kernel distribution function
isb.splsdrcox_penalty

Iterative single-block sPLS-DRCOX
integ

Numerical Integral function using Simpson's rule
plot_Coxmos.MB.PLS.model

plot_Coxmos.MB.PLS.model
norm01

norm01
isb.splsdacox

Iterative single-block sPLS-DACOX Dynamic
mb.coxmos

Multiblock COX Modeling Function
mb.splsdacox

MB.sPLS-DACOX
ker_dis_i

Distribution function without the ith observation
plot_Coxmos.PLS.model

plot_Coxmos.PLS.model
plot_cox.event

plot_cox.event
loadingplot.fromVector.Coxmos

loadingplot.fromVector.Coxmos
getTrainTest

getTrainTest
getTestKM.list

getTestKM.list
loadingplot.Coxmos

loadingplot.Coxmos
plot_observation.eventDensity

plot_observation.eventDensity
plot_multipleObservations.LP.list

plot_multipleObservations.LP.list
plot_forest.list

plot_forest.list
plot_multipleObservations.LP

plot_multipleObservations.LP
plot_events

plot_events
plot_forest

plot_forest
plot_observation.pseudobeta.list

plot_observation.pseudobeta.list
plot_proportionalHazard

plot_proportionalHazard
mb.splsdrcox

MB.sPLS-DRCOX
plot_cox.event.list

plot_cox.event.list
plot_divergent.biplot

plot_divergent.biplot
muro

The value of squared integral x^2 k(x) dx and integral x k(x) K(x) dx
plot_proportionalHazard.list

plot_proportionalHazard.list
plot_pseudobeta.list

plot_pseudobeta.list
plot_sPLS_Coxmos

plot_sPLS_Coxmos
plot_pseudobeta

plot_pseudobeta
sb.splsdrcox

SB.sPLS-DRCOX-Dynamic
splsdrcox

sPLS-DRCOX Dynamic
plot_observation.eventHistogram

plot_observation.eventHistogram
sb.splsicox

SB.sPLS-ICOX
sb.splsdrcox_penalty

SB.sPLS-DRCOX
plot_observation.pseudobeta

plot_pseudobeta.newObservation
save_ggplot

save_ggplot
plot_evaluation

plot_evaluation
plot_evaluation.list

plot_evaluation.list
sb.splsdacox

SB.sPLS-DACOX-Dynamic
save_ggplot_lst

save_ggplot_lst
print.Coxmos

print.Coxmos
wquantile

Weighted quartile estimation
transformIllegalChars

transformIllegalChars
wbw

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

sPLS-DRCOX
splsicox

sPLS-ICOX
w.starplot.Coxmos

w.starplot.Coxmos
splsdacox

sPLS-DACOX Dynamic
wIQR

Weighted inter-quartile range estimation
predict.Coxmos

predict.Coxmos
plot_time.list

Time consuming plot.
wvar

Weighted variance estimation
CV

The cross-validation bandwidth selection for weighted data
Beran

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

The plug-in bandwidth selection for weighted data
Y_multiomic

Y_multiomic Data
NR

The normal reference bandwidth selection for weighted data
X_multiomic

X_multiomic Data
X_proteomic

X_proteomic Data
Y_proteomic

Y_proteomic Data
Csurv

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

ROC estimation function