The goal of causirf is to implement the method proposed in:
- Revisiting causality using stochastics: 1. Theory
- Revisiting causality using stochastics: 2. Applications
for causal analysis.
You can install the development version of causirf from GitHub with:
# install.packages("devtools")
devtools::install_github("miguel-conde/causirf")
This is a basic example which shows you how to solve a common problem:
library(causirf)
library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 4.1.2
data(temp_co2_data)
obj_causal_temp_co2 <- est_irf(temp_co2_data, "temp", "co2", J = 20, lambda = 10)
autoplot(obj_causal_temp_co2)
evr(obj_causal_temp_co2)
#> co2
#> co2 0.1223941