Closed dachosen1 closed 1 month ago
I’m trying to understand how to best structure data to account for seasonality or control for other variables using causal impact.
For example, consider a case where I’m conducting an analysis to measure the impact of an economic policy on GDP, but I want to control for inflation.
Is the below the correct way to structure the data? Does the order of the columns matter?
library(CausalImpact) gdp<- rnorm(100) inflation <- rnorm(100) data <- cbind(gdp, inflation) pre.period <- c(1, 50) post.period <- c(51, 100) impact <- CausalImpact(data, pre.period, post.period)
I’m trying to understand how to best structure data to account for seasonality or control for other variables using causal impact.
For example, consider a case where I’m conducting an analysis to measure the impact of an economic policy on GDP, but I want to control for inflation.
Is the below the correct way to structure the data? Does the order of the columns matter?