Validation of patient-level prediction models with the HADES PatientLevelPrediction Package
Source:R/Module-PatientLevelPredictionValidation.R
PatientLevelPredictionValidationModule.RdModule for performing patient-level prediction model validation for models built using the PatientLevelPrediction package.
Super class
Strategus::StrategusModule -> PatientLevelPredictionValidationModule
Methods
Public methods
Method execute()
Executes the PatientLevelPrediction package to validate a PLP model
Usage
PatientLevelPredictionValidationModule$execute(
connectionDetails,
analysisSpecifications,
executionSettings
)Arguments
connectionDetailsAn object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().executionSettingsAn object of type
ExecutionSettingsas created bycreateCdmExecutionSettings()orcreateResultsExecutionSettings().
Method createResultsDataModel()
Create the results data model for the module
Usage
PatientLevelPredictionValidationModule$createResultsDataModel(
resultsConnectionDetails,
resultsDatabaseSchema,
tablePrefix = self$tablePrefix
)Arguments
resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsDatabaseSchemaThe schema in the results database that holds the results data model.
tablePrefixA prefix to apply to the database table names (optional).
Method uploadResults()
Upload the results for the module
Usage
PatientLevelPredictionValidationModule$uploadResults(
resultsConnectionDetails,
analysisSpecifications,
resultsDataModelSettings
)Arguments
resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.resultsConnectionDetailsThe connection details to the results database which is an object of class
connectionDetailsas created by theDatabaseConnector::createConnectionDetails()function.analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().analysisSpecificationsAn object of type
AnalysisSpecificationsas created bycreateEmptyAnalysisSpecificiations().resultsDataModelSettingsThe results data model settings as created using [@seealso
createResultsDataModelSettings()]
Method createModuleSpecifications()
Creates the PatientLevelPredictionValidation Module Specifications
Usage
PatientLevelPredictionValidationModule$createModuleSpecifications(
validationList = list(PatientLevelPrediction::createValidationDesign(plpModelList =
list(file.path("location_to_model")), targetId = 1, outcomeId = 3,
restrictPlpDataSettings = PatientLevelPrediction::createRestrictPlpDataSettings(),
populationSettings = NULL, recalibrate = "weakRecalibration", runCovariateSummary =
TRUE), PatientLevelPrediction::createValidationDesign(plpModelList =
list(file.path("location_to_model")), targetId = 4, outcomeId = 3,
restrictPlpDataSettings = PatientLevelPrediction::createRestrictPlpDataSettings(),
populationSettings = NULL, recalibrate = "weakRecalibration", runCovariateSummary
= TRUE)),
logLevel = "INFO"
)Arguments
validationListA list of validation designs from
PatientLevelPrediction::createValidationDesignlogLevelThe logging level while executing the model validation.