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
trimByPs()
Trim persons by propensity score
stratifyByPs()
Stratify persons by propensity score
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()
createMatchOnPsArgs()
Create a parameter object for the function matchOnPs()
createStratifyByPsArgs()
Create a parameter object for the function stratifyByPs()
createTrimByPsArgs()
Create a parameter object for the function trimByPs()
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
createCmDiagnosticThresholds()
Create CohortMethod diagnostics thresholds
createCmAnalysesSpecifications()
Create full CM analysis specifications
convertUntypedListToCmAnalysesSpecifications()
Convert untyped list to SccsAnalysesSpecifications
createMultiThreadingSettings()
Create CohortMethod multi-threading settings
createDefaultMultiThreadingSettings()
Create default CohortMethod multi-threading settings
runCmAnalyses()
Run a list of analyses
getFileReference()
Get file reference
getResultsSummary()
Get a summary report of the analyses results
getInteractionResultsSummary()
Get a summary report of the analyses results
getDiagnosticsSummary()
Get a summary report of the analyses diagnostics
exportToCsv()
Export cohort method results to CSV files

Results upload

Uploading results to a database.

getResultsDataModelSpecifications()
Get specifications for CohortMethod results data model
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.

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