Skip to contents

Calculate a data.frame of fatality ratios broken down by strata, as well as other optional model metrics.

Usage

calculate_fatality_ratio(x, ...)

# S3 method for class 'SeverityEstimateFit'
calculate_fatality_ratio(
  x,
  mean_estimate = TRUE,
  median_estimate = TRUE,
  naive_estimate = FALSE,
  alpha = 0.05,
  ...
)

# Default S3 method
calculate_fatality_ratio(x, ...)

Arguments

x

A object to calculate fatality ratio statistics from, typically a SeverityEstimateFit S4 object.

...

Further arguments passed to other methods.

mean_estimate

A single logical indicating if the mean estimate for the ratios should be included in the '*_mean_estimate' columns of the returned data.frame.

median_estimate

A single logical indicating if the median estimate for the ratios should be included in the '*_median_estimate column of the returned data.frame.

naive_estimate

A single logical indicating if the naive estimate for fatality ratio should be included in the 'naive_estimate' column.

alpha

A numeric of significance levels to return the parameters confidence intervals for. The columns will be in '*_{lower/upper}_{alpha}' format (i.e. '*_lower_05' and '*_upper_05' for alpha=0.05).

Value

calculate_fatality_ratio.SeverityEstimateFit returns a data.frame describing fatality ratios by strata or if now strata were provided to when fitting a single row data.frame.

calculate_fatality_ratio.default signals an error.