Description Usage Arguments Details Value Author(s) See Also Examples
The function plotPrediction
plots
cross validation predictions of a phenotype
against true values of the phenotype
with multiple summary stats in the title.
The function plotCVcors
plots
the predictive power (correlations) across
predictions using various numbers of markers.
The function plotROC
plots an ROC (Receiver operating characteristic)
curve for predictions of a binary outcome.
1 2 3 4 5 6 7 8 9 10 11  plotPrediction(
param,
outcome,
forecast,
cpgs2use,
main,
dfFull = NULL)
plotCVcors(cl, param)
plotROC(outcome, forecast)

param 
List of parameters as described in the "RW6_param.Rmd" vignette. 
outcome 
Values of a phenotype. Must be binary for 
forecast 
Predictions for the phenotype. 
cpgs2use 
Number of variables used for prediction (for the legend). 
main 
Part of the title (summary stats are added beneath). 
dfFull 
Number of degrees of freedom for the significance testing. 
cl 
List with three elements:

The plotROC
and plot has no title.
To add a title use title
.
The plotROC
returns the area under the curve (AUC) for the ROC.
The plotPrediction
function returns the list of
calculated statistics printed in the title.
The plotCVcors
returns nothing (NULL
).
Andrey A Shabalin [email protected]gmail.com
See vignettes: browseVignettes("ramwas")
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30  # Sample data
n = 300
param = list(modeloutcome = "Age", mmalpha = 0, cvnfolds = 5)
outcome = rnorm(n, mean = 50, sd = 20)
forecast = outcome + rnorm(n, mean = 0, sd = 20)
cpgs2use = 1000
main = "Prediction success (simulated data)"
# Plot phenotypeprediction plot
plotPrediction(
param,
outcome,
forecast,
cpgs2use,
main)
# Artificial data for plotCVcors()
cl = list(
x = c(50, 100, 200, 500, 1000),
corp = c(0.1, 0.6, 0.7, 0.85, 0.8),
cors = c(0.1, 0.6, 0.7, 0.85, 0.8) + rnorm(5)*0.1)
# Plot prediction performance by the number of markers
plotCVcors(cl, param)
# Make the outcome binary for ROC plot
outcome = (outcome > 50)
# Plot ROC curve and calculate the AUC
plotROC(outcome, forecast)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.