Skip to contents

Getting data and creating a study population

Functions for getting the necessary data from the database in Common Data Model, and creating a study population.

getDbCohortMethodData()
Get the cohort data from the server
show(<CohortMethodData>) summary(<CohortMethodData>)
Cohort Method Data
isCohortMethodData()
Check whether an object is a CohortMethodData object
saveCohortMethodData()
Save the cohort method data to file
loadCohortMethodData()
Load the cohort method data from a file
createStudyPopulation()
Create a study population

Propensity scores

Functions for creating and using propensity scores.

createPs()
Create propensity scores
getPsModel()
Get the propensity model
matchOnPs()
Match persons by propensity score
matchOnPsAndCovariates()
Match by propensity score as well as other covariates
trimByPs()
Trim persons by propensity score
trimByPsToEquipoise()
Keep only persons in clinical equipoise
trimByIptw()
Remove subjects with a high IPTW
stratifyByPs()
Stratify persons by propensity score
stratifyByPsAndCovariates()
Stratify persons by propensity score and other covariates
truncateIptw()
Truncate IPTW values

Outcome models

Functions for creating and viewing outcome models.

fitOutcomeModel()
Create an outcome model, and compute the relative risk
getOutcomeModel()
Get the outcome model
adjustedKm()
Compute a weight-adjusted Kaplan-Meier curve
plotKaplanMeier()
Plot the Kaplan-Meier curve

Diagnostics

Functions for producing various study diagnostics.

computeMdrr()
Compute the minimum detectable relative risk
getAttritionTable()
Get the attrition table for a population
drawAttritionDiagram()
Draw the attrition diagram
plotFollowUpDistribution()
Plot the distribution of follow-up time
createCmTable1()
Create a table 1
getDefaultCmTable1Specifications()
Get the default table 1 specifications
getFollowUpDistribution()
Get the distribution of follow-up time
plotPs()
Plot the propensity score distribution
computeEquipoise()
Compute fraction in equipoise
computePsAuc()
Compute the area under the ROC curve
computeCovariateBalance()
Compute covariate balance before and after PS adjustment
plotCovariateBalanceOfTopVariables()
Plot variables with largest imbalance
plotCovariateBalanceScatterPlot()
Create a scatterplot of the covariate balance
plotCovariatePrevalence()
Plot covariate prevalence
plotTimeToEvent()
Plot time-to-event
getGeneralizabilityTable()
Get information on generalizability

Running multiple analyses

Functions for running multiple analyses in an efficient way.

createComputeCovariateBalanceArgs()
Create a parameter object for the function computeCovariateBalance
createCreatePsArgs()
Create a parameter object for the function createPs
createCreateStudyPopulationArgs()
Create a parameter object for the function createStudyPopulation
createFitOutcomeModelArgs()
Create a parameter object for the function fitOutcomeModel
createGetDbCohortMethodDataArgs()
Create a parameter object for the function getDbCohortMethodData
createMatchOnPsAndCovariatesArgs()
Create a parameter object for the function matchOnPsAndCovariates
createMatchOnPsArgs()
Create a parameter object for the function matchOnPs
createStratifyByPsAndCovariatesArgs()
Create a parameter object for the function stratifyByPsAndCovariates
createStratifyByPsArgs()
Create a parameter object for the function stratifyByPs
createTrimByIptwArgs()
Create a parameter object for the function trimByIptw
createTrimByPsArgs()
Create a parameter object for the function trimByPs
createTrimByPsToEquipoiseArgs()
Create a parameter object for the function trimByPsToEquipoise
createTruncateIptwArgs()
Create a parameter object for the function truncateIptw
createCmAnalysis()
Create a CohortMethod analysis specification
saveCmAnalysisList()
Save a list of cmAnalysis to file
loadCmAnalysisList()
Load a list of cmAnalysis from file
createOutcome()
Create outcome definition
createTargetComparatorOutcomes()
Create target-comparator-outcomes combinations.
saveTargetComparatorOutcomesList()
Save a list of targetComparatorOutcomes to file
loadTargetComparatorOutcomesList()
Load a list of targetComparatorOutcomes from file
createMultiThreadingSettings()
Create CohortMethod multi-threading settings
createDefaultMultiThreadingSettings()
Create default CohortMethod multi-threading settings
runCmAnalyses()
Run a list of analyses

Results of multiple analyses

Functions for viewing results of multiple analyses.

getFileReference()
Get file reference
getResultsSummary()
Get a summary report of the analyses results
getInteractionResultsSummary()
Get a summary report of the analyses results
createCmDiagnosticThresholds()
Create CohortMethod diagnostics thresholds
exportToCsv()
Export cohort method results to CSV files
getResultsDataModelSpecifications()
Get specifications for CohortMethod results data model
insertExportedResultsInSqlite()
Insert exported results into a SQLite database
launchResultsViewerUsingSqlite()
Launch Shiny app using a SQLite database
createResultsDataModel()
Create the results data model tables on a database server.
migrateDataModel()
Migrate Data model
getDataMigrator()
Get database migrations instance
uploadResults()
Upload results to the database server.
launchResultsViewer()
Launch Shiny app using

Simulation

Functions for simulating cohort method data objects.

createCohortMethodDataSimulationProfile()
Create simulation profile
simulateCohortMethodData()
Generate simulated data
cohortMethodDataSimulationProfile
A simulation profile

Helper functions

Various helper functions

checkCmInstallation()
Check is CohortMethod and its dependencies are correctly installed