Learn R Programming

PatientLevelPrediction (version 6.4.1)

plotVariableScatterplot: Plot the variable importance scatterplot

Description

Plot the variable importance scatterplot

Usage

plotVariableScatterplot(
  covariateSummary,
  saveLocation = NULL,
  fileName = "VariableScatterplot.png"
)

Value

A ggplot object. Use the ggsave function to save to file in a different format.

Arguments

covariateSummary

A prediction object as generated using the runPlp function.

saveLocation

Directory to save plot (if NULL plot is not saved)

fileName

Name of the file to save to plot, for example 'plot.png'. See the function ggsave in the ggplot2 package for supported file formats.

Details

Create a plot showing the variable importance scatterplot #'

Examples

Run this code
  # takes too long 
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n=1000)
saveLoc <- file.path(tempdir(), "plotVariableScatterplot")
results <- runPlp(plpData, outcomeId = 3, saveDirectory = saveLoc)
plotVariableScatterplot(results$covariateSummary)
# clean up

Run the code above in your browser using DataLab