Skip to contents

This function acts as a Cohort2Trajectory wrapper

Usage

C2TCaller(
  data,
  pathToResults,
  trajectoryType = 1,
  stateSelectionType = 1,
  lengthOfStay = 30,
  mergeStates = FALSE,
  mergeThreshold = 0.5,
  outOfCohortAllowed = FALSE
)

Arguments

data

CohortContrast object

pathToResults

Path where data should be saved to

trajectoryType

Type of trajectories to generate (Discrete - 0, continuous - 1 )

stateSelectionType

State selection type (First occurring - 1, Largest overlap - 2, Priority - 3)

lengthOfStay

If discrete trajectory is generated we have to indicate the state length in days (integer)

mergeStates

Boolean for merging overlapping states

mergeThreshold

A value 0 to 1 indicating the threshold of overlap for merging - percentage

outOfCohortAllowed

Boolean for allowing to include state occurrences outside the cohort period

Examples