This function takes fitted data from a serflm() or similar procedure and computes difference between observed and predicted mortality.
fludiff(data = NULL, obsvar = NULL, fitvar = NULL, serfrule = F)
data | A dataframe class object, must contain observed, fitted variables |
---|---|
obsvar | named observed outcome variable |
fitvar | named fitted trend variable. Can specify either fit line, or upper threshold limit. |
serfrule | Logical, default=F. If T the function will apply the Serfling rule which only counts consecutive observations of excess mortality. |
an object of class dataframe