compare_fits: a function for computing the difference and 95% confidence interval between fit object point estimates using bootstrap estimates to generate a standard error

compare_fits(fit1, fit2, effect_measure = NULL, reference = NULL, alpha = 0.05)

Arguments

fit1

A fit object

fit2

A fit object

effect_measure

The effect measure to be calculated, acceptable values are 'RR' and 'RD' for Risk Ratio and Risk Difference. If NULL, the difference of each individual risk between the fits will be returned.

reference

The integer associated with the reference group used to calculate effect measures, if NULL the last group is used as reference.

alpha

The level at which to compute the (1-alpha/2)% confidence interval. Defaults to 0.05.

Value

A list with an element for each treatment group when effect_measure is NULL, otherwise a list with an element containing the risk difference or ratio function for each treatment group compared to the reference. Each element contains the difference between the fits of the risk or effect measure at each time included in the fits, the standard error of the difference, and a (1-alpha/2)% confidence interval for the difference.

Author

M. Phelan