| plasma-class | R Documentation |
"plasma"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.
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"), ...)
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. |
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 should be defined using the plasma function.
traindata:An object of class MultiOmics used 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.
plot:Plots a Kaplan-Meier curve of the final coxph model 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 n largest
weights assigned to features from the appropriate data source.
Kevin R. Coombes krc@silicovore.com, Kyoko Yamaguchi kyoko.yamaguchi@osumc.edu
plasmaPredictions, plsr
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.