| SingleModel-class {plasma} | R Documentation |
Class "SingleModel"
Description
The fitSingleModel function takes in an object of
MultiOmics class and returns a new object of
SingleModel class.
Usage
fitSingleModel(multi, N, timevar, eventvar, eventvalue)
## S4 method for signature 'SingleModel'
summary(object, ...)
## S4 method for signature 'SingleModel,missing'
plot(x, y, col = c("blue", "red"),
lwd = 2, xlab = "", ylab = "Fraction Surviving",
mark.time = TRUE, legloc = "topright", ...)
## S4 method for signature 'SingleModel'
predict(object, newdata, type = c("components", "risk",
"split", "survfit"), ...)
Arguments
multi |
an object of class |
N |
A character string identifying the data set being modeled. |
timevar |
a column in the |
eventvar |
a column in the |
eventvalue |
a character string specifying the value of the event. |
x |
an object of class |
y |
An ignored argrument for the plot method. |
col |
A vector of color specifications. |
lwd |
A vactor specifying the line width. |
xlab |
A character string to label the x-axis. |
ylab |
A character string to label the y-axis. |
mark.time |
A logical value; should tickmarks indicate censored data? |
legloc |
A character string indicating where to put the legend. |
object |
an object of class |
newdata |
A |
type |
An enumerated character value. |
... |
other parameters used in graphing or prediction. |
Value
The fitSingleModel function returns a newly constructed object
of the SingleModel class. The plot method invisibly
returns the value on which it was invoked. The summary method
returns an object summarizing the final model produced by PLS R cox
regression. The predict method returns either a vector or
matrix depending on the type of predictions requested.
Slots
plsmod:Object of class
plsRcoxmodelcontaining the fitted model.Xout:Object of type
data.framecontaining the originaloutcomedataframe and additional columns for "Risk", and "Split", corresponding to the risk of the event calculated by the model, and patient assignment to low versus high-risk groups, respectively.dsname:A character vector of length one; the name of the data set being modeled from a
MultiOmicsobject.SF:Object of type
survfitwhich is used by theplotmethod to plot Kaplan-Meier curves grouped by predicted Split. See documentation forlink{survfit}.riskModel:Object of type
coxphthat uses predicted Risk (continuous) as the predictor variable and survival as the response variable. See documentation forlink{coxph}.splitModel:Object of type
coxphthat uses predicted Split (predicted Risk categorized into “high” and “low” risk by the median predicted Risk) as the predictor variable and survival as the response variable. See documentation forlink{coxph}.
Methods
plot:Plots Kaplan-Meier curves for each omics dataset split into Low Risk and High Risk groups.
summary:Returns a description of the
MultiplePLSCoxModelsobject and the names of the omics datasets used to build the model.predict:Usually, a numeric vector containing the predicted risk values. However, when using
type = "survfit", tghe return value is asurvfitobject from thesurvivalpackage.
Author(s)
Kevin R. Coombes krc@silicovore.com, Kyoko Yamaguchi kyoko.yamaguchi@osumc.edu
See Also
Examples
fls <- try(loadESCAdata())
if (inherits(fls, "try-error")) {
stop("Unable to load data from remote server.")
}
MO <- with(plasmaEnv, prepareMultiOmics(assemble, Outcome) )
MO <- MO[c("ClinicalBin", "ClinicalCont", "RPPA"),]
set.seed(98765)
splitVec <- with(plasmaEnv, rbinom(nrow(Outcome), 1, 0.6))
trainD <- MO[, splitVec == 1]
testD <- MO[, splitVec == 0]
zerothPass <- fitSingleModel(trainD, N = "RPPA",
timevar = "Days", eventvar = "vital_status",
eventvalue = "dead")
summary(zerothPass)
plot(zerothPass)
pre0 <- predict(zerothPass, testD)