| SingleModel-class | R Documentation |
"SingleModel"The fitSingleModel function takes in an object of
MultiOmics class and returns a new object of
SingleModel class.
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"), ...)
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. |
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.
plsmod:Object of class plsRcoxmodel
containing the fitted model.
Xout:Object of type data.frame containing
the original outcome dataframe 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 MultiOmics object.
SF:Object of type survfit which is used by the plot method to plot Kaplan-Meier curves grouped by predicted Split. See documentation for link{survfit}.
riskModel:Object of type coxph that uses predicted Risk (continuous) as the predictor variable and survival as the response variable. See documentation for link{coxph}.
splitModel:Object of type coxph that 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 for link{coxph}.
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, a numeric vector containing
the predicted risk values. However, when using type =
"survfit", tghe return value is a survfit object from
thesurvival package.
Kevin R. Coombes krc@silicovore.com, Kyoko Yamaguchi kyoko.yamaguchi@osumc.edu
getSizes
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.