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

saveCohortMethodData()

Save the cohort data to folder

loadCohortMethodData()

Load the cohort data from a folder

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

stratifyByPs()

Stratify persons by propensity score

stratifyByPsAndCovariates()

Stratify persons by propensity score and other covariates

Outcome models

Functions for creating and viewing outcome models.

fitOutcomeModel()

Create an outcome model, and compute the relative risk

getOutcomeModel()

Get the outcome model

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

computePsAuc()

Compute the area under the ROC curve

computeCovariateBalance()

Compute covariate balance before and after matching and trimming

plotCovariateBalanceOfTopVariables()

Plot variables with largest imbalance

plotCovariateBalanceScatterPlot()

Create a scatterplot of the covariate balance

plotTimeToEvent()

Plot time-to-event

Running multiple analyses

Functions for running multiple analyses in an efficient way.

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

createTrimByPsArgs()

Create a parameter object for the function trimByPs

createTrimByPsToEquipoiseArgs()

Create a parameter object for the function trimByPsToEquipoise

createCmAnalysis()

Create a CohortMethod analysis specification

saveCmAnalysisList()

Save a list of cmAnalysis to file

loadCmAnalysisList()

Load a list of cmAnalysis from file

createTargetComparatorOutcomes()

Create target-comparator-outcomes combinations.

saveTargetComparatorOutcomesList()

Save a list of targetComparatorOutcomes to file

loadTargetComparatorOutcomesList()

Load a list of targetComparatorOutcomes from file

runCmAnalyses()

Run a list of analyses

summarizeAnalyses()

Create a summary report of the analyses

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

insertDbPopulation()

Insert a population into a database

constructEras()

Build eras

grepCovariateNames()

Extract covariate names