MultiplePLSCoxModels-class | R Documentation |
"MultiplePLSCoxModels"
The MultiplePLSCoxModels
object class ...
The validMultipleCoxModels
function checks if each data set contains the same set of samples.
The fitCoxModels
function fits many plsRcoxmodels and returns an S4 object of class MultiplePLSCoxModels
.
The getSizes
function returns a matrix with the list of dataframes of the MultiOmics
object as rownames and columns with NT, cNT, and p-values.
fitCoxModels(multi, timevar, eventvar, eventvalue, verbose)
## S4 method for signature 'MultiplePLSCoxModels'
summary(object, ...)
## S4 method for signature 'MultiplePLSCoxModels,missing'
plot(x, y, col = c("blue", "red"),
lwd = 2, xlab = "", ylab = "Fraction Surviving",
mark.time = TRUE, legloc = "topright", ...)
## S4 method for signature 'MultiplePLSCoxModels'
predict(object, newdata, type = c("components", "risk",
"split", "survfit"), ...)
multi |
an object of class |
timevar |
a column in the |
eventvar |
a column in the |
eventvalue |
a character string specifying the value of the event in |
verbose |
logical; should the function report progress. |
object |
an object of class |
x |
an object of class |
y |
An ignored argrument for the plot method. |
col |
A vector of color specifications. Default is c(“blue”, “red”). |
lwd |
A vector specifying the line width. Default is “2”. |
xlab |
A character string to label the x-axis. Default is “”. |
ylab |
A character string to label the y-axis. Default is “Fraction Surviving”. |
mark.time |
A logical value; should tickmarks indicate censored data? Default is TRUE. |
legloc |
A character string indicating where to put the legend. Default is “topright”. |
... |
Other graphical parameters. |
newdata |
A |
type |
An enumerated character value. |
The fitCoxModels
function retuns a newly constructed object of
the MultiplePLSCoxModels
class. The plot
method
invisibly returns the object on which it was invoked. The
summary
method returns no value. The predict method returns a
list of prediction results, each of which comes from the
predict
method for the SingleModel-class.
models
:A list of SingleModel
objects, one for each assay.
timevar
:A character matching the name of the column containing the time-to-event.
eventvar
:A character matching the name of the column containing the event.
eventvalue
:A character specifying the event in eventvar.
plot
:Plots Kaplan-Meier curves for each omics dataset split into Low Risk and High Risk groups.
summary
:Returns a description of the
MultiplePLSCoxModels
object and the names of the omics
datasets used to build the model.
predict
:usually returns a list of numeric
vectors of predicted risk per data type. When type = "survfit"
,
retuns a list of survfit
objects.
Kevin R. Coombes krc@silicovore.com, Kyoko Yamaguchi kyoko.yamaguchi@osumc.edu
fitSingleModel
fls <- try(loadESCAdata())
if (inherits(fls, "try-error")) {
stop("Unable to load data from remote server.")
}
# restrict data set size
MO <- with(plasmaEnv, prepareMultiOmics(
assemble[c("ClinicalBin", "ClinicalCont", "RPPA")], Outcome))
splitVec <- with(plasmaEnv, rbinom(nrow(Outcome), 1, 0.6))
trainD <- MO[, splitVec == 1]
testD <- MO[, splitVec == 0]
firstPass <- fitCoxModels(trainD, "Days", "vital_status", "dead")
summary(firstPass)
plot(firstPass)
getSizes(firstPass)
pre1 <- predict(firstPass, testD)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.