Compute stability of outcome rate over time

computeTimeStability(
  studyPopulation,
  sccsModel = NULL,
  maxRatio = 1.25,
  alpha = 0.05
)

Arguments

studyPopulation

An object created using the createStudyPopulation() function.

sccsModel

Optional: A fitted SCCS model as created using fitSccsModel(). If the model contains splines for seasonality and or calendar time these will be adjusted for before computing stability.

maxRatio

The maximum ratio between the (adjusted) rate in a month, and the mean (adjusted) rate that we would consider to be irrelevant.

alpha

The alpha (type 1 error) used to test for stability. A Bonferroni correction will be applied for the number of months tested.

Value

A tibble with information on the temporal stability per month. The column stable indicates whether the rate of the outcome is within the expected range for that month, assuming the rate is constant over time.

Details

Computes for each calendar month the rate of the outcome, and evaluates whether that rate is constant over time. If splines are used to adjust for seasonality and/or calendar time, these adjustments are taken into consideration. For each month a two-sided p-value is computed against the null hypothesis that the rate in that month deviates from the mean rate no more than maxRatio. This p-value is compared to an alpha value, using a Bonferroni correction to adjust for the multiple testing across months.