Skip to contents

Returns a ggplot of the per-month coefficient estimates from a monthglm() fit, with a confidence interval per month and (for Poisson/binomial families) a horizontal reference line at the rate / odds ratio of 1.

Usage

# S3 method for class 'monthglm'
autoplot(object, alpha = 0.05, ...)

Arguments

object

a monthglm object produced by monthglm().

alpha

statistical significance level for the confidence intervals (default 0.05).

...

unused, for S3 generic compatibility.

Value

a ggplot object.

See also

Author

Nicholas Tierney

Examples

# \donttest{
mmodel <- monthglm(
  formula = cvd ~ 1,
  data = CVD,
  family = poisson(),
  offsetpop = expression(pop / 100000),
  offsetmonth = TRUE,
  refmonth = 6
)
autoplot(mmodel)

autoplot(mmodel) + ggplot2::labs(x = "Month", y = "Rate ratio")

# }