| PSP-class | R Documentation |
PSP is a single penalized Cox regression model, where an alpha/lambda grid has been optimized using cross-validation and a chosen prediction metric. PSPs are single entities that will compile together into PEPs, the ensemble objects that will average over multiple PSPs to generate an ensemble prediction. Typically a single PSP models a part of the data, such as a cohort strata.
descriptionA general user-provided string describing the PSP
featuresA character vector indicating feature names
strataInformation whether data matrix x included substrata (will be used in plotting functions etc)
alphaseqThe sequence of alpha values to test, ranging between [0,1]; alpha = 0 being ridge regression, 0 < alpha < 1 being elastic net and alpha = 1 being LASSO
cvfoldsThe number of cross-validation folds to utilize; by default 10
nlambdaThe amount of lambda values utilized in each regularization path; by default 100 as in glmnet-package
cvmeanA matrix indicating the mean CV performance in alpha/lambda grid (preferred over median)
cvmedianA matrix indicating the median CV performance in alpha/lambda grid
cvstdevA matrix indicating the standard deviation in CV performance over the folds in the alpha/lambda grid
cvminA matrix indicating minimum CV performance in alpha/lambda grid
cvmaxA matrix indicating maximum CV performance in alpha/lambda grid
scoreThe scoring function, user-defined or one provided by ePCR package such as score.cindex or score.iAUC
cvrepeatNumber of cross-validation procedures to run multiple times and then average over, in order to reduce the effect of binning samples
imputeThe imputation function used if provided matrix 'x' includes missing values; by default the impute.knn-function from BioConductor package 'impute'
optimumThe optimum in alpha/lambda grid, with optimal alpha and similarly for lambda
seedThe initial random seed used for cross-validation
xThe input data matrix
x.expandA function that allows expansion of matrix 'x' to include interactions between variables; if no such are desired, this should be an identity function
yThe Surv-object as in survival-package, which serves as the response y
fitThe glmnet coxnet-object obtained with optimal alpha
criterionThe optimizing criterion; by default "min" for minimizing CV-error
dictionaryA list of discriptions for each variable
regAUCA numeric vector for the AUC under regularization curve as computed by integrateRegCurve-function
# As an example, illustrate a naive PSP built on the small medication cohort
data(TYKSSIMU)
library(survival)
# Minimal example with much fewer patients and variables
psp_ex <- new("PSP", alphaseq=c(0.2, 0.8), nlambda=20, folds=3,
x = xMEDISIMU[1:80,c(1:20,40:50)], y = yMEDISIMU[1:80,"surv"],
seeds = 1, score=score.cindex)
plot(psp_ex) # Optimization surface of alpha/lambda
# Illustrate the use of some PSP-methods:
PSP.KM(psp_ex, cutoff = 0.5) # Kaplan-Meier
PSP.PCA(psp_ex) # PCA plot of training data
PSP.BOX(psp_ex) # Boxplots, here for the first training variable
PSP.CSP(psp_ex) # Cumulative survival probabilities for the training data
invisible(PSP.NA(psp_ex)) # Time-to-event Nelson-Aalen heuristic algorithm
## Not run:
# Computationally intensive novel PSP-fitting is omitted from the test runs
# Functions for readily fitted PSP-objects are illustrated above
data(TYKSSIMU)
library(survival)
psp_meditext <- new("PSP", x = rbind(xMEDISIMU, xTEXTSIMU),
y = Surv(rbind(yMEDISIMU, yTEXTSIMU)[,"surv"]),
plot = TRUE, alphaseq = seq(0, 1, by=.01), scorefunc = score.cindex,
seed = 1, folds = 10, nlambda = 100)
plot(psp_meditext)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.