Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 130405

CausalImpact is an R package for estimating the effect of an intervention on a time series. Use this tag for any on-topic question that (a) involves CausalImpact package either as a critical part of the question or expected answer, & (b) is not just about how to use CausalImpact.

2 votes

How to use a custom model in CausalImpact where preperiod.start is not right after preperiod...

It wouldn't be too hard to implement this feature, but it would require a change in the CausalImpact() interface. …
Alain Hauser's user avatar
0 votes

How to test the stability assumption when using the CausalImpact package in R?

Because CausalImpact uses a model fitted in the pre-period to predict the response in the post-period under the assumption that no intervention happened; the effect is calculated as the difference between …
Alain Hauser's user avatar
1 vote

CausalImpact plot upper and lower bounds

For point effects, the shaded blue area shows pointwise 95% credible intervals, while the summary table reports the 95% credible interval for the average effect (mean over the whole post-intervention …
Alain Hauser's user avatar
1 vote

BSTS employing purposedly spurious regressors for causal impact analysis

To make sure also 1 is not the case, you could fit an additional CausalImpact model using one of the control time series as response, and the remaining ones as covariates (and repeating this for each control … time series): if the control time series are indeed not affected by the intervention, CausalImpact should fail to find a significant impact here. …
Alain Hauser's user avatar
1 vote

Incorporating Fixed Effects with Causal Impact

This is currently not possible with the CausalImpact R package. …
Alain Hauser's user avatar
0 votes

How can you quantify the effect of a campaign in CausalImpact?

This is exactly what is reported as 'Absolute effect' in the summary of a CausalImpact object, say, impact: summary(impact) (See the examples in the package documentation, example("CausalImpact").) …
Alain Hauser's user avatar
1 vote

How is the posterior tail-area probability calculated?

The CausalImpact paper describes the calculation of the tail-area probability in detail (see section 2.3). …
Alain Hauser's user avatar
0 votes

Using CausalImpact in R, observed data affected by event that could not affect priors

It is possible to have a gap between pre- and post-period by specifying the arguments such pre.period[1] does not immediately follow pre.period[2]. With this, it is possible to exclude some time perio …
Alain Hauser's user avatar
1 vote

Odd behaviour in CausalImpact (R)

I can't reproduce your example... When I run the code provided, I get the following plot for the third case which looks OK: So it seems to me that there is some different problem?
Alain Hauser's user avatar
7 votes
Accepted

Odd behaviour in CausalImpact (R)

One can force CausalImpact to attribute the fluctuations to noise rather than signal by adjusting the prior for the random walk component: impact <- CausalImpact(data, pre.period, post.period, … This shows that CausalImpact does not wrongly learn from the independent time series x2: the factor accounting for the tight fits is the random walk component, not the regressor. …
Alain Hauser's user avatar
2 votes

Reduce credible intervals in Causal Impact model

The line plot shows that the scale of daily sales differ by almost an order of magnitude; so log-transforming daily sales and working on a log scale could help to get better models (it's easier for CausalImpact … Overall, the fact that credible bands are widening quickly shows that CausalImpact currently fits a strong random walk component, which means the variability in the response is currently not well explained …
Alain Hauser's user avatar
0 votes

How to study the causal impact on multiple time series of interest against multiple baselines

Given the high variability of the page hit data, there is probably not much you can do to fit models for individual players. However, you could at least try to fit a model for the sum of the daily pag …
Alain Hauser's user avatar
1 vote

CausalImpact with Custom BSTS Model

But even including variables that are not predictive should not hurt the model as CausalImpact performs automatic variable selection (a random noise variable should automatically be excluded). …
Alain Hauser's user avatar
1 vote

Causal impact R - Is it possible to model multiple the pre and post periods? Indivudally for...

No, the CausalImpact R package currently does not support that. …
Alain Hauser's user avatar
4 votes
Accepted

What does Posterior tail-area probability mean in Causal Impact?

Technically, this value is calculated as follows: Based on parameter priors and the data you provide, CausalImpact calculates the posterior distribution of the response variable that would be expected … In the example (to be run with example("CausalImpact") in R), the summary shows a positive effect and reports a tail-area probability of 0.001. …
Alain Hauser's user avatar

15 30 50 per page