summary.CausalMBSTS function

Summary of causal effect estimation results obtained with CausalMBSTS

Summary of causal effect estimation results obtained with CausalMBSTS

The method extracts and computes various summaries of the causal analysis with CausalMBSTS.

## S3 method for class 'CausalMBSTS' summary(object, ...)

Arguments

  • object: An object of class 'CausalMBSTS', a result of a call to CausalMBSTS.
  • ...: further arguments passed to or from other methods (currently not used).

Returns

Returns an object of class summary.CausalMBSTS, which is a list of data frames corresponding to each date provided in horizon (or its default value) with the following columns: - mean: Estimated average causal effect

  • lower: Lower bound of the two-sided (1-alpha)% credible interval. Note that alpha parameter is inherited from the object object.

  • upper: Upper bound of the two-sided (1-alpha)% credible interval

  • cum.sum: Pointwise effect

  • cum.lower: Lower bound of a (1-alpha)% credible interval of the pointwise effect

  • cum.upper: Upper bound of a (1-alpha)% credible interval of the pointwise effect

  • bayes.pval: Bayesian p-value for the average causal effect

  • pct.causal.eff: Probability of a causal effect (%)

Examples

set.seed(1) t <- seq(from = 0,to = 4*pi, length.out=300) y <- cbind(3*sin(2*t)+rnorm(300), 2*cos(2*t) + rnorm(300)) dates <- seq.Date(from = as.Date("2015-01-01"), by = "week", length.out=300) int.date <- as.Date("2020-02-27") y[dates >= int.date,] <- y[dates >= int.date,]+2 # Causal effect estimation causal.2 <- CausalMBSTS(y, components = c("trend", "cycle"), cycle.period = 75, dates = dates, int.date = int.date, s0.r = 0.01*diag(2), s0.eps = 0.1*diag(2), niter = 100, burn = 10) sum.causal.2 <- summary(causal.2) print(sum.causal.2, digits = 2) sum.causal.2$horizon_default
  • Maintainer: Fiammetta Menchetti
  • License: GPL (>= 3)
  • Last published: 2021-10-05

Useful links