PatientLevelPrediction6.5.1 package

Develop Clinical Prediction Models Using the Common Data Model

averagePrecision

Calculate the average precision

brierScore

brierScore

calibrationInLarge

Calculate the calibration in large

calibrationLine

calibrationLine

computeAuc

Compute the area under the ROC curve

computeGridPerformance

Computes grid performance with a specified performance function

configurePython

Sets up a python environment to use for PLP (can be conda or venv)

covariateSummary

covariateSummary

createCohortCovariateSettings

Extracts covariates based on cohorts

createDatabaseDetails

Create a setting that holds the details about the cdmDatabase connecti...

createDatabaseSchemaSettings

Create the PatientLevelPrediction database result schema settings

createDefaultExecuteSettings

Creates default list of settings specifying what parts of runPlp to ex...

createDefaultSplitSetting

Create the settings for defining how the plpData are split into test/v...

createExecuteSettings

Creates list of settings specifying what parts of runPlp to execute

createExistingSplitSettings

Create the settings for defining how the plpData are split into test/v...

createFeatureEngineeringSettings

Create the settings for defining any feature engineering that will be ...

createGlmModel

createGlmModel

createIterativeImputer

Create Iterative Imputer settings

createLearningCurve

createLearningCurve

createLogSettings

Create the settings for logging the progression of the analysis

createModelDesign

Specify settings for developing a single model

createNormalizer

Create the settings for normalizing the data @param type The type of n...

createPlpResultTables

Create the results tables to store PatientLevelPrediction models and r...

createPreprocessSettings

Create the settings for preprocessing the trainData.

createRandomForestFeatureSelection

Create the settings for random foreat based feature selection

createRareFeatureRemover

Create the settings for removing rare features

createRestrictPlpDataSettings

createRestrictPlpDataSettings define extra restriction settings when c...

createSampleSettings

Create the settings for defining how the trainData from splitData ar...

createSimpleImputer

Create Simple Imputer settings

createSklearnModel

Plug an existing scikit learn python model into the PLP framework

createSplineSettings

Create the settings for adding a spline for continuous variables

createStratifiedImputationSettings

Create the settings for using stratified imputation.

createStudyPopulation

Create a study population

createStudyPopulationSettings

create the study population settings

createTempModelLoc

Create a temporary model location

createUnivariateFeatureSelection

Create the settings for defining any feature selection that will be do...

createValidationDesign

createValidationDesign - Define the validation design for external val...

createValidationSettings

createValidationSettings define optional settings for performing exter...

diagnoseMultiplePlp

Run a list of predictions diagnoses

diagnosePlp

diagnostic - Investigates the prediction problem settings - use before...

evaluatePlp

evaluatePlp

externalValidateDbPlp

externalValidateDbPlp - Validate a model on new databases

extractDatabaseToCsv

Exports all the results from a database into csv files

fitPlp

fitPlp

getCalibrationSummary

Get a sparse summary of the calibration

getCohortCovariateData

Extracts covariates based on cohorts

getDemographicSummary

Get a demographic summary

getEunomiaPlpData

Create a plpData object from the Eunomia database'

getPlpData

Extract the patient level prediction data from the server

getPredictionDistribution_binary

Calculates the prediction distribution

getPredictionDistribution

Calculates the prediction distribution

getThresholdSummary

Calculate all measures for sparse ROC

ici

Calculate the Integrated Calibration Index from Austin and Steyerberg ...

insertCsvToDatabase

Function to insert results into a database from csvs

insertResultsToSqlite

Create sqlite database with the results

iterativeImpute

Imputation

listAppend

join two lists

listCartesian

Cartesian product

loadPlpAnalysesJson

Load the multiple prediction json settings from a file

loadPlpData

Load the plpData from a folder

loadPlpModel

loads the plp model

loadPlpResult

Loads the evalaution dataframe

loadPlpShareable

Loads the plp result saved as json/csv files for transparent sharing

loadPrediction

Loads the prediction dataframe to json

MapIds

Map covariate and row Ids so they start from 1

migrateDataModel

Migrate Data model

minMaxNormalize

A function that normalizes continous features to have values between 0...

modelBasedConcordance

Calculate the model-based concordance, which is a calculation of the e...

outcomeSurvivalPlot

Plot the outcome incidence over time

PatientLevelPrediction

PatientLevelPrediction

pfi

Permutation Feature Importance

plotDemographicSummary

Plot the Observed vs. expected incidence, by age and gender

plotF1Measure

Plot the F1 measure efficiency frontier using the sparse thresholdSumm...

plotGeneralizability

Plot the train/test generalizability diagnostic

plotLearningCurve

plotLearningCurve

plotNetBenefit

Plot the net benefit

plotPlp

Plot all the PatientLevelPrediction plots

plotPrecisionRecall

Plot the precision-recall curve using the sparse thresholdSummary data...

plotPredictedPDF

Plot the Predicted probability density function, showing prediction ov...

plotPredictionDistribution

Plot the side-by-side boxplots of prediction distribution, by class

plotPreferencePDF

Plot the preference score probability density function, showing predic...

plotSmoothCalibration

Plot the smooth calibration as detailed in Calster et al. "A calibrati...

plotSparseCalibration

Plot the calibration

plotSparseCalibration2

Plot the conventional calibration

plotSparseRoc

Plot the ROC curve using the sparse thresholdSummary data frame

plotVariableScatterplot

Plot the variable importance scatterplot

pmmFit

Predictive mean matching using lasso

predictCyclops

Create predictive probabilities

predictGlm

predict using a logistic regression model

predictPlp

predictPlp

preprocessData

A function that wraps around FeatureExtraction::tidyCovariateData to n...

print.plpData

Print a plpData object

print.summary.plpData

Print a summary.plpData object

recalibratePlp

recalibratePlp

recalibratePlpRefit

recalibratePlpRefit

removeRareFeatures

A function that removes rare features from the data

robustNormalize

A function that normalizes continous by the interquartile range and op...

runMultiplePlp

Run a list of predictions analyses

runPlp

runPlp - Develop and internally evaluate a model using specified setti...

savePlpAnalysesJson

Save the modelDesignList to a json file

savePlpData

Save the plpData to folder

savePlpModel

Saves the plp model

savePlpResult

Saves the result from runPlp into the location directory

savePlpShareable

Save the plp result as json files and csv files for transparent sharin...

savePrediction

Saves the prediction dataframe to a json file

setAdaBoost

Create setting for AdaBoost with python DecisionTreeClassifier base es...

setCoxModel

Create setting for lasso Cox model

setDecisionTree

Create setting for the scikit-learn DecisionTree with python

setGradientBoostingMachine

Create setting for gradient boosting machine model using gbm_xgboost i...

setIterativeHardThresholding

Create setting for Iterative Hard Thresholding model

setLassoLogisticRegression

Create modelSettings for lasso logistic regression

setLightGBM

Create setting for gradient boosting machine model using lightGBM (htt...

setMLP

Create setting for neural network model with python's scikit-learn. Fo...

setNaiveBayes

Create setting for naive bayes model with python

setPythonEnvironment

Use the python environment created using configurePython()

setRandomForest

Create setting for random forest model using sklearn

setSVM

Create setting for the python sklearn SVM (SVC function)

simpleImpute

Simple Imputation

simulatePlpData

Generate simulated data

sklearnFromJson

Loads sklearn python model from json

sklearnToJson

Saves sklearn python model object to json in path

splitData

Split the plpData into test/train sets using a splitting settings of c...

summary.plpData

Summarize a plpData object

toSparseM

Convert the plpData in COO format into a sparse R matrix

validateExternal

validateExternal - Validate model performance on new data

validateMultiplePlp

externally validate the multiple plp models across new datasets

viewDatabaseResultPlp

open a local shiny app for viewing the result of a PLP analyses from a...

viewMultiplePlp

open a local shiny app for viewing the result of a multiple PLP analys...

viewPlp

viewPlp - Interactively view the performance and model settings

A user friendly way to create patient level prediction models using the Observational Medical Outcomes Partnership Common Data Model. Given a cohort of interest and an outcome of interest, the package can use data in the Common Data Model to build a large set of features. These features can then be used to fit a predictive model with a number of machine learning algorithms. This is further described in Reps (2017) <doi:10.1093/jamia/ocy032>.

  • Maintainer: Egill Fridgeirsson
  • License: Apache License 2.0
  • Last published: 2025-10-15