generateCPHM | R Documentation |
This function generates a Cox proportional hazards regression model between a provided vector of values associated to samples and the abundance of each clusters. This generated model can then be used to predict biological outcomes in the context of survival/progression studies.
generateCPHM(Results, variable, status, use.percentages = FALSE,
clusters = NULL, th.pvalue = 1, show.error = FALSE, ...)
Results |
a 'Results' object |
variable |
a numerical named vector providing the correspondence between sample names and specific phenotypes (or NA values to infer the phenotypes) |
status |
a numeric vector providing the correspondence between sample names and specific status (or NA values to infer the status) |
use.percentages |
a logical specifying if the computations should be performed on percentage |
clusters |
a character vector specifying the names of the clusters used to compute the Cox model (all clusters are selected by default) |
th.pvalue |
a numeric between 0 and 1 specifying the maximal p-value of each term in the returned model |
show.error |
a logical indicating if error bars should be used to display the coefficients standard deviations |
... |
further parameters passed to the R coxph method |
The 'clusters' parameter provides the name of the clusters to include in the model.
The number of clusters allowed in the model can vary depending the number of values to infer. Please refer to the documentation of R coxph and coxph.predict functions for more details.
Firstly, the function computed the glm model using all clusters as terms of the model. Then, the model is iteratively regenerated by discarding at each step the terms with the highest p-value higher than the 'th.pvalue' thershold. In this way, the model can correctly fit the data while being parsimonious. By default, the 'p-value' thershold parameter is set to 1 in order to include all terms in the model. If no terms having a p-value below the threshold, both the returned model and the prediction are set to NULL.
a list of 5 elements corresponding to: a Cox proportional hazards regression model object as provided by the R coxph function ('model' element), a named vector of predicted values for each sample ('variable.predictions' element), the representation of clusters coeficients ('plot.clusters' element), and the representation of samples predictions values ('plot.samples' element), and a representation of the provided survival curve ('plot.provided_survival_curve' element).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.