This function implements an existing model

evaluateExistingModel(modelTable, covariateTable, interceptTable = NULL,
  type = "score", covariateSettings, customCovariates = NULL,
  addExposureDaysToStart = F, riskWindowStart = 1,
  addExposureDaysToEnd = F, riskWindowEnd = 365, requireTimeAtRisk = T,
  minTimeAtRisk = 364, includeAllOutcomes = T,
  removeSubjectsWithPriorOutcome = T, priorOutcomeLookback = 99999,
  verbosity = "INFO", washoutPeriod = 0, firstExposureOnly = F,
  binary = T, connectionDetails, cdmDatabaseSchema, cohortDatabaseSchema,
  cohortTable, cohortId, outcomeDatabaseSchema, outcomeTable, outcomeId,
  oracleTempSchema = cdmDatabaseSchema, modelName = "existingModel",
  calibrationPopulation = NULL, covariateSummary = T, cdmVersion = 5)

Arguments

modelTable

The model covariates and scores

covariateTable

The mapping from model covariates to standard covariates

interceptTable

The model intercepts

type

Model type (score or logistic)

covariateSettings

The standard covariate settings (specify covariate lookback time)

customCovariates

A table of covariateId, sql (sql creates the custom covariate)

addExposureDaysToStart

riskWindowStart relative to the cohort end date instead of the cohort start date?

riskWindowStart

The day after index to start predicting the outcome

addExposureDaysToEnd

riskWindowEnd relative to the cohort end date instead of the cohort start date?

riskWindowEnd

The day after index to stop predicting the outcome

requireTimeAtRisk

Do you want to ignore people who leave the database some point between the riskWindowStart and riskWindowEnd

minTimeAtRisk

If requireTimeAtRisk is TRUE, how many days must they be observed before leaving to get included (default recommendation is all risk period: riskWindowEnd-riskWindowStart)

includeAllOutcomes

Setting this to TRUE means people with the outcome who leave the data during the risk period are still included, so only non-outcome people who leave during the risk period are removed

removeSubjectsWithPriorOutcome

Remove people from the target population if they have the outcome prior to target cohort start date

priorOutcomeLookback

Lookback for removeSubjectsWithPriorOutcome

verbosity

The study population creation verbosity

washoutPeriod

Remove patients from the population with less than washoutPeriod of days prior observation

firstExposureOnly

If patients are in the target population multiple times, use only the first date

binary

Binary classificsation (T or F)

connectionDetails

The details to connect to the CDM

cdmDatabaseSchema

A string specifying the database containing the cdm

cohortDatabaseSchema

A string specifying the database containing the target cohorts

cohortTable

A string specifying the table containing the target cohorts

cohortId

An iteger specifying the cohort id for the target cohorts

outcomeDatabaseSchema

A string specifying the database containing the outcome cohorts

outcomeTable

A string specifying the table containing the outcome cohorts

outcomeId

An iteger specifying the cohort id for the outcome cohorts

oracleTempSchema

The temp oracle schema

modelName

The name of the model

calibrationPopulation

A data.frame of subjectId, cohortStartDate, indexes used to recalibrate the model on new data

covariateSummary

Whether to calculate the covariateSummary

cdmVersion

The CDM version being used

Value

The performance of the existing model and prediction

Details

Implements an existing model and evaluates its performance