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 MultiOmics for fitting the model.

N

A character string identifying the data set being modeled.

timevar

a column in the MultiOmics object in the outcome dataframe containing the time-to-event.

eventvar

a column in the MultiOmics object in the outcome dataframe containing the event.

eventvalue

a character string specifying the value of the event.

x

an object of class plsRcoxmodel for plotting the Kaplan-Meier curves.

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 SingleModel.

newdata

A MultiOmics object with the same structure as the training data.

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 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}.

Methods

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.

Author(s)

Kevin R. Coombes krc@silicovore.com, Kyoko Yamaguchi kyoko.yamaguchi@osumc.edu

See Also

getSizes

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)

[Package plasma version 1.1.3 Index]