computePreExposureGainP: Compute P for pre-exposure risk gain

View source: R/Diagnostics.R

computePreExposureGainPR Documentation

Compute P for pre-exposure risk gain

Description

Compute P for pre-exposure risk gain

Usage

computePreExposureGainP(sccsData, studyPopulation, exposureEraId = NULL)

Arguments

sccsData

An object of type SccsData as created using the getDbSccsData function.

studyPopulation

An object created using the createStudyPopulation() function.

exposureEraId

The exposure to create the era data for. If not specified it is assumed to be the one exposure for which the data was loaded from the database.

Details

Compares the rate of the outcome in the 30 days prior to exposure to the rate of the outcome in the 30 days following exposure. If the rate before exposure is higher, this indicates there might reverse causality, that the outcome, or some precursor of the outcome, increases the probability of having the exposure.

The resulting p-value is computed using a Poisson model conditioned on the person.

Value

A one-sided p-value for whether the rate before exposure is higher than after, against the null of no change.


OHDSI/SelfControlledCaseSeries documentation built on Sept. 7, 2024, 8:24 a.m.