OHDSI Home | Forums | Wiki | Github

Any idea about the generateOutcomes() function in PositiveControlSynthesis.R

Hi Folks,

I am trying to understand the code for positive control in the LEGEND framework (i.e., PositiveControlSynthesis.R). There is a function called “generateOutcomes” (https://github.com/OHDSI/MethodEvaluation/blob/main/R/PositiveControlSynthesis.R#L783). Can someone explain why we should subtract 1 from the observed outcome to define the targetCount?

targetCount <- resultSubset$observedOutcomes[1] * (effectSize - 1)

Thank you!