CohortPrevalenceAnalysis objectcreateCohortPrevalenceAnalysis.RdConstructs an CohortPrevalenceAnalysis object with the specified settings.
createCohortPrevalenceAnalysis(
analysisId,
analysisTag = NULL,
prevalentCohort,
periodOfInterest,
prevalenceType,
minimumObservationLength = 0L,
useOnlyFirstObservationPeriod = FALSE,
multiplier = 100000L,
strata = NULL,
demographicConstraints = createDemographicConstraints(),
populationCohort = NULL,
outputTypes = "prevalence",
drugConceptSets = NULL
)Unique integer analysisId to identify the analysis (required).
A TargetCohort object specifying the cohort of interest (required).
A PeriodOfInterest object (required).
A PrevalenceType object (required).
Logical: TRUE to restrict analysis to the first observation period (optional).
Integer specifying prevalence multiplier (optional).
Character string. Must be one, or some of: "age", "gender", "race" (optional).
a DemoConstraint object specifying the constraints of the population.
A PopulationCohort object specifying the population of interest on which to compute prevalence.
Character vector specifying which output types to generate. Defaults to "prevalence". Can include "incidence" and/or "drugs" for simultaneous generation using shared base tables.
Warning: The "drugs" output type is experimental and should be used with caution. Results may be subject to future changes.
Optional list of Capr ConceptSetItems. Required if "drugs" is in outputTypes, otherwise ignored.
Integer specifying minimum observation length (optional).
A CohortPrevalenceAnalysis R6 object.