| Title: | Observational Health Data Sciences and Informatics Report Generator |
|---|---|
| Description: | Extract results into R from the Observational Health Data Sciences and Informatics result database (see <https://ohdsi.github.io/Strategus/results-schema/index.html>) and generate reports/presentations via 'quarto' that summarize results in HTML format. Learn more about 'OhdsiReportGenerator' at <https://ohdsi.github.io/OhdsiReportGenerator/>. |
| Authors: | Jenna Reps [aut, cre], Anthony Sena [aut] |
| Maintainer: | Jenna Reps <[email protected]> |
| License: | Apache License 2.0 |
| Version: | 2.2.0 |
| Built: | 2026-05-15 19:33:37 UTC |
| Source: | https://github.com/ohdsi/ohdsireportgenerator |
An internal function to determine the version of CohortMethod used to store results
.getCmVersion(connectionHandler, schema, cmTablePrefix = "cm_").getCmVersion(connectionHandler, schema, cmTablePrefix = "cm_")
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cmTablePrefix |
The prefix used for the cohort method results tables |
Specify the connectionHandler, the schema and the prefixes. This query will attempt to identify if CohortMethod v6 was used by inspecing the migration table. When the migration_order is >= 3 then v6 of CohortMethod was used.
A integer with the major version number of cohort method
Other Estimation:
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
An internal function to determine the version of SCCS used to store results
.getSccsVersion(connectionHandler, schema, sccsTablePrefix = "sccs_").getSccsVersion(connectionHandler, schema, sccsTablePrefix = "sccs_")
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
Specify the connectionHandler, the schema and the prefixes. This query will attempt to identify if SelfControlledCaseSeries v6.1.4 was used by inspecing the migration table. When the migration_order is >= 3 then v6.1.4 of SelfControlledCaseSeries was used.
A integer with the major version number of cohort method
Other Estimation:
.getCmVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
Finds the four TAR columns and creates a new column called tar that pastes the columns into a nice string
addTarColumn(data)addTarColumn(data)
data |
The data.frame with the individual TAR columns that you want to combine into one column |
Create a friendly single tar column
The data data.frame object with the tar column added if seperate TAR columns are found
Other helper:
formatBinaryCovariateName(),
getExampleConnectionDetails(),
getOutcomeTable(),
getTargetTable(),
kableDark(),
removeSpaces()
addTarColumn(data.frame( tarStartWith = 'cohort start', tarStartOffset = 1, tarEndWith = 'cohort start', tarEndOffset = 0 ))addTarColumn(data.frame( tarStartWith = 'cohort start', tarStartOffset = 1, tarEndWith = 'cohort start', tarEndOffset = 0 ))
A function to add indexes to the Characterization results
createCharacterizationIndexes(connectionHandler, schema, cTablePrefix = "c_")createCharacterizationIndexes(connectionHandler, schema, cTablePrefix = "c_")
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
Specify the connectionHandler, the schema and the prefixes
Other Indexes:
createCohortIndexes(),
createIncidenceIndexes(),
createSccsIndexes()
A function to add indexes to the Cohort Generator results
createCohortIndexes(connectionHandler, schema, cgTablePrefix = "cg_")createCohortIndexes(connectionHandler, schema, cgTablePrefix = "cg_")
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cgTablePrefix |
The prefix used for the cohort generator results tables |
Specify the connectionHandler, the schema and the prefixes
Other Indexes:
createCharacterizationIndexes(),
createIncidenceIndexes(),
createSccsIndexes()
A function to add indexes to the incidence results
createIncidenceIndexes(connectionHandler, schema, ciTablePrefix = "ci_")createIncidenceIndexes(connectionHandler, schema, ciTablePrefix = "ci_")
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
ciTablePrefix |
The prefix used for the cohort incidence results tables |
Specify the connectionHandler, the schema and the prefixes
Other Indexes:
createCharacterizationIndexes(),
createCohortIndexes(),
createSccsIndexes()
Generates a report for a given prediction model design
createPredictionReport( connectionHandler, schema, plpTablePrefix, databaseTablePrefix = plpTablePrefix, cgTablePrefix = plpTablePrefix, modelDesignId, output, intermediatesDir = file.path(tempdir(), "plp-prot"), outputFormat = "html_document" )createPredictionReport( connectionHandler, schema, plpTablePrefix, databaseTablePrefix = plpTablePrefix, cgTablePrefix = plpTablePrefix, modelDesignId, output, intermediatesDir = file.path(tempdir(), "plp-prot"), outputFormat = "html_document" )
connectionHandler |
The connection handler to the results database |
schema |
The result database schema |
plpTablePrefix |
The prediction table prefix |
databaseTablePrefix |
The database table name e.g., database_meta_data |
cgTablePrefix |
The cohort generator table prefix |
modelDesignId |
The model design ID of interest |
output |
The folder name where main.html will be save to |
intermediatesDir |
The work directory for rmarkdown |
outputFormat |
the type of outcome html_document or html_fragment |
Specify the connection handler to the result database, the schema name and the modelDesignId of interest to generate a html report summarizing the performance of models developed across databases.
An named R list with the elements 'standard' and 'source'
Other Reporting:
generateFullReport(),
generateSummaryPredictionReport()
A function to add indexes to the SCCS results
createSccsIndexes(connectionHandler, schema, sccsTablePrefix = "sccs_")createSccsIndexes(connectionHandler, schema, sccsTablePrefix = "sccs_")
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
Specify the connectionHandler, the schema and the prefixes
Other Indexes:
createCharacterizationIndexes(),
createCohortIndexes(),
createIncidenceIndexes()
Removes the long part of the covariate name to make it friendly
formatBinaryCovariateName(data)formatBinaryCovariateName(data)
data |
The data.frame with the covariateName column |
Makes the covariateName more friendly and shorter
The data data.frame object with the ovariateName column changed to be more friendly
Other helper:
addTarColumn(),
getExampleConnectionDetails(),
getOutcomeTable(),
getTargetTable(),
kableDark(),
removeSpaces()
formatBinaryCovariateName(data.frame( covariateName = c("fdfgfgf: dgdgff","made up test") ))formatBinaryCovariateName(data.frame( covariateName = c("fdfgfgf: dgdgff","made up test") ))
Generates a full report from a Strategus analysis
generateFullReport( server, username, password, dbms, resultsSchema = NULL, targetId = 1, outcomeIds = 3, comparatorIds = 2, indicationIds = NULL, restrictTargetToIndications = FALSE, cohortNames = c("target name", "outcome name", "comp name"), cohortIds = c(1, 3, 2), includeCI = TRUE, includeCharacterization = TRUE, includeCohortMethod = TRUE, includeSccs = TRUE, includePrediction = TRUE, webAPI = NULL, authMethod = NULL, webApiUsername = NULL, webApiPassword = NULL, outputLocation, outputName = paste0("full_report_", gsub(":", "_", gsub(" ", "_", as.character(date()))), ".html"), intermediateDir = tempdir(), pathToDriver = Sys.getenv("DATABASECONNECTOR_JAR_FOLDER") )generateFullReport( server, username, password, dbms, resultsSchema = NULL, targetId = 1, outcomeIds = 3, comparatorIds = 2, indicationIds = NULL, restrictTargetToIndications = FALSE, cohortNames = c("target name", "outcome name", "comp name"), cohortIds = c(1, 3, 2), includeCI = TRUE, includeCharacterization = TRUE, includeCohortMethod = TRUE, includeSccs = TRUE, includePrediction = TRUE, webAPI = NULL, authMethod = NULL, webApiUsername = NULL, webApiPassword = NULL, outputLocation, outputName = paste0("full_report_", gsub(":", "_", gsub(" ", "_", as.character(date()))), ".html"), intermediateDir = tempdir(), pathToDriver = Sys.getenv("DATABASECONNECTOR_JAR_FOLDER") )
server |
The server containing the result database |
username |
The username for an account that can access the result database |
password |
The password for an account that can access the result database |
dbms |
The dbms used to access the result database |
resultsSchema |
The result database schema |
targetId |
The cohort definition id for the target cohort |
outcomeIds |
The cohort definition id for the outcome |
comparatorIds |
(optional) The cohort definition id for any comparator cohorts. If NULL the report will find and include all possible comparators in the results if includeCohortMethod is TRUE. |
indicationIds |
The cohort definition id for any indication cohorts to show in characterization. If no indication use NULL. |
restrictTargetToIndications |
If you only want the results for targets that are nested by the indicationIds set this to TRUE otherwise results for all children of the targetId will be generated. |
cohortNames |
Friendly names for any cohort used in the study |
cohortIds |
The corresponding Ids for the cohortNames |
includeCI |
Whether to include the cohort incidence slides |
includeCharacterization |
Whether to include the characterization slides |
includeCohortMethod |
Whether to include the cohort method slides |
includeSccs |
Whether to include the self controlled case series slides |
includePrediction |
Whether to include the patient level prediction slides |
webAPI |
The ATLAS web API to use for the characterization index breakdown (set to NULL to not include) |
authMethod |
The authorization method for the webAPI |
webApiUsername |
The username for the webAPI authorization |
webApiPassword |
The password for the webAPI authorization |
outputLocation |
The file location and name to save the protocol |
outputName |
The name of the html protocol that is created |
intermediateDir |
The work directory for quarto |
pathToDriver |
Path to a folder containing the JDBC driver JAR files. |
Specify the connection details to the result database and the schema name to generate the full report.
An html document containing the full results for the target, comparators, indications and outcomes specified.
Other Reporting:
createPredictionReport(),
generateSummaryPredictionReport()
Generates a summary report for a given targets and outcomes
generateSummaryPredictionReport( connectionHandler, schema, targetIds = NULL, outcomeIds = NULL, plpTablePrefix = "plp_", databaseTablePrefix = "", cgTablePrefix = "cg_", outputFolder, outputFileName = "plp-summary.html", intermediatesDir = file.path(tempdir(), "plp-prot"), overwrite = FALSE )generateSummaryPredictionReport( connectionHandler, schema, targetIds = NULL, outcomeIds = NULL, plpTablePrefix = "plp_", databaseTablePrefix = "", cgTablePrefix = "cg_", outputFolder, outputFileName = "plp-summary.html", intermediatesDir = file.path(tempdir(), "plp-prot"), overwrite = FALSE )
connectionHandler |
The connection handler to the results database |
schema |
The result database schema |
targetIds |
The target cohort IDs of interest |
outcomeIds |
The outcome cohort IDs of interest |
plpTablePrefix |
The prediction table prefix |
databaseTablePrefix |
The database table name e.g., database_meta_data |
cgTablePrefix |
The cohort generator table prefix |
outputFolder |
The folder name where file will be save to |
outputFileName |
The file name of the saved report |
intermediatesDir |
The work directory for rmarkdown |
overwrite |
whether to overwrite any existing file at the outputFolder/outputFileName |
Specify the connection handler to the result database, the schema name and the cohortId of interest to generate a html report summarizing the performance of prediction models in the database.
A html file is created with the summary report
Other Reporting:
createPredictionReport(),
generateFullReport()
This function extracts analysis ids, events cohorts, and databases per target from treatment patterns
getAnalysisCohorts(connectionHandler, schema, tpTablePrefix = "tp_")getAnalysisCohorts(connectionHandler, schema, tpTablePrefix = "tp_")
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
tpTablePrefix |
The prefix used for the cohort generator results tables |
Specify the connectionHandler and the schema
Returns a data.frame with the columns:
databaseName a concatinated string of all the database names ran for that analysis
databaseId a concatinated string of all the database ids ran for that analysis
analysisId the analysis ids for the treament patterns run
targetCohortName the target cohort name
targetCohortId the target cohort unique identifier
eventCohortList a concatinated string of all the event cohort names ran for that target
exitCohortList a concatinated string of all the exit cohort names ran for that target
Other TreatmentPatterns:
getEventDuration(),
getTreatmentPathways()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortAnalysis <- getAnalysisCohorts( connectionHandler = connectionHandler, schema = "main" )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortAnalysis <- getAnalysisCohorts( connectionHandler = connectionHandler, schema = "main" )
A function to extract case series characterization results
getBinaryCaseSeries( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, outcomeId = NULL, databaseIds = NULL, riskWindowStart = NULL, riskWindowEnd = NULL, startAnchor = NULL, endAnchor = NULL, conceptIds = NULL, minVal = NULL )getBinaryCaseSeries( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, outcomeId = NULL, databaseIds = NULL, riskWindowStart = NULL, riskWindowEnd = NULL, startAnchor = NULL, endAnchor = NULL, conceptIds = NULL, minVal = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetId |
An integer corresponding to the target cohort ID |
outcomeId |
Am integer corresponding to the outcome cohort ID |
databaseIds |
(optional) One or more unique identifiers for the databases |
riskWindowStart |
(optional) A riskWindowStart to restrict to |
riskWindowEnd |
(optional) A riskWindowEnd to restrict to |
startAnchor |
(optional) A startAnchor to restrict to |
endAnchor |
(optional) An endAnchor to restrict to |
conceptIds |
(optional) An conceptIds to restrict to |
minVal |
(optional) the minimum averageVal to extract |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
A data.frame with the characterization case series results
Other Characterization:
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cs <- getBinaryCaseSeries( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cs <- getBinaryCaseSeries( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3 )
A function to extract non-case and case binary characterization results
getBinaryRiskFactors( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, outcomeId = NULL, databaseId = NULL, analysisIds = c(3), riskWindowStart = NULL, riskWindowEnd = NULL, startAnchor = NULL, endAnchor = NULL )getBinaryRiskFactors( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, outcomeId = NULL, databaseId = NULL, analysisIds = c(3), riskWindowStart = NULL, riskWindowEnd = NULL, startAnchor = NULL, endAnchor = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetId |
An integer corresponding to the target cohort ID |
outcomeId |
Am integer corresponding to the outcome cohort ID |
databaseId |
The database ID to restrict results to |
analysisIds |
The feature extraction analysis ID of interest (e.g., 201 is condition) |
riskWindowStart |
(optional) A vector of time-at-risk risk window starts to restrict to |
riskWindowEnd |
(optional) A vector of time-at-risk risk window ends to restrict to |
startAnchor |
(optional) A vector of time-at-risk start anchors to restrict to |
endAnchor |
(optional) A vector of time-at-risk end anchors to restrict to |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
A data.frame with the characterization results for the cases and non-cases
Other Characterization:
getBinaryCaseSeries(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) rf <- getBinaryRiskFactors( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) rf <- getBinaryRiskFactors( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3 )
This function extracts the specified covariates for the specified targets
getBinaryTargetBaseline( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, analysisIds = NULL, covariateIds = NULL, conceptIds = NULL, databaseIds = NULL )getBinaryTargetBaseline( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, analysisIds = NULL, covariateIds = NULL, conceptIds = NULL, databaseIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
analysisIds |
The analysisIds of the covariate to restrict results to |
covariateIds |
The covariateIds to restict results to |
conceptIds |
The conceptIds of the covariate to restrict results to |
databaseIds |
The databaseIds of the covariate to restrict results to |
Specify the connectionHandler, the schema and the target cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
targetName the target cohort name
targetId the target cohort unique identifier
minPriorObservation the
limitToFirstINDays the
covariateName the
covariateId the
analysisId the
sumValue the
averageValue the
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) btb <- getBinaryTargetBaseline( connectionHandler = connectionHandler, schema = 'main', targetIds = 1 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) btb <- getBinaryTargetBaseline( connectionHandler = connectionHandler, schema = 'main', targetIds = 1 )
This function extracts outcome cohort counts across databases in the results for specified target and outcome cohorts.
getCaseCounts( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL, databaseIds = NULL, riskWindowStart = NULL, riskWindowEnd = NULL, startAnchor = NULL, endAnchor = NULL )getCaseCounts( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL, databaseIds = NULL, riskWindowStart = NULL, riskWindowEnd = NULL, startAnchor = NULL, endAnchor = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
databaseIds |
(optional) A vector of database IDs to restrict to |
riskWindowStart |
(optional) A vector of time-at-risk risk window starts to restrict to |
riskWindowEnd |
(optional) A vector of time-at-risk risk window ends to restrict to |
startAnchor |
(optional) A vector of time-at-risk start anchors to restrict to |
endAnchor |
(optional) A vector of time-at-risk end anchors to restrict to |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
targetName the target cohort name
targetId the target cohort unique identifier
outcomeName the outcome name
outcomeId the outcome unique identifier
rowCount the number of entries in the cohort
personCount the number of people in the cohort
minPriorObservation the minimum required observation days prior to index for an entry
outcomeWashoutDays patients with the outcome occurring within this number of days prior to index are excluded (NA means no exclusion)
riskWindowStart the number of days ofset the start anchor that is the start of the time-at-risk
startAnchor the start anchor is either the target cohort start or cohort end date
riskWindowEnd the number of days ofset the end anchor that is the end of the time-at-risk
endAnchor the end anchor is either the target cohort start or cohort end date
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cc <- getCaseCounts( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cc <- getCaseCounts( connectionHandler = connectionHandler, schema = 'main' )
This function extracts target cohort counts across databases in the results for specified target and outcome cohorts.
getCaseTargetCounts( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL, databaseIds = NULL )getCaseTargetCounts( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL, databaseIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
databaseIds |
A vector of database IDs to restrict to |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
targetName the target cohort name
targetId the target cohort unique identifier
outcomeName the outcome name
outcomeId the outcome unique identifier
rowCount the number of entries in the cohort
personCount the number of people in the cohort
withoutExcludedPersonCount the number of people in the target ignoring exclusions
minPriorObservation the minimum required observation days prior to index for an entry
outcomeWashoutDays patients with the outcome occurring within this number of days prior to index are excluded (NA means no exclusion)
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) tc <- getCaseTargetCounts( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) tc <- getCaseTargetCounts( connectionHandler = connectionHandler, schema = 'main' )
A function to extract cohort aggregate binary feature characterization results
getCharacterizationCohortBinary( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, databaseIds = NULL, minThreshold = 0 )getCharacterizationCohortBinary( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, databaseIds = NULL, minThreshold = 0 )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
databaseIds |
(optional) One or more unique identifiers for the databases |
minThreshold |
The minimum fraction of the cohort that must have the feature for it to be reported |
Specify the connectionHandler, the schema and the target cohort ID and database id
A data.frame with the characterization aggregate binary features for a specific cohort and database
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) binCohort <- getCharacterizationCohortBinary( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, databaseIds = 'eunomia' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) binCohort <- getCharacterizationCohortBinary( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, databaseIds = 'eunomia' )
A function to extract cohort aggregate continuous feature characterization results
getCharacterizationCohortContinuous( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, databaseIds = NULL, minThreshold = 0 )getCharacterizationCohortContinuous( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, databaseIds = NULL, minThreshold = 0 )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
databaseIds |
(optional) One or more unique identifiers for the databases |
minThreshold |
The minimum fraction of the cohort that must have the feature for it to be reported |
Specify the connectionHandler, the schema and the target cohort ID and database id
A data.frame with the characterization aggregate continuous features for a specific cohort and database
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) conCohort <- getCharacterizationCohortContinuous( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, databaseIds = 'eunomia' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) conCohort <- getCharacterizationCohortContinuous( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, databaseIds = 'eunomia' )
This function extracts the age group feature extraction results for cases and targets corresponding to specified target and outcome cohorts.
getCharacterizationDemographics( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, outcomeId = NULL, type = "age" )getCharacterizationDemographics( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, outcomeId = NULL, type = "age" )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetId |
An integer corresponding to the target cohort ID |
outcomeId |
Am integer corresponding to the outcome cohort ID |
type |
A character of 'age' or 'sex' |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
targetName the target cohort name
targetId the target cohort unique identifier
outcomeName the outcome name
outcomeId the outcome unique identifier
minPriorObservation the minimum required observation days prior to index for an entry
outcomeWashoutDays patients with the outcome occurring within this number of days prior to index are excluded (NA means no exclusion)
riskWindowStart the number of days ofset the start anchor that is the start of the time-at-risk
startAnchor the start anchor is either the target cohort start or cohort end date
riskWindowEnd the number of days ofset the end anchor that is the end of the time-at-risk
endAnchor the end anchor is either the target cohort start or cohort end date
covariateName the name of the feature
sumValue the number of cases who have the feature value of 1
averageValue the mean feature value
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
# example code conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) ageData <- getCharacterizationDemographics( connectionHandler = connectionHandler, schema = 'main' )# example code conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) ageData <- getCharacterizationDemographics( connectionHandler = connectionHandler, schema = 'main' )
A function to extract the outcomes found in characterization
getCharacterizationOutcomes( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", targetId = NULL, printTimes = FALSE, useDcrc = TRUE, useTte = TRUE, useRf = TRUE, useCs = TRUE )getCharacterizationOutcomes( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", targetId = NULL, printTimes = FALSE, useDcrc = TRUE, useTte = TRUE, useRf = TRUE, useCs = TRUE )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
targetId |
An integer corresponding to the target cohort ID |
printTimes |
Print the time it takes to run each query |
useDcrc |
look for outcome in dechal-rechal results |
useTte |
look for outcome in time-to-event results |
useRf |
look for outcome in risk-factor results |
useCs |
look for outcome in case series results |
Specify the connectionHandler, the schema and the prefixes
A data.frame with the characterization outcome cohort ids, names and which characterization analyses the cohorts are used in.
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getCharacterizationOutcomes( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getCharacterizationOutcomes( connectionHandler = connectionHandler, schema = 'main' )
A function to extarct the targets found in characterization
getCharacterizationTargets( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", printTimes = FALSE, useTte = TRUE, useDcrc = TRUE, useRf = TRUE, useTb = TRUE, useCs = TRUE )getCharacterizationTargets( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", printTimes = FALSE, useTte = TRUE, useDcrc = TRUE, useRf = TRUE, useTb = TRUE, useCs = TRUE )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
printTimes |
Print the time it takes to run each query |
useTte |
whether to determine what cohorts are used in time to event |
useDcrc |
whether to determine what cohorts are used in dechal-rechal |
useRf |
whether to determine what cohorts are used in risk factor |
useTb |
whether to determine what cohorts are used in target baseline |
useCs |
whether to determine what cohorts are used in case-series |
Specify the connectionHandler, the schema and the prefixes
A data.frame with the characterization target cohort ids, names and which characterization analyses the cohorts are used in.
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getCharacterizationTargets( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getCharacterizationTargets( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the cohort method diagnostics that examine whether the analyses were sufficiently powered and checks for different types of bias.
getCmDiagnosticsData( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL, comparatorIds = NULL, indicationIds = NULL, analysisIds = NULL, databaseIds = NULL )getCmDiagnosticsData( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL, comparatorIds = NULL, indicationIds = NULL, analysisIds = NULL, databaseIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cmTablePrefix |
The prefix used for the cohort method results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
comparatorIds |
A vector of integers corresponding to the comparator cohort IDs |
indicationIds |
A vector of cohort ids for the indication (nesting id) to restrict to |
analysisIds |
An optional vector of analysisIds to filter to |
databaseIds |
An optional vector of databaseIds to filter to |
Specify the connectionHandler, the schema and the target/comparator/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unqiue identifier of the database
analysisId the analysis unique identifier
description a description of the analysis
targetName the target cohort name
targetId the target cohort unique identifier
comparatorName the comparator cohort name
comparatorId the comparator cohort unique identifier
outcomeName the outcome name
outcomeId the outcome cohort unique identifier
maxSdm max allowed standardized difference of means when comparing the target to the comparator after PS adjustment for the ballance diagnostic diagnostic to pass.
sharedMaxSdm max allowed standardized difference of means when comparing the target to the comparator after PS adjustment for the ballance diagnostic diagnostic to pass.
equipoise the bounds on the preference score to determine whether a subject is in equipoise.
mdrr the maximum passable minimum detectable relative risk (mdrr) value. If the mdrr is greater than this the diagnostics will fail.
attritionFraction (depreciated) the minmum attrition before the diagnostics fails.
ease The expected absolute systematic error (ease) measures residual bias.
balanceDiagnostic whether the balance diagnostic passed or failed.
sharedBalanceDiagnostic whether the shared balance diagnostic passed or failed.
equipoiseDiagnostic whether the equipose diagnostic passed or failed.
mdrrDiagnostic whether the mdrr (power) diagnostic passed or failed.
attritionDiagnostic (depreciated) whether the attrition diagnostic passed or failed.
easeDiagnostic whether the ease diagnostic passed or failed.
unblindForEvidenceSynthesis whether the results can be unblinded for the meta analysis.
unblind whether the results can be unblinded.
summaryValue summary of diagnostics results. FAIL, PASS or number of warnings.
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmDiag <- getCmDiagnosticsData( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmDiag <- getCmDiagnosticsData( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )
This function extracts the single database cohort method estimates for results that can be unblinded and have a calibrated RR
getCMEstimation( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL, indicationIds = NULL, comparatorIds = NULL )getCMEstimation( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL, indicationIds = NULL, comparatorIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cmTablePrefix |
The prefix used for the cohort method results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
indicationIds |
A vector of cohort ids for the indication (nesting id) to restrict to |
comparatorIds |
A vector of integers corresponding to the comparator cohort IDs |
Specify the connectionHandler, the schema and the target/comparator/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unqiue identifier of the database
analysisId the analysis design unique identifier
description the analysis design description
targetName the target cohort name
targetId the target cohort unique identifier
comparatorName the comparator cohort name
comparatorId the comparator cohort unique identifier
outcomeName the outcome name
outcomeId the outcome unique identifier
calibratedRr the calibrated relative risk
calibratedRrCi95Lb the calibrated relative risk 95 percent confidence interval lower bound
calibratedRrCi95Ub the calibrated relative risk 95 percent confidence interval upper bound
calibratedP the two sided calibrated p value
calibratedOneSidedP the one sided calibrated p value
calibratedLogRr the calibrated relative risk logged
calibratedSeLogRr the standard error of the calibrated relative risk logged
targetSubjects the number of people in the target cohort
comparatorSubjects the number of people in the comparator cohort
targetDays the total number of days at risk across the target cohort people
comparatorDays the total number of days at risk across the comparator cohort people
targetOutcomes the total number of outcomes occuring during the time at risk for the target cohort people
comparatorOutcomes the total number of outcomes occuring during the time at risk for the comparator cohort people
Unblind Whether the results passed diagnostics and were unblinded
unblindForEvidenceSynthesis whether the results can be unblinded for the meta analysis.
targetEstimator ...
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmEst <- getCMEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmEst <- getCMEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )
This function extracts any meta analysis estimation results for cohort method.
getCmMetaEstimation( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_", esTablePrefix = "es_", targetIds = NULL, outcomeIds = NULL, indicationIds = NULL, comparatorIds = NULL, includeOneSidedP = TRUE )getCmMetaEstimation( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_", esTablePrefix = "es_", targetIds = NULL, outcomeIds = NULL, indicationIds = NULL, comparatorIds = NULL, includeOneSidedP = TRUE )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cmTablePrefix |
The prefix used for the cohort method results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
esTablePrefix |
The prefix used for the evidence synthesis results tables |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
indicationIds |
A vector of cohort ids for the indication (nesting id) to restrict to |
comparatorIds |
A vector of integers corresponding to the comparator cohort IDs |
includeOneSidedP |
This lets you extract from older results that do not have the one sided p by setting this to FALSE |
Specify the connectionHandler, the schema and the target/comparator/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
analysisId the analysis unique identifier
description a description of the analysis
targetName the target cohort name
targetId the target cohort unique identifier
comparatorName the comparator cohort name
comparatorId the comparator cohort unique identifier
outcomeName the outcome name
outcomeId the outcome cohort unique identifier
calibratedRr the calibrated relative risk
calibratedRrCi95Lb the calibrated relative risk 95 percent confidence interval lower bound
calibratedRrCi95Ub the calibrated relative risk 95 percent confidence interval upper bound
calibratedP the two sided calibrated p value
calibratedOneSidedP the one sided calibrated p value
calibratedLogRr the calibrated relative risk logged
calibratedSeLogRr the standard error of the calibrated relative risk logged
targetSubjects the number of people in the target cohort across included database
comparatorSubjects the number of people in the comparator cohort across included database
targetDays the total number of days at risk across the target cohort people across included database
comparatorDays the total number of days at risk across the comparator cohort people across included database
targetOutcomes the total number of outcomes occuring during the time at risk for the target cohort people across included database
comparatorOutcomes the total number of outcomes occuring during the time at risk for the comparator cohort people across included database
unblind whether the results can be unblinded.
nDatabases the number of databases included
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmMeta <- getCmMetaEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmMeta <- getCmMetaEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )
This function extracts the cohort method negative control table.
getCmNegativeControlEstimates( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, comparatorIds = NULL, indicationIds = NULL, analysisIds = NULL, databaseIds = NULL, excludePositiveControls = TRUE )getCmNegativeControlEstimates( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, comparatorIds = NULL, indicationIds = NULL, analysisIds = NULL, databaseIds = NULL, excludePositiveControls = TRUE )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cmTablePrefix |
The prefix used for the cohort method results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
comparatorIds |
A vector of integers corresponding to the comparator cohort IDs |
indicationIds |
The indications that the target & comparator was nested to |
analysisIds |
the analysis IDs to restrict to |
databaseIds |
the database IDs to restrict to |
excludePositiveControls |
Whether to exclude the positive controls |
Specify the connectionHandler, the schema and optionally the target/comparator/outcome/analysis/database IDs
Returns a data.frame with the cohort method negative controls
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmNc <- getCmNegativeControlEstimates( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmNc <- getCmNegativeControlEstimates( connectionHandler = connectionHandler, schema = 'main' )
A function to extract the outcomes found in cohort method
getCmOutcomes( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_", targetId = NULL )getCmOutcomes( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_", targetId = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cmTablePrefix |
The prefix used for the cohort method results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
targetId |
An integer corresponding to the target cohort ID |
Specify the connectionHandler, the schema and the prefixes
A data.frame with the cohort method outcome ids and names.
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) outcomes <- getCmOutcomes( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) outcomes <- getCmOutcomes( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the cohort method model.
getCmPropensityModel( connectionHandler, schema, cmTablePrefix = "cm_", targetId = NULL, comparatorId = NULL, indicationId = NULL, analysisId = NULL, databaseId = NULL )getCmPropensityModel( connectionHandler, schema, cmTablePrefix = "cm_", targetId = NULL, comparatorId = NULL, indicationId = NULL, analysisId = NULL, databaseId = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cmTablePrefix |
The prefix used for the cohort method results tables |
targetId |
An integer corresponding to the target cohort ID |
comparatorId |
the comparator ID of interest |
indicationId |
The indications that the target & comparator was nested to |
analysisId |
the analysis ID to restrict to |
databaseId |
the database ID to restrict to |
Specify the connectionHandler, the schema and optionally the target/comparator/analysis/database IDs
Returns a data.frame with the cohort method model
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmModel <- getCmPropensityModel( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmModel <- getCmPropensityModel( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the specific cohort method table.
getCmTable( connectionHandler, schema, table = c("attrition", "follow_up_dist", "interaction_result", "covariate_balance", "kaplan_meier_dist", "likelihood_profile", "preference_score_dist", "propensity_model", "shared_covariate_balance")[1], cmTablePrefix = "cm_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, indicationIds = NULL, outcomeIds = NULL, comparatorIds = NULL, analysisIds = NULL, databaseIds = NULL )getCmTable( connectionHandler, schema, table = c("attrition", "follow_up_dist", "interaction_result", "covariate_balance", "kaplan_meier_dist", "likelihood_profile", "preference_score_dist", "propensity_model", "shared_covariate_balance")[1], cmTablePrefix = "cm_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, indicationIds = NULL, outcomeIds = NULL, comparatorIds = NULL, analysisIds = NULL, databaseIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
table |
The result table to extract |
cmTablePrefix |
The prefix used for the cohort method results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
indicationIds |
The indications that the target & comparator was nested to |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
comparatorIds |
A vector of integers corresponding to the comparator cohort IDs |
analysisIds |
the analysis IDs to restrict to |
databaseIds |
the database IDs to restrict to |
Specify the connectionHandler, the schema and optionally the target/comparator/outcome/analysis/database IDs
Returns a data.frame with the cohort method requested table
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmTable <- getCmTable( connectionHandler = connectionHandler, schema = 'main', table = 'attrition' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmTable <- getCmTable( connectionHandler = connectionHandler, schema = 'main', table = 'attrition' )
A function to extract the targets found in cohort method
getCmTargets( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_" )getCmTargets( connectionHandler, schema, cmTablePrefix = "cm_", cgTablePrefix = "cg_" )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cmTablePrefix |
The prefix used for the cohort method results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
Specify the connectionHandler, the schema and the prefixes
A data.frame with the cohort method target cohort ids and names.
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getCmTargets( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getCmTargets( connectionHandler = connectionHandler, schema = 'main' )
Retrieves attrition information for specified cohorts from the database.
getCohortAttrition( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )getCohortAttrition( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )
connectionHandler |
A connection handler object. |
schema |
The database schema name. |
cgTablePrefix |
Prefix for cohort generator tables. Default is 'cg_'. |
databaseTable |
Name of the database metadata table. Default is 'database_meta_data'. |
cohortIds |
Optional vector of cohort IDs to filter. |
A data.frame with attrition details for each cohort.
Other Cohorts:
getCohortCounts(),
getCohortDefinitions(),
getCohortInclusionRules(),
getCohortInclusionStats(),
getCohortInclusionSummary(),
getCohortMeta(),
getCohortSubsetAttrition(),
getCohortSubsetDefinitions(),
getSubsetText(),
processCohortDefinitionsForQuarto(),
processCohorts(),
restrictCohortDefinitionsForQuarto()
This function extracts all cohort counts for the cohorts of interest.
getCohortCounts( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )getCohortCounts( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
cohortIds |
Optionally a list of cohortIds to restrict to |
Specify the connectionHandler, the schema and the cohort IDs
Returns a data.frame with the cohort inclusion rules
Other Cohorts:
getCohortAttrition(),
getCohortDefinitions(),
getCohortInclusionRules(),
getCohortInclusionStats(),
getCohortInclusionSummary(),
getCohortMeta(),
getCohortSubsetAttrition(),
getCohortSubsetDefinitions(),
getSubsetText(),
processCohortDefinitionsForQuarto(),
processCohorts(),
restrictCohortDefinitionsForQuarto()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortMeta <- getCohortCounts( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortMeta <- getCohortCounts( connectionHandler = connectionHandler, schema = 'main' )
This function extracts all cohort definitions for the targets of interest.
getCohortDefinitions( connectionHandler, schema, cgTablePrefix = "cg_", targetIds = NULL )getCohortDefinitions( connectionHandler, schema, cgTablePrefix = "cg_", targetIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cgTablePrefix |
The prefix used for the cohort generator results tables |
targetIds |
A vector of integers corresponding to the target cohort IDs |
Specify the connectionHandler, the schema and the target cohort IDs
Returns a data.frame with the cohort details
Other Cohorts:
getCohortAttrition(),
getCohortCounts(),
getCohortInclusionRules(),
getCohortInclusionStats(),
getCohortInclusionSummary(),
getCohortMeta(),
getCohortSubsetAttrition(),
getCohortSubsetDefinitions(),
getSubsetText(),
processCohortDefinitionsForQuarto(),
processCohorts(),
restrictCohortDefinitionsForQuarto()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortDef <- getCohortDefinitions( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortDef <- getCohortDefinitions( connectionHandler = connectionHandler, schema = 'main' )
This function extracts all cohort inclusion rules for the cohorts of interest.
getCohortInclusionRules( connectionHandler, schema, cgTablePrefix = "cg_", cohortIds = NULL )getCohortInclusionRules( connectionHandler, schema, cgTablePrefix = "cg_", cohortIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cgTablePrefix |
The prefix used for the cohort generator results tables |
cohortIds |
Optionally a list of cohortIds to restrict to |
Specify the connectionHandler, the schema and the cohort IDs
Returns a data.frame with the cohort inclusion rules
Other Cohorts:
getCohortAttrition(),
getCohortCounts(),
getCohortDefinitions(),
getCohortInclusionStats(),
getCohortInclusionSummary(),
getCohortMeta(),
getCohortSubsetAttrition(),
getCohortSubsetDefinitions(),
getSubsetText(),
processCohortDefinitionsForQuarto(),
processCohorts(),
restrictCohortDefinitionsForQuarto()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortInclsuionsRules <- getCohortInclusionRules( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortInclsuionsRules <- getCohortInclusionRules( connectionHandler = connectionHandler, schema = 'main' )
This function extracts all cohort inclusion stats for the cohorts of interest.
getCohortInclusionStats( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )getCohortInclusionStats( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
cohortIds |
Optionally a list of cohortIds to restrict to |
Specify the connectionHandler, the schema and the cohort IDs
Returns a data.frame with the cohort inclusion stats
Other Cohorts:
getCohortAttrition(),
getCohortCounts(),
getCohortDefinitions(),
getCohortInclusionRules(),
getCohortInclusionSummary(),
getCohortMeta(),
getCohortSubsetAttrition(),
getCohortSubsetDefinitions(),
getSubsetText(),
processCohortDefinitionsForQuarto(),
processCohorts(),
restrictCohortDefinitionsForQuarto()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortInclsuionsStats <- getCohortInclusionStats( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortInclsuionsStats <- getCohortInclusionStats( connectionHandler = connectionHandler, schema = 'main' )
This function extracts all cohort inclusion summary for the cohorts of interest.
getCohortInclusionSummary( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )getCohortInclusionSummary( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
cohortIds |
Optionally a list of cohortIds to restrict to |
Specify the connectionHandler, the schema and the cohort IDs
Returns a data.frame with the cohort inclusion rules
Other Cohorts:
getCohortAttrition(),
getCohortCounts(),
getCohortDefinitions(),
getCohortInclusionRules(),
getCohortInclusionStats(),
getCohortMeta(),
getCohortSubsetAttrition(),
getCohortSubsetDefinitions(),
getSubsetText(),
processCohortDefinitionsForQuarto(),
processCohorts(),
restrictCohortDefinitionsForQuarto()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortInclsuionsSummary <- getCohortInclusionSummary( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortInclsuionsSummary <- getCohortInclusionSummary( connectionHandler = connectionHandler, schema = 'main' )
This function extracts all cohort meta for the cohorts of interest.
getCohortMeta( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )getCohortMeta( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
cohortIds |
Optionally a list of cohortIds to restrict to |
Specify the connectionHandler, the schema and the cohort IDs
Returns a data.frame with the cohort inclusion rules
Other Cohorts:
getCohortAttrition(),
getCohortCounts(),
getCohortDefinitions(),
getCohortInclusionRules(),
getCohortInclusionStats(),
getCohortInclusionSummary(),
getCohortSubsetAttrition(),
getCohortSubsetDefinitions(),
getSubsetText(),
processCohortDefinitionsForQuarto(),
processCohorts(),
restrictCohortDefinitionsForQuarto()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortMeta <- getCohortMeta( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortMeta <- getCohortMeta( connectionHandler = connectionHandler, schema = 'main' )
Retrieves attrition information for specified cohort subsets from the database.
getCohortSubsetAttrition( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )getCohortSubsetAttrition( connectionHandler, schema, cgTablePrefix = "cg_", databaseTable = "database_meta_data", cohortIds = NULL )
connectionHandler |
A connection handler object. |
schema |
The database schema name. |
cgTablePrefix |
Prefix for cohort generator tables. Default is 'cg_'. |
databaseTable |
Name of the database metadata table. Default is 'database_meta_data'. |
cohortIds |
Optional vector of cohort IDs to filter. |
A data.frame with attrition details for each cohort subset.
Other Cohorts:
getCohortAttrition(),
getCohortCounts(),
getCohortDefinitions(),
getCohortInclusionRules(),
getCohortInclusionStats(),
getCohortInclusionSummary(),
getCohortMeta(),
getCohortSubsetDefinitions(),
getSubsetText(),
processCohortDefinitionsForQuarto(),
processCohorts(),
restrictCohortDefinitionsForQuarto()
This function extracts all cohort subset definitions for the subsets of interest.
getCohortSubsetDefinitions( connectionHandler, schema, cgTablePrefix = "cg_", subsetIds = NULL )getCohortSubsetDefinitions( connectionHandler, schema, cgTablePrefix = "cg_", subsetIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cgTablePrefix |
The prefix used for the cohort generator results tables |
subsetIds |
A vector of subset cohort ids or NULL |
Specify the connectionHandler, the schema and the subset IDs
Returns a data.frame with the cohort subset details
Other Cohorts:
getCohortAttrition(),
getCohortCounts(),
getCohortDefinitions(),
getCohortInclusionRules(),
getCohortInclusionStats(),
getCohortInclusionSummary(),
getCohortMeta(),
getCohortSubsetAttrition(),
getSubsetText(),
processCohortDefinitionsForQuarto(),
processCohorts(),
restrictCohortDefinitionsForQuarto()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) subsetDef <- getCohortSubsetDefinitions( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) subsetDef <- getCohortSubsetDefinitions( connectionHandler = connectionHandler, schema = 'main' )
A function to extract case series continuous feature characterization results
getContinuousCaseSeries( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, outcomeId = NULL, databaseIds = NULL, riskWindowStart = NULL, riskWindowEnd = NULL, startAnchor = NULL, endAnchor = NULL )getContinuousCaseSeries( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, outcomeId = NULL, databaseIds = NULL, riskWindowStart = NULL, riskWindowEnd = NULL, startAnchor = NULL, endAnchor = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetId |
An integer corresponding to the target cohort ID |
outcomeId |
Am integer corresponding to the outcome cohort ID |
databaseIds |
(optional) One or more unique identifiers for the databases |
riskWindowStart |
(optional) A riskWindowStart to restrict to |
riskWindowEnd |
(optional) A riskWindowEnd to restrict to |
startAnchor |
(optional) A startAnchor to restrict to |
endAnchor |
(optional) An endAnchor to restrict to |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
A data.frame with the characterization case series results
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cs <- getContinuousCaseSeries( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cs <- getContinuousCaseSeries( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3 )
A function to extract non-case and case continuous characterization results
getContinuousRiskFactors( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, outcomeId = NULL, analysisIds = NULL, databaseIds = NULL, riskWindowStart = NULL, riskWindowEnd = NULL, startAnchor = NULL, endAnchor = NULL )getContinuousRiskFactors( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, outcomeId = NULL, analysisIds = NULL, databaseIds = NULL, riskWindowStart = NULL, riskWindowEnd = NULL, startAnchor = NULL, endAnchor = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetId |
An integer corresponding to the target cohort ID |
outcomeId |
Am integer corresponding to the outcome cohort ID |
analysisIds |
The feature extraction analysis ID of interest (e.g., 201 is condition) |
databaseIds |
(optional) A vector of database IDs to restrict to |
riskWindowStart |
(optional) A vector of time-at-risk risk window starts to restrict to |
riskWindowEnd |
(optional) A vector of time-at-risk risk window ends to restrict to |
startAnchor |
(optional) A vector of time-at-risk start anchors to restrict to |
endAnchor |
(optional) A vector of time-at-risk end anchors to restrict to |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
A data.frame with the characterization results for the cases and non-cases
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) rf <- getContinuousRiskFactors( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) rf <- getContinuousRiskFactors( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3 )
This function extracts the databases and their information.
getDatabaseDetails( connectionHandler, schema, databaseTable = "database_meta_data" )getDatabaseDetails( connectionHandler, schema, databaseTable = "database_meta_data" )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
Specify the connectionHandler, the schema and the database table name
Returns a data.frame with the columns:
databaseFullName the full name of the database
databaseName the friendly name of the database
cdmHolder the license holder of the database
sourceDescription a description of the database
sourceDocumentationReference a link to the database information document
cdmEtlReference a link to the ETL document
sourceReleaseDatethe release date for the source database
(cdmReleaseDate the release date for the database mapped to the OMOP CDM)
cdmVersion the OMOP CDM version of the database
cdmVersionConceptId the CDM version concept ID
vocabularyVersion the database's vocabulary version
databaseId a unique identifier for the database
maxObsPeriodEndDate the last observational period end date in the database
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) ir <- getIncidenceRates( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) ir <- getIncidenceRates( connectionHandler = connectionHandler, schema = 'main' )
This function extracts all dechallenge rechallenge results across databases for specified target and outcome cohorts.
getDechallengeRechallenge( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL )getDechallengeRechallenge( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
targetName the target cohort name
targetId the target cohort unique identifier
outcomeName the outcome name
outcomeId the outcome unique identifier
dechallengeStopInterval An integer specifying the how much time to add to the cohort_end when determining whether the event starts during cohort and ends after
dechallengeEvaluationWindow A period of time evaluated for outcome recurrence after discontinuation of exposure, among patients with challenge outcomes
numExposureEras Distinct number of exposure events (i.e. drug eras) in a given target cohort
numPersonsExposed Distinct number of people exposed in target cohort. A person must have at least 1 day exposure to be included
numCases Distinct number of persons in outcome cohort. A person must have at least 1 day of observation time to be included
dechallengeAttempt Distinct count of people with observable time after discontinuation of the exposure era during which the challenge outcome occurred
dechallengeFail Among people with challenge outcomes, the distinct number of people with outcomes during dechallengeEvaluationWindow
dechallengeSuccess Among people with challenge outcomes, the distinct number of people without outcomes during the dechallengeEvaluationWindow
rechallengeAttempt Number of people with a new exposure era after the occurrence of an outcome during a prior exposure era
rechallengeFail Number of people with a new exposure era during which an outcome occurred, after the occurrence of an outcome during a prior exposure era
rechallengeSuccess Number of people with a new exposure era during which an outcome did not occur, after the occurrence of an outcome during a prior exposure era
pctDechallengeAttempt Percent of people with observable time after discontinuation of the exposure era during which the challenge outcome occurred
pctDechallengeFail Among people with challenge outcomes, the percent of people without outcomes during the dechallengeEvaluationWindow
pctDechallengeSuccess Among people with challenge outcomes, the percent of people with outcomes during dechallengeEvaluationWindow
pctRechallengeAttempt Percent of people with a new exposure era after the occurrence of an outcome during a prior exposure era
pctRechallengeFail Percent of people with a new exposure era during which an outcome did not occur, after the occurrence of an outcome during a prior exposure era
pctRechallengeSuccess Percent of people with a new exposure era during which an outcome occurred, after the occurrence of an outcome during a prior exposure era
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) dcrc <- getDechallengeRechallenge( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) dcrc <- getDechallengeRechallenge( connectionHandler = connectionHandler, schema = 'main' )
A function to extract the failed dechallenge-rechallenge cases
getDechallengeRechallengeFails( connectionHandler, schema, cTablePrefix = "c_", targetId = NULL, outcomeId = NULL, databaseId = NULL, dechallengeStopInterval = NULL, dechallengeEvaluationWindow = NULL )getDechallengeRechallengeFails( connectionHandler, schema, cTablePrefix = "c_", targetId = NULL, outcomeId = NULL, databaseId = NULL, dechallengeStopInterval = NULL, dechallengeEvaluationWindow = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
targetId |
An integer corresponding to the target cohort ID |
outcomeId |
Am integer corresponding to the outcome cohort ID |
databaseId |
The unique identifier for the database of interest |
dechallengeStopInterval |
(optional) The maximum number of days between the outcome start and target end for an outcome to be flagged |
dechallengeEvaluationWindow |
(optional) The maximum number of days after the target restarts to see whether the outcome restarts |
Specify the connectionHandler, the schema and the target/outcome cohort IDs and database id
A data.frame each failed dechallenge rechallenge exposures and outcomes
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) conCohort <- getDechallengeRechallengeFails( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3, databaseId = 'eunomia' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) conCohort <- getDechallengeRechallengeFails( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3, databaseId = 'eunomia' )
This function extracts results summary stats of event duration for specified analysis ids and target cohorts
getEventDuration( connectionHandler, schema, analysisIds, tpTablePrefix = "tp_", databaseTable = "database_meta_data", databaseIds = NULL, databaseNames = NULL, targetIds = NULL )getEventDuration( connectionHandler, schema, analysisIds, tpTablePrefix = "tp_", databaseTable = "database_meta_data", databaseIds = NULL, databaseNames = NULL, targetIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
analysisIds |
A vector of analysis ids to restrict to |
tpTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
databaseIds |
(optional) A vector of database ids to restrict to |
databaseNames |
(optional) A vector of database Names to restrict to |
targetIds |
(optional) A vector of target cohort ids to restrict to |
Specify the connectionHandler, the schema, and the analysisIds
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
analysisId the unique identifier of a treament patterns run
targetCohortId the target cohort unique identifier
targetCohortName the target cohort name
eventName a string representing an events for a target. Uses '+' for combination of event cohorts
rank the step number of event occurance
eventCount the count of event occurance at rank
durationAverage the average duration of event
durationMax the maximum duration of event
durationMin the minimum duration of event
durationMedian the median duration of event
p25Value the 25th percentile for duration of event
p75Value the 75th percentile for duration of event
standardDeviation the standard deviation for duration of event
Other TreatmentPatterns:
getAnalysisCohorts(),
getTreatmentPathways()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) ed <- getEventDuration( connectionHandler = connectionHandler, schema = "main", analysisIds = c(1) )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) ed <- getEventDuration( connectionHandler = connectionHandler, schema = "main", analysisIds = c(1) )
This returns an object of class 'ConnectionDetails' that lets you connect via 'DatabaseConnector::connect()' to the example result database.
getExampleConnectionDetails(exdir = tempdir())getExampleConnectionDetails(exdir = tempdir())
exdir |
a directory to unzip the example result data into. Default is tempdir(). |
Finds the location of the example result database in the package and calls 'DatabaseConnector::createConnectionDetails' to create a 'ConnectionDetails' object for connecting to the database.
An object of class 'ConnectionDetails' with the details to connect to the example OHDSI result database
Other helper:
addTarColumn(),
formatBinaryCovariateName(),
getOutcomeTable(),
getTargetTable(),
kableDark(),
removeSpaces()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
This function extracts the model performances per evaluation
getFullPredictionPerformances( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", databaseTablePrefix = "", modelDesignId = NULL, developmentDatabaseId = NULL )getFullPredictionPerformances( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", databaseTablePrefix = "", modelDesignId = NULL, developmentDatabaseId = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
databaseTablePrefix |
A prefix to the database table, either ” or 'plp_' |
modelDesignId |
The identifier for a model design to restrict results to |
developmentDatabaseId |
The identifier for the development database to restrict results to |
Specify the connectionHandler, the resultDatabaseSettings and (optionally) a modelDesignId and/or developmentDatabaseId to restrict models to
Returns a data.frame with the columns:
timeStamp the date/time when the analysis occurred
performanceId the unique identifier for the performance
modelDesignId the unique identifier for the model design
modelType the type of classifier
algorithmName the model algorithm name
covariateName a summary name for the candidate covariates
developmentDatabaseId the unique identifier for the database used to develop the model
validationDatabaseId the unique identifier for the database used to validate the model
developmentTargetId the unique cohort id for the development target population
developmentTargetName the name for the development target population
validationTargetId the id for the validation target population
validationTargetName the name for the validation target population if different from development
developmentOutcomeId the unique cohort id for the development outcome
developmentOutcomeName the name for the development outcome
validationOutcomeId the id for the validation outcome
validationOutcomeName the name for the validation outcome if different from development
developmentDatabase the name for the database used to develop the model
validationDatabase the name for the database used to validate the model if different from development
validationTarId the validation time at risk id
validationTimeAtRisk the time at risk used when evaluating the model if different from development
developmentTarId the development time at risk id
developmentTimeAtRisk the time at risk used when developing the model
evaluation The type of evaluation: Test/Train/CV/Validation
populationSize the test/validation population size used to develop the model
outcomeCount the test/validation outcome count used to develop the model
AUROC the AUROC value for the model
95 lower AUROC: the lower bound of the 95 percent CI AUROC value for the model
95 upper AUROC: the upper bound of the 95 percent CI AUROC value for the model
AUPRC the discrimination AUPRC value for the model
brier score: the brier value for the model
brier score scaled: the scaled brier value for the model
Average Precision: the average precision value for the model
Eavg the calibration average error e-statistic value for the model
E90 the calibration 90 percent upper bound e-statistic value for the model
Emax the calibration max error e-statistic value for the model
calibrationInLarge mean prediction: the calibration in the large mean predicted risk value for the model
calibrationInLarge observed risk: the calibration in the large mean observed risk value for the model
calibrationInLarge intercept: the calibration in the large value intercept for the model
weak calibration intercept: the weak calibration intercept for the model
weak calibration gradient: the weak calibration gradient for the model
Hosmer Lemeshow calibration intercept: the Hosmer Lemeshow calibration intercept for the model
Hosmer Lemeshow calibration gradient: the Hosmer Lemeshow calibration gradient for the model
... Additional metrics that are added to PLP
Other Prediction:
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) perf <- getFullPredictionPerformances( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) perf <- getFullPredictionPerformances( connectionHandler = connectionHandler, schema = 'main' )
A function to extract the outcomes found in incidence
getIncidenceOutcomes( connectionHandler, schema, ciTablePrefix = "ci_", cgTablePrefix = "cg_", targetId = NULL )getIncidenceOutcomes( connectionHandler, schema, ciTablePrefix = "ci_", cgTablePrefix = "cg_", targetId = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
ciTablePrefix |
The prefix used for the cohort incidence results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
targetId |
An integer corresponding to the target cohort ID |
Specify the connectionHandler, the schema and the prefixes
A data.frame with the incidence outcome cohort ids and names
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) outcomes <- getIncidenceOutcomes( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) outcomes <- getIncidenceOutcomes( connectionHandler = connectionHandler, schema = 'main' )
This function extracts all incidence rates across databases in the results for specified target and outcome cohorts.
getIncidenceRates( connectionHandler, schema, ciTablePrefix = "ci_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL )getIncidenceRates( connectionHandler, schema, ciTablePrefix = "ci_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
ciTablePrefix |
The prefix used for the cohort incidence results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique id of the database
targetName the target cohort name
targetId the target cohort unique identifier
outcomeName the outcome name
outcomeId the outcome unique identifier
(tar the friendly time-at-risk string)
cleanWindow clean windown around outcome
subgroupName name for the result subgroup
ageGroupName name for the result age group
genderName name for the result gender group
startYear name for the result start year
tarStartWith time at risk start reference
tarStartOffset time at risk start offset from reference
tarEndWith time at risk end reference
tarEndOffset time at risk end offset from reference
personsAtRiskPe persons at risk per event
personsAtRisk persons at risk
personDaysPe person days per event
personDays person days
personOutcomesPe person outcome per event
personOutcomes persons outcome
outcomesPe number of outcome per event
outcomes number of outcome
incidenceProportionP100p incidence proportion per 100 persons
incidenceRateP100py incidence rate per 100 person years
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) ir <- getIncidenceRates( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) ir <- getIncidenceRates( connectionHandler = connectionHandler, schema = 'main' )
A function to extract the targets found in incidence
getIncidenceTargets( connectionHandler, schema, ciTablePrefix = "ci_", cgTablePrefix = "cg_" )getIncidenceTargets( connectionHandler, schema, ciTablePrefix = "ci_", cgTablePrefix = "cg_" )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
ciTablePrefix |
The prefix used for the cohort incidence results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
Specify the connectionHandler, the schema and the prefixes
A data.frame with the incidence target cohort ids and names
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getIncidenceTargets( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getIncidenceTargets( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the outcome cohorts, the number of subjects/entries and where the cohort was used.
getOutcomeTable( connectionHandler, schema, cgTablePrefix = "cg_", cTablePrefix = "c_", ciTablePrefix = "ci_", cmTablePrefix = "cm_", sccsTablePrefix = "sccs_", plpTablePrefix = "plp_", databaseTable = "database_meta_data", targetId = NULL, getIncidenceInclusion = TRUE, getCharacterizationInclusion = TRUE, getPredictionInclusion = TRUE, getCohortMethodInclusion = TRUE, getSccsInclusion = TRUE, printTimes = FALSE )getOutcomeTable( connectionHandler, schema, cgTablePrefix = "cg_", cTablePrefix = "c_", ciTablePrefix = "ci_", cmTablePrefix = "cm_", sccsTablePrefix = "sccs_", plpTablePrefix = "plp_", databaseTable = "database_meta_data", targetId = NULL, getIncidenceInclusion = TRUE, getCharacterizationInclusion = TRUE, getPredictionInclusion = TRUE, getCohortMethodInclusion = TRUE, getSccsInclusion = TRUE, printTimes = FALSE )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cgTablePrefix |
The prefix used for the cohort generator results tables |
cTablePrefix |
The prefix used for the characterization results tables |
ciTablePrefix |
The prefix used for the cohort incidence results tables |
cmTablePrefix |
The prefix used for the cohort method results tables |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetId |
An integer corresponding to the target cohort ID |
getIncidenceInclusion |
Whether to check usage of the cohort in incidence |
getCharacterizationInclusion |
Whether to check usage of the cohort in characterization |
getPredictionInclusion |
Whether to check usage of the cohort in prediction |
getCohortMethodInclusion |
Whether to check usage of the cohort in cohort method |
getSccsInclusion |
Whether to check usage of the cohort in SCCS |
printTimes |
whether to print the time it takes to run each SQL query |
Specify the connectionHandler, the schema and the table prefixes
Returns a data.frame with the columns:
cohortId the number id for the target cohort
cohortName the name of the cohort
subsetParent the number id of the parent cohort
subsetDefinitionId the number id of the subset
numDatabase number of databases with the cohort
databaseString all the names of the databases with the cohort
databaseIdString all the ids of the databases with the cohort
databaseStringCount all the names of the databases with the cohort plus their counts
databaseCount all the names of the databases with the cohort and their sizes
minSubjectCount number of subjects in databases with lowest count
maxSubjectCount number of subjects in databases with highest count
minEntryCount number of entries in databases with lowest count
maxEntryCount number of entries in databases with highest count
cohortIncidence whether the cohort was used in cohort incidence
dechalRechal whether the cohort was used in dechallenge rechallenge
riskFactors whether the cohort was used in risk factors
caseSeries whether the cohort was used in case series analysis
timeToEvent whether the cohort was used in time to event
prediction whether the cohort was used in prediction
cohortMethod whether the cohort was used in cohort method
selfControlledCaseSeries whether the cohort was used in self controlled case series
Other helper:
addTarColumn(),
formatBinaryCovariateName(),
getExampleConnectionDetails(),
getTargetTable(),
kableDark(),
removeSpaces()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) outcomeTable <- getOutcomeTable( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) outcomeTable <- getOutcomeTable( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the top N predictors across models by finding the sum of the absolute coefficient value across models.
getPredictionAggregateTopPredictors( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", modelDesignIds = NULL )getPredictionAggregateTopPredictors( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", modelDesignIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
modelDesignIds |
One or more model design IDs to restrict to |
Specify the connectionHandler, the resultDatabaseSettings and (optionally) any modelDesignIds to restrict to
Returns a data.frame with the columns:
databaseName the name of the database the model was developed on
tarStartDay the time-at-risk start day
tarStartAnchor whether the time-at-risk start is relative to cohort start or end
tarEndDay the time-at-risk end day
tarEndAnchor whether the time-at-risk end is relative to cohort start or end
covariateId the FeatureExtraction covariate identifier
covariateName the name of the covariate
conceptId the covariates corresponding concept or 0
sumCovariateValue the total absolute feature importance or coefficient value
numberOfTimesPredictive number of models that contained the covariate
Other Prediction:
getFullPredictionPerformances(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) topPreds <- getPredictionAggregateTopPredictors( connectionHandler = connectionHandler, schema = 'main', modelDesignIds = c(1,2,5) )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) topPreds <- getPredictionAggregateTopPredictors( connectionHandler = connectionHandler, schema = 'main', modelDesignIds = c(1,2,5) )
This function extracts the target and outcome cohorts used to develop any model in the results
getPredictionCohorts( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_" )getPredictionCohorts( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_" )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
Specify the connectionHandler, the resultDatabaseSettings and any targetIds or outcomeIds to restrict models to
Returns a data.frame with the columns:
cohortId the cohort definition ID
cohortName the name of the cohort
type whether the cohort was used as a target or outcome cohort
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) predCohorts <- getPredictionCohorts( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) predCohorts <- getPredictionCohorts( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the covariate summary details
getPredictionCovariates( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", performanceIds = NULL, modelDesignIds = NULL )getPredictionCovariates( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", performanceIds = NULL, modelDesignIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
performanceIds |
(optional) restrict to the input performanceIds |
modelDesignIds |
(optional) restrict to the input modelDesignIds |
Specify the connectionHandler, the resultDatabaseSettings, the table of interest and (optionally) modelDesignIds/performanceIds to filter to
Returns a data.frame with the specified table
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) covs <- getPredictionCovariates( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) covs <- getPredictionCovariates( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the PROBAST diagnostics
getPredictionDiagnostics( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", modelDesignIds = NULL, threshold1_2 = 0.9 )getPredictionDiagnostics( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", modelDesignIds = NULL, threshold1_2 = 0.9 )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
modelDesignIds |
The identifier for a model design to restrict results to |
threshold1_2 |
A threshold for probast 1.2 |
Specify the connectionHandler, the resultDatabaseSettings and (optionally) a modelDesignId and threshold1_2 a threshold value to use for the PROBAST 1.2
Returns a data.frame with the columns:
modelDesignId the unique identifier for the model design
diagnosticId the unique identifier for diagnostic result
developmentDatabaseName the name for the database used to develop the model
developmentTargetName the name for the development target population
developmentOutcomeName the name for the development outcome
probast1_1 Were appropriate data sources used, e.g., cohort, RCT, or nested case-control study data?
probast1_2 Were all inclusions and exclusions of paticipants appropriate?
probast2_1 Were predictors defined and assessed in a similar way for all participants?
probast2_2 Were predictors assessments made without knowledge of outcome data?
probast2_3 All all predictors available at the time the model is intended to be used?
probast3_4 Was the outcome defined and determined in a similar way for all participants?
probast3_6 Was the time interval between predictor assessment and outcome determination appropriate?
probast4_1 Were there a reasonable number of participants with the outcome?
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) diag <- getPredictionDiagnostics( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) diag <- getPredictionDiagnostics( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the specified diagnostic table
getPredictionDiagnosticTable( connectionHandler, schema, plpTablePrefix = "plp_", table = "diagnostic_participants", diagnosticId = NULL )getPredictionDiagnosticTable( connectionHandler, schema, plpTablePrefix = "plp_", table = "diagnostic_participants", diagnosticId = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
table |
The table to extract |
diagnosticId |
(optional) restrict to the input diagnosticId |
Specify the connectionHandler, the resultDatabaseSettings, the table of interest and (optionally) a diagnosticId to filter to
Returns a data.frame with the specified table
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) diagPred <- getPredictionDiagnosticTable( connectionHandler = connectionHandler, schema = 'main', table = 'diagnostic_predictors' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) diagPred <- getPredictionDiagnosticTable( connectionHandler = connectionHandler, schema = 'main', table = 'diagnostic_predictors' )
This function extracts the hyper parameters details
getPredictionHyperParamSearch( connectionHandler, schema, plpTablePrefix = "plp_", modelDesignId = NULL, databaseId = NULL )getPredictionHyperParamSearch( connectionHandler, schema, plpTablePrefix = "plp_", modelDesignId = NULL, databaseId = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
modelDesignId |
The identifier for a model design to restrict to |
databaseId |
The identifier for the development database to restrict to |
Specify the connectionHandler, the resultDatabaseSettings, the modelDesignId and the databaseId
Returns a data.frame with the columns:
metric the hyperparameter optimization metric
fold the fold in cross validation
value the metric value for the fold with the specified hyperparameter combination
plus columns for all the hyperparameters and their values
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) hyperParams <- getPredictionHyperParamSearch( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) hyperParams <- getPredictionHyperParamSearch( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the interception value
getPredictionIntercept( connectionHandler, schema, plpTablePrefix = "plp_", modelDesignId = NULL, databaseId = NULL )getPredictionIntercept( connectionHandler, schema, plpTablePrefix = "plp_", modelDesignId = NULL, databaseId = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
modelDesignId |
The identifier for a model design to restrict to |
databaseId |
The identifier for the development database to restrict to |
Specify the connectionHandler, the resultDatabaseSettings, the modelDesignId and the databaseId
Returns a single value corresponding to the model intercept or NULL if not a logistic regression model
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) intercepts <- getPredictionIntercept( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) intercepts <- getPredictionIntercept( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the model lift (PPV/outcomeRate)
getPredictionLift( connectionHandler, schema, plpTablePrefix = "plp_", modelDesignIds = NULL, performanceIds = NULL, sensitivity = 0.1 )getPredictionLift( connectionHandler, schema, plpTablePrefix = "plp_", modelDesignIds = NULL, performanceIds = NULL, sensitivity = 0.1 )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
modelDesignIds |
(optional) restrict to the input modelDesignIds |
performanceIds |
(optional) restrict to the input performanceIds |
sensitivity |
(default 0.1) the lift at the threshold with the sensitivity closest to this value is return |
Specify the connectionHandler, the resultDatabaseSettings and (optionally) modelDesignIds or performanceIds to filter to
Returns a data.frame with the columns: modelDesignId, performanceId, evaluation, sensitivity, outcomeCount, positivePredictiveValue, outcomeRate and lift.
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) liftsAt0p15 <- getPredictionLift( connectionHandler = connectionHandler, schema = 'main', sensitivity = 0.15 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) liftsAt0p15 <- getPredictionLift( connectionHandler = connectionHandler, schema = 'main', sensitivity = 0.15 )
This function extracts the model design settings
getPredictionModelDesigns( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", targetIds = NULL, outcomeIds = NULL, modelDesignIds = NULL )getPredictionModelDesigns( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", targetIds = NULL, outcomeIds = NULL, modelDesignIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
modelDesignIds |
(Optional) A set of model design ids to restrict to |
Specify the connectionHandler, the resultDatabaseSettings and (optionally) any targetIds or outcomeIds to restrict model designs to
Returns a data.frame with the columns:
modelDesignId a unique identifier in the database for the model design
modelType the type of classifier or surival model
developmentTargetId a unique identifier for the development target ID
developmentTargetName the name of the development target cohort
developmentTargetJson the json of the target cohort
developmentOutcomeId a unique identifier for the development outcome ID
developmentOutcomeName the name of the development outcome cohort
timeAtRisk the time at risk string
developmentOutcomeJson the json of the outcome cohort
covariateSettingsJson the covariate settings json
populationSettingsJson the population settings json
tidyCovariatesSettingsJson the tidy covariate settings json
plpDataSettingsJson the plp data extraction settings json
featureEngineeringSettingsJson the feature engineering settings json
splitSettingsJson the split settings json
sampleSettingsJson the sample settings json
modelSettingsJson the model settings json
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) modDesign <- getPredictionModelDesigns( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) modDesign <- getPredictionModelDesigns( connectionHandler = connectionHandler, schema = 'main' )
A function to extract the outcomes found in prediction
getPredictionOutcomes( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", targetId = NULL )getPredictionOutcomes( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", targetId = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
targetId |
An integer corresponding to the target cohort ID |
Specify the connectionHandler, the schema and the prefixes
A data.frame with the prediction outcome cohort ids and names.
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) outcomes <- getPredictionOutcomes( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) outcomes <- getPredictionOutcomes( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the model performances
getPredictionPerformances( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", databaseTablePrefix = "", modelDesignId = NULL, developmentDatabaseId = NULL )getPredictionPerformances( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", databaseTablePrefix = "", modelDesignId = NULL, developmentDatabaseId = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
databaseTablePrefix |
A prefix to the database table, either ” or 'plp_' |
modelDesignId |
The identifier for a model design to restrict results to |
developmentDatabaseId |
The identifier for the development database to restrict results to |
Specify the connectionHandler, the resultDatabaseSettings and (optionally) a modelDesignId and/or developmentDatabaseId to restrict models to
Returns a data.frame with the columns:
performanceId the unique identifier for the performance
modelDesignId the unique identifier for the model design
modelType the type of classifier
algorithmName the model algorithm name
developmentDatabaseId the unique identifier for the database used to develop the model
validationDatabaseId the unique identifier for the database used to validate the model
developmentTargetId the unique cohort id for the development target population
developmentTargetName the name for the development target population
developmentOutcomeId the unique cohort id for the development outcome
developmentOutcomeName the name for the development outcome
developmentDatabase the name for the database used to develop the model
validationDatabase the name for the database used to validate the model
validationTargetName the name for the validation target population
validationOutcomeName the name for the validation outcome
timeStamp the date/time when the analysis occurred
auroc the test/validation AUROC value for the model
auroc95lb the test/validation lower bound of the 95 percent CI AUROC value for the model
auroc95ub the test/validation upper bound of the 95 percent CI AUROC value for the model
calibrationInLarge the test/validation calibration in the large value for the model
eStatistic the test/validation calibration e-statistic value for the model
brierScore the test/validation brier value for the model
auprc the test/validation discrimination AUPRC value for the model
populationSize the test/validation population size used to develop the model
outcomeCount the test/validation outcome count used to develop the model
evalPercent the percentage of the development data used as the test set
outcomePercent the outcome percent in the development data
validationTimeAtRisk time at risk for the validation
predictionResultType development or validation
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) perf <- getPredictionPerformances( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) perf <- getPredictionPerformances( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the specified table
getPredictionPerformanceTable( connectionHandler, schema, plpTablePrefix = "plp_", databaseTable = "database_meta_data", table = "attrition", modelDesignIds = NULL, performanceIds = NULL, evaluations = NULL )getPredictionPerformanceTable( connectionHandler, schema, plpTablePrefix = "plp_", databaseTable = "database_meta_data", table = "attrition", modelDesignIds = NULL, performanceIds = NULL, evaluations = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
table |
The table to extract (covariate_summary, attrition, prediction_distribution, threshold_summary, calibration_summary, evaluation_statistics or demographic_summary ) |
modelDesignIds |
(optional) restrict to the input modelDesignIds |
performanceIds |
(optional) restrict to the input performanceIds |
evaluations |
(optional) restrict to the type of evaluation (e.g., 'Test'/'Train'/'CV'/'Validation') |
Specify the connectionHandler, the resultDatabaseSettings, the table of interest and (optionally) a performanceId to filter to
Returns a data.frame with the specified table
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) attrition <- getPredictionPerformanceTable( connectionHandler = connectionHandler, schema = 'main', table = 'attrition' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) attrition <- getPredictionPerformanceTable( connectionHandler = connectionHandler, schema = 'main', table = 'attrition' )
A function to extarct the targets found in prediction
getPredictionTargets( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_" )getPredictionTargets( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_" )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
Specify the connectionHandler, the schema and the prefixes
A data.frame with the prediction target cohort ids and names.
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getPredictionTargets( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getPredictionTargets( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the top N predictors per model from the prediction results tables
getPredictionTopPredictors( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL, numberPredictors = 100 )getPredictionTopPredictors( connectionHandler, schema, plpTablePrefix = "plp_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL, numberPredictors = 100 )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The database table name |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
numberPredictors |
the number of predictors per model to return |
Specify the connectionHandler, the resultDatabaseSettings and (optionally) any targetIds or outcomeIds to restrict models to
Returns a data.frame with the columns:
databaseName the name of the database the model was developed on
tarStartDay the time-at-risk start day
tarStartAnchor whether the time-at-risk start is relative to cohort start or end
tarEndDay the time-at-risk end day
tarEndAnchor whether the time-at-risk end is relative to cohort start or end
performanceId a unique identifier for the performance
covariateId the FeatureExtraction covariate identifier
covariateName the name of the covariate
conceptId the covariates corresponding concept or 0
covariateValue the feature importance or coefficient value
covariateCount how many people had the covariate
covariateMean the fraction of the target population with the covariate
covariateStDev the standard deviation
withNoOutcomeCovariateCount the number of the target population without the outcome with the covariate
withNoOutcomeCovariateMean the fraction of the target population without the outcome with the covariate
withNoOutcomeCovariateStDev the covariate standard deviation of the target population without the outcome
withOutcomeCovariateCount the number of the target population with the outcome with the covariate
withOutcomeCovariateMean the fraction of the target population with the outcome with the covariate
withOutcomeCovariateStDev the covariate standard deviation of the target population with the outcome
standardizedMeanDiff the standardized mean difference comparing the target population with outcome and without the outcome
rn the row number showing the covariate rank
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionLift(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) topPreds <- getPredictionTopPredictors( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) topPreds <- getPredictionTopPredictors( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )
This function extracts the sccs diagnostics that examine whether the analyses were sufficiently powered and checks for different types of bias.
getSccsDiagnosticsData( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL )getSccsDiagnosticsData( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the database name
databaseId the unique identifier for the database
analysisId the analysis unique identifier
description an analysis description
targetName the target name
targetId the target cohort id
outcomeName the outcome name
outcomeId the outcome cohort id
indicationName the indication name
indicatonId the indication cohort id
covariateName whether main or secondary analysis
mdrr the maximum passable minimum detectable relative risk (mdrr) value. If the mdrr is greater than this the diagnostics will fail.
ease The expected absolute systematic error (ease) measures residual bias.
timeTrendP (Depreciated to timeStabilityP) The p for whether the mean monthly ratio between observed and expected is no greater than 1.25.
preExposureP (Depreciated) One-sided p-value for whether the rate before expore is higher than after, against the null of no difference.
mdrrDiagnostic whether the mdrr (power) diagnostic passed or failed.
easeDiagnostic whether the ease diagnostic passed or failed.
timeStabilityP (New) The p for whether the mean monthly ratio between observed and expected exceeds the specified threshold.
eventExposureLb (New) Lower bound of the 95% CI for the pre-expososure estimate.
eventExposureUb (New) Upper bound of the 95% CI for the pre-expososure estimate.
eventObservationLb (New) Lower bound of the 95% CI for the end of observation probe estimate.
eventObservationUb (New) Upper bound of the 95% CI for the end of observation probe estimate.
rareOutcomePrevalence (New) The proportion of people in the underlying population who have the outcome at least once.
timeTrendDiagnostic (Depreciated) Pass / warning / fail / not evaluated classification of the time trend (unstalbe months) diagnostic.
preExposureDiagnostic (Depreciated) Pass / warning / fail / not evaluated classification of the time trend (unstalbe months) diagnostic.
timeStabilityDiagnostic (New) Pass / fail / not evaluated classification of the time stability diagnostic.
eventExposureDiagnostic (New) Pass / fail / not evaluated classification of the event-exposure independence diagnostic.
eventObservationDiagnostic (New) Pass / fail / not evaluated classification of the event-observation period dependence diagnostic.
rareOutcomeDiagnostic (New) Pass / fail / not evaluated classification of the rare outcome diagnostic.
unblind whether the results can be unblinded.
unblindForEvidenceSynthesis whether the results can be unblinded for the meta analysis.
summaryValue summary of diagnostics results. FAIL, PASS or number of warnings.
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsDiag <- getSccsDiagnosticsData( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsDiag <- getSccsDiagnosticsData( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )
This function extracts the single database sccs estimates
getSccsEstimation( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL )getSccsEstimation( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the database name
databaseId the database id
exposuresOutcomeSetId the exposure outcome set identifier
analysisId the analysis unique identifier
description an analysis description
targetName the target name
targetId the target cohort id
outcomeName the outcome name
outcomeId the outcome cohort id
indicationName the indication name
indicatonId the indication cohort id
covariateName whether main or secondary analysis
covariateId the analysis id
outcomeSubjects The number of subjects with at least one outcome.
outcomeEvents The number of outcome events.
outcomeObservationPeriods The number of observation periods containing at least one outcome.
covariateSubjects The number of subjects having the covariate.
covariateDays The total covariate time in days.
covariateEras The number of continuous eras of the covariate.
covariateOutcomes The number of outcomes observed during the covariate time.
observedDays The number of days subjects were observed.
rr the relative risk
ci95Lb the lower bound of the 95 percent confidence interval for the relative risk
ci95Ub the upper bound of the 95 percent confidence interval for the relative risk
p the p-value for the relative risk
logRr the log of the relative risk
seLogRr the standard error or the log of the relative risk
calibratedRr the calibrated relative risk
calibratedCi95Lb the lower bound of the 95 percent confidence interval for the calibrated relative risk
calibratedCi95Ub the upper bound of the 95 percent confidence interval for the calibrated relative risk
calibratedP the calibrated p-value
calibratedOneSidedP the calibrated one sided p-value
calibratedLogRr the calibrated log of the relative risk
calibratedSeLogRr the calibrated log of the relative risk standard error
llr The log of the likelihood ratio (of the MLE vs the null hypothesis of no effect).
mdrr The minimum detectable relative risk.
unblind Whether the results can be unblinded
unblindForEvidenceSynthesis whether the results can be unblinded for the meta analysis.
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsEst <- getSccsEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsEst <- getSccsEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )
This function extracts any meta analysis estimation results for sccs.
getSccsMetaEstimation( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", esTablePrefix = "es_", targetIds = NULL, outcomeIds = NULL, includeOneSidedP = TRUE )getSccsMetaEstimation( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", esTablePrefix = "es_", targetIds = NULL, outcomeIds = NULL, includeOneSidedP = TRUE )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
esTablePrefix |
The prefix used for the evidence synthesis results tables |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
includeOneSidedP |
This lets you extract from older results that do not have the one sided p by setting this to FALSE |
Specify the connectionHandler, the schema and the targetoutcome cohort IDs
Returns a data.frame with the columns:
#'
databaseName the database name
analysisId the analysis unique identifier
description an analysis description
targetName the target name
targetId the target cohort id
outcomeName the outcome name
outcomeId the outcome cohort id
indicationName the indicationname
indicationId the indication cohort id
covariateName whether main or secondary analysis
outcomeSubjects The number of subjects with at least one outcome.
outcomeEvents The number of outcome events.
outcomeObservationPeriods The number of observation periods containing at least one outcome.
covariateSubjects The number of subjects having the covariate.
covariateDays The total covariate time in days.
covariateEras The number of continuous eras of the covariate.
covariateOutcomes The number of outcomes observed during the covariate time.
observedDays The number of days subjects were observed.
calibratedRr the calibrated relative risk
calibratedCi95Lb the lower bound of the 95 percent confidence interval for the calibrated relative risk
calibratedCi95Ub the upper bound of the 95 percent confidence interval for the calibrated relative risk
calibratedP the calibrated p-value
calibratedOneSidedP the calibrated one sided p-value
calibratedLogRr the calibrated log of the relative risk
calibratedSeLogRr the calibrated log of the relative risk standard error
nDatabases The number of databases included in the estimate.
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsMeta <- getSccsMetaEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsMeta <- getSccsMetaEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 )
This function extracts the sccs model table.
getSccsModel( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", exposureOutcomeSetIds = NULL, indicationIds = NULL, outcomeIds = NULL, databaseIds = NULL, analysisIds = NULL, targetIds = NULL )getSccsModel( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", exposureOutcomeSetIds = NULL, indicationIds = NULL, outcomeIds = NULL, databaseIds = NULL, analysisIds = NULL, targetIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
exposureOutcomeSetIds |
the exposureOutcomeIds to restrict to |
indicationIds |
The indications that the target was nested to |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
databaseIds |
the database IDs to restrict to |
analysisIds |
the analysis IDs to restrict to |
targetIds |
A vector of integers corresponding to the target cohort IDs |
Specify the connectionHandler, the schema and optionally the target/outcome/analysis/database IDs
Returns a data.frame with the SCCS model table
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsModels <- getSccsModel( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsModels <- getSccsModel( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the sccs negative controls.
getSccsNegativeControlEstimates( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", databaseIds = NULL, exposuresOutcomeSetIds = NULL, indicationIds = NULL, outcomeIds = NULL, targetIds = NULL, analysisIds = NULL, covariateIds = NULL, covariateAnalysisIds = NULL )getSccsNegativeControlEstimates( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", databaseIds = NULL, exposuresOutcomeSetIds = NULL, indicationIds = NULL, outcomeIds = NULL, targetIds = NULL, analysisIds = NULL, covariateIds = NULL, covariateAnalysisIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
databaseIds |
the database IDs to restrict to |
exposuresOutcomeSetIds |
the exposureOutcomeIds to restrict to |
indicationIds |
The indications that the target was nested to |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
targetIds |
A vector of integers corresponding to the target cohort IDs |
analysisIds |
the analysis IDs to restrict to |
covariateIds |
the covariate IDs to restrict to |
covariateAnalysisIds |
the covariate analysis IDs to restrict to |
Specify the connectionHandler, the schema and optionally the target/outcome/analysis/database IDs
Returns a data.frame with the SCCS negative controls
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsNcs <- getSccsNegativeControlEstimates( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsNcs <- getSccsNegativeControlEstimates( connectionHandler = connectionHandler, schema = 'main' )
A function to extract the outcomes found in self controlled case series
getSccsOutcomes( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", targetId = NULL )getSccsOutcomes( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", targetId = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
targetId |
An integer corresponding to the target cohort ID |
Specify the connectionHandler, the schema and the prefixes
A data.frame with the self controlled case series outcome ids and names.
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) outcomes <- getSccsOutcomes( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) outcomes <- getSccsOutcomes( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the specific cohort method table.
getSccsTable( connectionHandler, schema, table = c("attrition", "time_trend", "event_dep_observation", "age_spanning", "calendar_time_spanning", "spline")[1], sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", indicationIds = NULL, outcomeIds = NULL, analysisIds = NULL, databaseIds = NULL, exposureOutcomeIds = NULL, covariateIds = NULL )getSccsTable( connectionHandler, schema, table = c("attrition", "time_trend", "event_dep_observation", "age_spanning", "calendar_time_spanning", "spline")[1], sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", indicationIds = NULL, outcomeIds = NULL, analysisIds = NULL, databaseIds = NULL, exposureOutcomeIds = NULL, covariateIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
table |
The result table to extract |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
indicationIds |
The indications that the target was nested to |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
analysisIds |
the analysis IDs to restrict to |
databaseIds |
the database IDs to restrict to |
exposureOutcomeIds |
the exposureOutcomeIds to restrict to |
covariateIds |
the covariateIds to restrict to |
Specify the connectionHandler, the schema and optionally the target/outcome/analysis/database IDs
Returns a data.frame with the cohort method requested table
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsTable <- getSccsTable( connectionHandler = connectionHandler, schema = 'main', table = 'attrition' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsTable <- getSccsTable( connectionHandler = connectionHandler, schema = 'main', table = 'attrition' )
A function to extract the targets found in self controlled case series
getSccsTargets( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_" )getSccsTargets( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_" )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
Specify the connectionHandler, the schema and the prefixes
A data.frame with the self controlled case series target cohort ids and names.
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTimeToEvent(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getSccsTargets( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohorts <- getSccsTargets( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the SCCS time-to-event.
getSccsTimeToEvent( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", databaseIds = NULL, exposuresOutcomeSetIds = NULL, indicationIds = NULL, outcomeIds = NULL, targetIds = NULL, analysisIds = NULL )getSccsTimeToEvent( connectionHandler, schema, sccsTablePrefix = "sccs_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", databaseIds = NULL, exposuresOutcomeSetIds = NULL, indicationIds = NULL, outcomeIds = NULL, targetIds = NULL, analysisIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
databaseIds |
the database IDs to restrict to |
exposuresOutcomeSetIds |
the exposureOutcomeIds to restrict to |
indicationIds |
The indications that the target was nested to |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
targetIds |
A vector of integers corresponding to the target cohort IDs |
analysisIds |
the analysis IDs to restrict to |
Specify the connectionHandler, the schema and optionally the target/outcome/analysis/database IDs
Returns a data.frame with the SCCS time-to-event
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
plotCmEstimates(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) getSccsTimeToEvent <- getSccsNegativeControlEstimates( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) getSccsTimeToEvent <- getSccsNegativeControlEstimates( connectionHandler = connectionHandler, schema = 'main' )
Function that converts a subsetDefinitionJson into text description
getSubsetText(subsetDefinitionJson, cohortDefinitions)getSubsetText(subsetDefinitionJson, cohortDefinitions)
subsetDefinitionJson |
The subset logic json |
cohortDefinitions |
A data.frame with the columns cohortDefinitionId, cohortName and optionally friendlyName that will be used to know the friendly cohort name for any subsetting that nests in other cohorts |
The function takes a subsetDefinitionJson and converts it into friendly text describing the subset logic
A text string describing the subsetting
Other Cohorts:
getCohortAttrition(),
getCohortCounts(),
getCohortDefinitions(),
getCohortInclusionRules(),
getCohortInclusionStats(),
getCohortInclusionSummary(),
getCohortMeta(),
getCohortSubsetAttrition(),
getCohortSubsetDefinitions(),
processCohortDefinitionsForQuarto(),
processCohorts(),
restrictCohortDefinitionsForQuarto()
This function extracts the feature extraction results for targets corresponding to specified target but does not exclude any patients with the outcome during the outcome washout (so it agnostic to the outcome of interest).
getTargetBinaryFeatures( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, databaseIds = NULL, analysisIds = NULL, conceptIds = NULL )getTargetBinaryFeatures( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetId = NULL, databaseIds = NULL, analysisIds = NULL, conceptIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetId |
An integer corresponding to the target cohort ID |
databaseIds |
(optional) A vector of database ids to restrict to |
analysisIds |
(optional) The feature extraction analysis ID of interest (e.g., 201 is condition) |
conceptIds |
(optional) The feature extraction concept ID of interest to restrict to |
Specify the connectionHandler, the schema and the target cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
targetName the target cohort name
targetId the target cohort unique identifier
minPriorObservation the minimum required observation days prior to index for an entry
covariateId the id of the feature
covariateName the name of the feature
sumValue the number of target patients who have the feature value of 1 (target patients are restricted to first occurrence and require min prior obervation days)
averageAvalue the fraction of target patients who have the feature value of 1 (target patients are restricted to first occurrence and require min prior obervation days)
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) tbf <- getTargetBinaryFeatures ( connectionHandler = connectionHandler, schema = 'main', targetId = 1 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) tbf <- getTargetBinaryFeatures ( connectionHandler = connectionHandler, schema = 'main', targetId = 1 )
This function extracts the continuous feature extraction results for targets corresponding to specified target cohorts.
getTargetContinuousFeatures( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, analysisIds = NULL, databaseIds = NULL )getTargetContinuousFeatures( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, analysisIds = NULL, databaseIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
analysisIds |
The feature extraction analysis ID of interest (e.g., 201 is condition) |
databaseIds |
(Optional) A vector of database IDs to restrict to |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
targetName the target cohort name
targetId the target cohort unique identifier
minPriorObservation the minimum required observation days prior to index for an entry
covariateName the name of the feature
covariateId the id of the feature
countValue the number of cases who have the feature
minValue the minimum value observed for the feature
maxValue the maximum value observed for the feature
averageValue the mean value observed for the feature
standardDeviation the standard deviation of the value observed for the feature
medianValue the median value observed for the feature
p10Value the 10th percentile of the value observed for the feature
p25Value the 25th percentile of the value observed for the feature
p75Value the 75th percentile of the value observed for the feature
p90Value the 90th percentile of the value observed for the feature
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) tcf <- getTargetContinuousFeatures( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) tcf <- getTargetContinuousFeatures( connectionHandler = connectionHandler, schema = 'main' )
This function extracts the target cohorts, the number of subjects/entries and where the cohort was used.
getTargetTable( connectionHandler, schema, cgTablePrefix = "cg_", cTablePrefix = "c_", ciTablePrefix = "ci_", cmTablePrefix = "cm_", sccsTablePrefix = "sccs_", plpTablePrefix = "plp_", databaseTable = "database_meta_data", getIncidenceInclusion = TRUE, getCharacterizationInclusion = TRUE, getPredictionInclusion = TRUE, getCohortMethodInclusion = TRUE, getSccsInclusion = TRUE, printTimes = FALSE )getTargetTable( connectionHandler, schema, cgTablePrefix = "cg_", cTablePrefix = "c_", ciTablePrefix = "ci_", cmTablePrefix = "cm_", sccsTablePrefix = "sccs_", plpTablePrefix = "plp_", databaseTable = "database_meta_data", getIncidenceInclusion = TRUE, getCharacterizationInclusion = TRUE, getPredictionInclusion = TRUE, getCohortMethodInclusion = TRUE, getSccsInclusion = TRUE, printTimes = FALSE )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cgTablePrefix |
The prefix used for the cohort generator results tables |
cTablePrefix |
The prefix used for the characterization results tables |
ciTablePrefix |
The prefix used for the cohort incidence results tables |
cmTablePrefix |
The prefix used for the cohort method results tables |
sccsTablePrefix |
The prefix used for the cohort generator results tables |
plpTablePrefix |
The prefix used for the patient level prediction results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
getIncidenceInclusion |
Whether to check useage of the cohort in incidence |
getCharacterizationInclusion |
Whether to check useage of the cohort in characterization |
getPredictionInclusion |
Whether to check useage of the cohort in prediction |
getCohortMethodInclusion |
Whether to check useage of the cohort in cohort method |
getSccsInclusion |
Whether to check useage of the cohort in SCCS |
printTimes |
Whether to print how long each query took |
Specify the connectionHandler, the schema and the table prefixes
Returns a data.frame with the columns:
cohortId the number id for the target cohort
cohortName the name of the cohort
subsetParent the number id of the parent cohort
subsetDefinitionId the number id of the subset
subsetDefinitionJson the json of the subset
subsetCohortIds the ids of any cohorts that are restricted to by the subset logic
numDatabase number of databases with the cohort
databaseString all the names of the databases with the cohort
databaseCount all the names of the databases with the cohort and their sizes
minSubjectCount number of subjects in databases with lowest count
maxSubjectCount number of subjects in databases with highest count
minEntryCount number of entries in databases with lowest count
maxEntryCount number of entries in databases with highest count
cohortIncidence whether the cohort was used in cohort incidence
databaseComparator whether the cohort was used in database comparator
cohortComparator whether the cohort was used in cohort comparator
dechalRechal whether the cohort was used in dechallenge rechallenge
riskFactors whether the cohort was used in risk factors
caseSeries whether the cohort was used in case series analysis
timeToEvent whether the cohort was used in time to event
prediction whether the cohort was used in prediction
cohortMethod whether the cohort was used in cohort method
selfControlledCaseSeries whether the cohort was used in self controlled case series
Other helper:
addTarColumn(),
formatBinaryCovariateName(),
getExampleConnectionDetails(),
getOutcomeTable(),
kableDark(),
removeSpaces()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) targetTable <- getTargetTable( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) targetTable <- getTargetTable( connectionHandler = connectionHandler, schema = 'main' )
This function extracts all time to event results across databases for specified target and outcome cohorts.
getTimeToEvent( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL )getTimeToEvent( connectionHandler, schema, cTablePrefix = "c_", cgTablePrefix = "cg_", databaseTable = "database_meta_data", targetIds = NULL, outcomeIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cTablePrefix |
The prefix used for the characterization results tables |
cgTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
targetIds |
A vector of integers corresponding to the target cohort IDs |
outcomeIds |
A vector of integers corresponding to the outcome cohort IDs |
Specify the connectionHandler, the schema and the target/outcome cohort IDs
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
targetName the target cohort name
targetId the target cohort unique identifier
outcomeName the outcome name
outcomeId the outcome unique identifier
outcomeType Whether the outcome is the first or subsequent
targetOutcomeType The interval that the outcome occurs
timeToEvent The number of days from index
numEvents The number of target cohort entries
timeScale The correspondin time-scale
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
plotAgeDistributions(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) tte <- getTimeToEvent( connectionHandler = connectionHandler, schema = 'main' )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) tte <- getTimeToEvent( connectionHandler = connectionHandler, schema = 'main' )
This function extracts results pathways for specified analysis ids and target cohorts
getTreatmentPathways( connectionHandler, schema, tpTablePrefix = "tp_", databaseTable = "database_meta_data", age = "all", sex = "all", indexYear = "all", analysisIds = NULL, databaseIds = NULL, databaseNames = NULL, targetIds = NULL )getTreatmentPathways( connectionHandler, schema, tpTablePrefix = "tp_", databaseTable = "database_meta_data", age = "all", sex = "all", indexYear = "all", analysisIds = NULL, databaseIds = NULL, databaseNames = NULL, targetIds = NULL )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
tpTablePrefix |
The prefix used for the cohort generator results tables |
databaseTable |
The name of the table with the database details (default 'database_meta_data') |
age |
(optional) a string representing an age bucket to restrict (e.g., "0-17", "18-34", "65+") |
sex |
(optional) A string "male" or "female" to restrict |
indexYear |
(optional) A string with a four-digit year to restrict |
analysisIds |
(optional) A vector of analysis ids to restrict to |
databaseIds |
(optional) A vector of database ids to restrict to |
databaseNames |
(optional) A vector of database Names to restrict to |
targetIds |
(optional) A vector of target cohort ids to restrict to |
Specify the connectionHandler and the schema
Returns a data.frame with the columns:
databaseName the name of the database
databaseId the unique identifier of the database
analysisId the unique identifier of a treament patterns run
targetCohortName the target cohort name
targetCohortId the target cohort unique identifier
pathway a string representing the progression of events for a target. Use '-' to separate sequential steps and '+' for combination of events at that step
freq the count of pathway occurance
age the stratifyed pathways for age
indexYear the stratifyed pathways for index year
sex the stratifyed pathways for sex
Other TreatmentPatterns:
getAnalysisCohorts(),
getEventDuration()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) tp <- getTreatmentPathways( connectionHandler = connectionHandler, schema = "main" )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) tp <- getTreatmentPathways( connectionHandler = connectionHandler, schema = "main" )
This returns a html table with the input data
kableDark(data, caption = NULL, position = NULL)kableDark(data, caption = NULL, position = NULL)
data |
A data.frame containing data of interest to show via a table |
caption |
A caption for the table |
position |
The position for the table if used within a quarto document. This is the "real" or say floating position for the latex table environment. The kable only puts tables in a table environment when a caption is provided. That is also the reason why your tables will be floating around if you specify captions for your table. Possible choices are h (here), t (top, default), b (bottom) and p (on a dedicated page). |
Input the data that you want to be shown via a dark html table
An object of class 'knitr_kable' that will show the data via a nice html table
Other helper:
addTarColumn(),
formatBinaryCovariateName(),
getExampleConnectionDetails(),
getOutcomeTable(),
getTargetTable(),
removeSpaces()
kableDark( data = data.frame(a=1,b=4), caption = 'A made up table to demonstrate this function', position = 'h' )kableDark( data = data.frame(a=1,b=4), caption = 'A made up table to demonstrate this function', position = 'h' )
A package for extracting analyses results and creating reports.
Maintainer: Jenna Reps [email protected]
Authors:
Anthony Sena [email protected]
Useful links:
Report bugs at https://github.com/OHDSI/OhdsiReportGenerator/issues
Creates bar charts for the target and case age groups.
plotAgeDistributions( ageData, riskWindowStart = "1", riskWindowEnd = "365", startAnchor = "cohort start", endAnchor = "cohort start" )plotAgeDistributions( ageData, riskWindowStart = "1", riskWindowEnd = "365", startAnchor = "cohort start", endAnchor = "cohort start" )
ageData |
The age data extracted using 'getCharacterizationDemographics(type = 'age')' |
riskWindowStart |
The time at risk window start |
riskWindowEnd |
The time at risk window end |
startAnchor |
The anchor for the time at risk start |
endAnchor |
The anchor for the time at risk end |
Input the data returned from 'getCharacterizationDemographics(type = 'age')' and the time-at-risk
Returns a ggplot with the distributions
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotSexDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) ageData <- getCharacterizationDemographics( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3, type = 'age' ) plotAgeDistributions(ageData = ageData)conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) ageData <- getCharacterizationDemographics( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3, type = 'age' ) plotAgeDistributions(ageData = ageData)
Creates nice cohort method plots
plotCmEstimates( cmData, cmDiagnostics = NULL, cmMeta = NULL, cohortNames = NULL, includeCounts = TRUE, selectedAnalysisId = NULL )plotCmEstimates( cmData, cmDiagnostics = NULL, cmMeta = NULL, cohortNames = NULL, includeCounts = TRUE, selectedAnalysisId = NULL )
cmData |
The cohort method data |
cmDiagnostics |
(optional) The cohort method diagnostic data |
cmMeta |
(optional) The cohort method evidence synthesis data |
cohortNames |
A data.frame with columns cohortId and cohortName |
includeCounts |
Whether to include the target/comp size and event counts |
selectedAnalysisId |
The analysis ID of interest to plot |
Input the cohort method data
Returns a ggplot with the estimates
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotSccsEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmEst <- getCMEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1002, outcomeIds = 3 ) plotCmEstimates( cmData = cmEst, cmMeta = NULL, selectedAnalysisId = 1 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cmEst <- getCMEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1002, outcomeIds = 3 ) plotCmEstimates( cmData = cmEst, cmMeta = NULL, selectedAnalysisId = 1 )
Creates nice self controlled case series plots
plotSccsEstimates( sccsData, sccsDiagnostics = NULL, sccsMeta = NULL, includeCounts = TRUE, selectedAnalysisId )plotSccsEstimates( sccsData, sccsDiagnostics = NULL, sccsMeta = NULL, includeCounts = TRUE, selectedAnalysisId )
sccsData |
The self controlled case series data |
sccsDiagnostics |
(optional) The self controlled case series diagnostic data |
sccsMeta |
(optional) The self controlled case series evidence synthesis data |
includeCounts |
Whether to include count on the plot |
selectedAnalysisId |
The analysis ID of interest to plot |
Input the self controlled case series data
Returns a ggplot with the estimates
Other Estimation:
.getCmVersion(),
.getSccsVersion(),
getCMEstimation(),
getCmDiagnosticsData(),
getCmMetaEstimation(),
getCmNegativeControlEstimates(),
getCmOutcomes(),
getCmPropensityModel(),
getCmTable(),
getCmTargets(),
getSccsDiagnosticsData(),
getSccsEstimation(),
getSccsMetaEstimation(),
getSccsModel(),
getSccsNegativeControlEstimates(),
getSccsOutcomes(),
getSccsTable(),
getSccsTargets(),
getSccsTimeToEvent(),
plotCmEstimates()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsEst <- getSccsEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 ) plotSccsEstimates( sccsData = sccsEst, sccsMeta = NULL, selectedAnalysisId = 1 )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sccsEst <- getSccsEstimation( connectionHandler = connectionHandler, schema = 'main', targetIds = 1, outcomeIds = 3 ) plotSccsEstimates( sccsData = sccsEst, sccsMeta = NULL, selectedAnalysisId = 1 )
Creates bar charts for the target and case sex.
plotSexDistributions( sexData, riskWindowStart = "1", riskWindowEnd = "365", startAnchor = "cohort start", endAnchor = "cohort start" )plotSexDistributions( sexData, riskWindowStart = "1", riskWindowEnd = "365", startAnchor = "cohort start", endAnchor = "cohort start" )
sexData |
The sex data extracted using 'getCharacterizationDemographics(type = 'sex')' |
riskWindowStart |
The time at risk window start |
riskWindowEnd |
The time at risk window end |
startAnchor |
The anchor for the time at risk start |
endAnchor |
The anchor for the time at risk end |
Input the data returned from 'getCharacterizationDemographics(type = 'sex')' and the time-at-risk
Returns a ggplot with the distributions
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
viewIncidenceRate()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sexData <- getCharacterizationDemographics( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3, type = 'sex' ) plotSexDistributions(sexData = sexData)conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) sexData <- getCharacterizationDemographics( connectionHandler = connectionHandler, schema = 'main', targetId = 1, outcomeId = 3, type = 'sex' ) plotSexDistributions(sexData = sexData)
Function processes the cohortDefinitions object ready for use in the main quarto report.
processCohortDefinitionsForQuarto( cohortDefinitions, friendlyCohortIds, friendlyCohortNames, restrictTargetToIndications, indicationIds )processCohortDefinitionsForQuarto( cohortDefinitions, friendlyCohortIds, friendlyCohortNames, restrictTargetToIndications, indicationIds )
cohortDefinitions |
The output of 'getCohortDefinitions()' |
friendlyCohortIds |
a vector of parent cohort ids that you want to rename |
friendlyCohortNames |
a vector of new names for the friendlyCohortIds |
restrictTargetToIndications |
whether to restrict the results to cohorts nested in certain indications |
indicationIds |
The indication ids of interest for restrictTargetToIndications |
Function processes the cohortDefinitions object by adding friendly names for specified parent cohorts, determines which cohorts are nested in the specified indication cohort ids and ...
A cohortDefinitions object with extra columns: friendlyName,
Other Cohorts:
getCohortAttrition(),
getCohortCounts(),
getCohortDefinitions(),
getCohortInclusionRules(),
getCohortInclusionStats(),
getCohortInclusionSummary(),
getCohortMeta(),
getCohortSubsetAttrition(),
getCohortSubsetDefinitions(),
getSubsetText(),
processCohorts(),
restrictCohortDefinitionsForQuarto()
This function lets you split the cohort data.frame into the parents and the children per parent.
processCohorts(cohort)processCohorts(cohort)
cohort |
The data.frame extracted using 'getCohortDefinitions()' |
Finds the parent cohorts and children cohorts
Returns a list containing parents: a named vector of all the parent cohorts and cohortList: a list the same length as the parent vector with the first element containing all the children of the first parent cohort, the second element containing the children of the second parent, etc.
Other Cohorts:
getCohortAttrition(),
getCohortCounts(),
getCohortDefinitions(),
getCohortInclusionRules(),
getCohortInclusionStats(),
getCohortInclusionSummary(),
getCohortMeta(),
getCohortSubsetAttrition(),
getCohortSubsetDefinitions(),
getSubsetText(),
processCohortDefinitionsForQuarto(),
restrictCohortDefinitionsForQuarto()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortDef <- getCohortDefinitions( connectionHandler = connectionHandler, schema = 'main' ) parents <- processCohorts(cohortDef)conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) cohortDef <- getCohortDefinitions( connectionHandler = connectionHandler, schema = 'main' ) parents <- processCohorts(cohortDef)
Removes spaces and replaces with under scroll
removeSpaces(x)removeSpaces(x)
x |
A string |
Removes spaces and replaces with under scroll
A string without spaces
Other helper:
addTarColumn(),
formatBinaryCovariateName(),
getExampleConnectionDetails(),
getOutcomeTable(),
getTargetTable(),
kableDark()
removeSpaces(' made up. string')removeSpaces(' made up. string')
Function to figure out the target, comparator, outcome and indication ids of interest for the quarto report based on the user inputs
restrictCohortDefinitionsForQuarto( connectionHandler, schema, cohortDefinitions, targetId, outcomeIds, comparatorIds, restrictTargetToIndications, indicationIds, includeCohortMethod )restrictCohortDefinitionsForQuarto( connectionHandler, schema, cohortDefinitions, targetId, outcomeIds, comparatorIds, restrictTargetToIndications, indicationIds, includeCohortMethod )
connectionHandler |
A connection handler that connects to the database and extracts sql queries. Create a connection handler via 'ResultModelManager::ConnectionHandler$new()'. |
schema |
The result database schema (e.g., 'main' for sqlite) |
cohortDefinitions |
The output of 'processCohortDefinitionsForQuarto()' |
targetId |
a parent target id |
outcomeIds |
a vector of outcome ids |
comparatorIds |
NULL or a vector of comparator parent ids |
restrictTargetToIndications |
whether to restrict the target ids to cohorts nested in indicationIds |
indicationIds |
The indication ids of interest for restrictTargetToIndications |
includeCohortMethod |
If TRUE, when comparatorIds is NULL all comparators included in CohortMethod are included in the report |
This function finds the targets, comparators, indications and outcomes of interest based on the user inputs for quarto report generation.
A list of targetIdsOfInterest that is a vector of cohortIds that are targets of interest to include in the report, comparatorIds a vector of cohortIds that are comparators, comparatorIdsOfInterest a vector of cohortIds that are comparators of interest, outcomeIdsOfInterest a vector of cohortIds that are outcomes of interest and indicationIdsOfInterest a vector of cohortIds that are indications of interest.
Other Cohorts:
getCohortAttrition(),
getCohortCounts(),
getCohortDefinitions(),
getCohortInclusionRules(),
getCohortInclusionStats(),
getCohortInclusionSummary(),
getCohortMeta(),
getCohortSubsetAttrition(),
getCohortSubsetDefinitions(),
getSubsetText(),
processCohortDefinitionsForQuarto(),
processCohorts()
Creates a table with the incidence rates and optionally demographics
viewIncidenceRate( incidenceData, ageData = NULL, genderData = NULL, stratification = "overall", maxAgeSampleSize = 5000 )viewIncidenceRate( incidenceData, ageData = NULL, genderData = NULL, stratification = "overall", maxAgeSampleSize = 5000 )
incidenceData |
The data extracted using 'getIncidenceRates' |
ageData |
The data extracted using 'getBinaryTargetBaseline' with analysisIds = 3 |
genderData |
The data extracted using 'getBinaryTargetBaseline' with analysisIds = 1 |
stratification |
Pick either overall/age/sex/year to specify whether to view the overall rates or stratified by age/sex/year |
maxAgeSampleSize |
When creating the age distributions this is the max age vector length to create |
Input the incidence rate data (and optionally demographic data)
Returns a gt table that displays the incidence rates
Other Characterization:
getBinaryCaseSeries(),
getBinaryRiskFactors(),
getBinaryTargetBaseline(),
getCaseCounts(),
getCaseTargetCounts(),
getCharacterizationCohortBinary(),
getCharacterizationCohortContinuous(),
getCharacterizationDemographics(),
getCharacterizationOutcomes(),
getCharacterizationTargets(),
getContinuousCaseSeries(),
getContinuousRiskFactors(),
getDechallengeRechallenge(),
getDechallengeRechallengeFails(),
getIncidenceOutcomes(),
getIncidenceRates(),
getIncidenceTargets(),
getTargetBinaryFeatures(),
getTargetContinuousFeatures(),
getTimeToEvent(),
plotAgeDistributions(),
plotSexDistributions()
conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) schema <- 'main' incidenceData <- getIncidenceRates( connectionHandler = connectionHandler , schema = schema ) # incidence data does not have rate values to imputing them incidenceData$incidenceRateP100py <- 1 + sample(c(-1,1),replace = TRUE)*runif(nrow(incidenceData)) incidenceData$incidenceProportionP100p <- 0.5 + sample(c(-1,1),replace = TRUE)*runif(nrow(incidenceData)) ageData <- getBinaryTargetBaseline( connectionHandler = connectionHandler, schema = schema, analysisIds = 3 ) genderData <- getBinaryTargetBaseline( connectionHandler = connectionHandler, schema = schema, analysisIds = 1 ) viewIncidenceRate( incidenceData = incidenceData, ageData = ageData, genderData = genderData )conDet <- getExampleConnectionDetails() connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet) schema <- 'main' incidenceData <- getIncidenceRates( connectionHandler = connectionHandler , schema = schema ) # incidence data does not have rate values to imputing them incidenceData$incidenceRateP100py <- 1 + sample(c(-1,1),replace = TRUE)*runif(nrow(incidenceData)) incidenceData$incidenceProportionP100p <- 0.5 + sample(c(-1,1),replace = TRUE)*runif(nrow(incidenceData)) ageData <- getBinaryTargetBaseline( connectionHandler = connectionHandler, schema = schema, analysisIds = 3 ) genderData <- getBinaryTargetBaseline( connectionHandler = connectionHandler, schema = schema, analysisIds = 1 ) viewIncidenceRate( incidenceData = incidenceData, ageData = ageData, genderData = genderData )