inst/doc/citsr_examples.R

## ----setup, include=FALSE-----------------------------------------------------
library(citsr)

## ----load-data, eval=FALSE----------------------------------------------------
# data("df_cits_example", package = "citsr")
# head(df_cits_example)

## ----fit-cits, eval=FALSE-----------------------------------------------------
# res <- cits(
#   data = df_cits_example,
#   y_col = "y",
#   T_col = "T",
#   I_col = "I",
#   E_col = "E"
# )
# 
# summary(res$model)

## ----plot-fitted, eval=FALSE--------------------------------------------------
# plot_fitted <- plot_cits_result(
#   res,
#   y_col = "y",
#   T_col = "T",
#   E_col = "E"
# )
# plot_fitted

## ----plot-cf, eval=FALSE------------------------------------------------------
# plot_cf <- plot_cits_result_cf(
#   res,
#   y_col = "y",
#   T_col = "T",
#   I_col = "I",
#   E_col = "E",
#   intervention_time = 50
# )
# plot_cf

Try the citsr package in your browser

Any scripts or data that you put into this service are public.

citsr documentation built on July 12, 2026, 5:07 p.m.