plotPredictedPDF {PatientLevelPrediction} | R Documentation |
Plot the Predicted probability density function, showing prediction overlap between true and false cases
Description
Plot the Predicted probability density function, showing prediction overlap between true and false cases
Usage
plotPredictedPDF(
plpResult,
typeColumn = "evaluation",
saveLocation = NULL,
fileName = "PredictedPDF.png"
)
Arguments
plpResult |
A plp result object as generated using the |
typeColumn |
The name of the column specifying the evaluation type |
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 |
Details
Create a plot showing the predicted probability density function, showing prediction overlap between true and false cases
Value
A ggplot object. Use the ggsave
function to save to file in a different
format.
Examples
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n=1000)
saveLoc <- file.path(tempdir(), "plotPredictedPDF")
results <- runPlp(plpData, outcomeId = 3, saveDirectory = saveLoc)
plotPredictedPDF(results)
# clean up
unlink(saveLoc, recursive = TRUE)
[Package PatientLevelPrediction version 6.4.1 Index]