hemorrhagesModel: Apply the existing model hemorrhages using the standardised...

Description Usage Arguments Details Value

View source: R/hemorrhagesl.R

Description

Apply the existing model hemorrhages using the standardised framework

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
hemorrhagesModel(
  connectionDetails,
  cdmDatabaseSchema,
  cohortDatabaseSchema,
  outcomeDatabaseSchema,
  cohortTable,
  outcomeTable,
  cohortId,
  outcomeId,
  oracleTempSchema = NULL,
  cdmVersion = 5,
  analysisId = "hemorrhages",
  sampleSize = NULL,
  riskWindowStart = 1,
  startAnchor = "cohort start",
  riskWindowEnd = 365,
  endAnchor = "cohort start",
  endDay = -1,
  requireTimeAtRisk = T,
  minTimeAtRisk = 1,
  includeAllOutcomes = T,
  removePriorOutcome = T,
  priorOutcomeLookback = 9999,
  calibrationPopulation = NULL,
  createCovariateCohorts = T,
  overwriteExistingCohorts = T,
  covariateDatabaseSchema = cohortDatabaseSchema,
  covariateCohortTable = "PredictionComp"
)

Arguments

connectionDetails

The connection details for extracting the data

cdmDatabaseSchema

A string specifying the database containing the cdm

cohortDatabaseSchema

A string specifying the database containing the target population cohort

outcomeDatabaseSchema

A string specifying the database containing the outcome cohort

cohortTable

A string specifying the table containing the target population cohort

outcomeTable

A string specifying the table containing the outcome cohort

cohortId

An iteger specifying the cohort id for the target population cohorts

outcomeId

An iteger specifying the cohort id for the outcome cohorts

oracleTempSchema

The temp schema require is using oracle

cdmVersion

The CDM version you are using

analysisId

An id to give to the study

sampleSize

The size to sample from T when applying the existing model

riskWindowStart

The start of the period to predict the risk of the outcome occurring start relative to the target cohort start date

startAnchor

Is the risk start relative to cohort_start or cohort_end

riskWindowEnd

The end of the period to predict the risk of the outcome occurring start relative to the target cohort start date

endAnchor

Is the risk end relative to cohort_start or cohort_end

endDay

The last day relative to index for the covariates

requireTimeAtRisk

Require a minimum number of days observed in the time at risk period?

minTimeAtRisk

If requireTimeAtRisk is true, the minimum number of days at risk

includeAllOutcomes

Whether to include people with outcome who do not satify the minTimeAtRisk

removePriorOutcome

Remove people with prior outcomes from the target population

priorOutcomeLookback

Time prior to index to remove people if they have the outcome

calibrationPopulation

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

createCovariateCohorts

Create the cohorts used for the covariates in the model

overwriteExistingCohorts

Overwrite cohorts that already exist in the covariateCohortTable table

covariateDatabaseSchema

A read/write database to keep the covariate cohorts

covariateCohortTable

A read/write table to keep the covariate cohorts

Details

This function applies hemorrhages to a target cohort and validates the performance

Value

A list containing the model performance and the personal predictions for each subject in the target population


OHDSI/PredictionComparison documentation built on July 14, 2020, 6:16 p.m.