| plasma-class {plasma} | R Documentation |
Class "plasma"
Description
The plasma object class is returned after running the plasma function.
The plasma function uses the PLSRCox components from one
dataset as the predictor variables and the PLSRCox components
of another dataset as the response variables to fit a partial least
squares regression (plsr) model. Then, we take the mean of the
predictions to create a final matrix of samples versus components.
The matrix of components described earlier is then used to fit a Cox
Proportional Hazards (coxph) model with AIC stepwise variable
selection to return a final object of class plasma which
includes a coxph model with a reduced number of predictors.
Usage
plasma(object, multi)
## S4 method for signature 'plasma,missing'
plot(x, y, ...)
## S4 method for signature 'plasma'
barplot(height, source, n, direction = c("both", "up","down"),
lhcol = c("cyan", "red"), wt = c("raw", "std"), ...)
## S4 method for signature 'plasma'
predict(object, newdata = NULL, type = c("components", "risk",
"split"), ...)
Arguments
multi |
an object of the |
object |
an object of the |
height |
an object of the |
x |
an object of class |
y |
An ignored argrument for the plot method. |
source |
A length-one character vector; the name of a data set in
a |
n |
A length-one integer vector; the number of high-weight features to display. |
direction |
A length-one character vector; show features with positive weights (up), negative (down), or both. |
lhcol |
A chaacter vector of length 2, indicating the preferred colors for low (negative) or high (positive) weights. |
wt |
A character string indicating whether to plot raw weights or standardized weights. |
newdata |
A |
type |
An enumerated character value. |
... |
Additional graphical parameters. |
Value
The plasma function returns a newly constructed object of the plasma class. The plot method invisibly returns the object on which it was invoked. The predict method returns an object of the plasmaPredictions class.
Objects from the Class
Objects should be defined using the plasma function.
Slots
traindata:An object of class
MultiOmicsused for training the model.compModels:A list containing objects in the form of
plsr.fullModel:A coxph object with variables (components) selected via AIC stepwise selection.
Methods
plot:Plots a Kaplan-Meier curve of the final
coxphmodel that has been categorized into “low risk” and “high risk” based whether it is higher or lower, respectively, than the median value of risk.predict:creates an object of class
plasmaPredictions.barplot:Produces a barplot of the
nlargest weights assigned to features from the appropriate datasource.
Author(s)
Kevin R. Coombes krc@silicovore.com, Kyoko Yamaguchi kyoko.yamaguchi@osumc.edu
See Also
plasmaPredictions, plsr
Examples
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")
pl <- plasma(object = trainD, multi = firstPass)
plot(pl, legloc = "topright", main = "Training Data")
barplot(pl, "RPPA", 6)
barplot(pl, "RPPA", 10, "up")