This function implements an existing model
evaluateExistingModel(modelTable, covariateTable, interceptTable = NULL,
type = "score", covariateSettings, customCovariates = NULL,
riskWindowStart = 1, addExposureDaysToEnd = F, riskWindowEnd = 365,
requireTimeAtRisk = T, minTimeAtRisk = 364, includeAllOutcomes = T,
removeSubjectsWithPriorOutcome = T, connectionDetails, cdmDatabaseSchema,
cohortDatabaseSchema, cohortTable, cohortId, outcomeDatabaseSchema,
outcomeTable, outcomeId, oracleTempSchema = cdmDatabaseSchema,
modelName = "existingModel", calibrationPopulation = NULL)
The model covariates and scores
The mapping from model covariates to standard covariates
The model intercepts
Model type (score or logistic)
The standard covariate settings (specify covariate lookback time)
A table of covariateId, sql (sql creates the custom covariate)
The day after index to start predicting the outcome
riskWindomEnd relative to the cohort end date instead of the cohort start date?
The day after index to stop predicting the outcome
Do you want to ignore people who leave the database some point between the riskWindowStart and riskWindowEnd
If requireTimeAtRisk is TRUE, how many days must they be observed before leaving to get included (default recommendation is all risk period: riskWindowEnd-riskWindowStart)
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
Remove people from the target population if they have the outcome prior to target cohort start date
The details to connect to the CDM
A string specifying the database containing the cdm
A string specifying the database containing the target cohorts
A string specifying the table containing the target cohorts
An iteger specifying the cohort id for the target cohorts
A string specifying the database containing the outcome cohorts
A string specifying the table containing the outcome cohorts
An iteger specifying the cohort id for the outcome cohorts
The temp oracle schema
The name of the model
A data.frame of subjectId, cohortStartDate, indexes used to recalibrate the model on new data
The performance of the existing model and prediction
Implements an existing model and evaluates its performance