tfcausalimpact
tfcausalimpact copied to clipboard
modifying alpha.
how can i modify alpha level?
Hi @aazz7777 ,
By alpha you mean the prior level? See if this helps:
ci = CausalImpact(data, pre_period, post_period, model_args={'prior_level_sd':0.1})
I meant the alpha that affect CI value. 0.05, 0.2 . I noticed that it is set to 0.05
It sure is, simply run: ci = CausalImpact(data, pre_period, post_period, alpha=0.02)
for alpha=0.02
for instance.
Hello, is it possible to access the posterior distribution of the cumulative effect directly ? The idea is to extract whatever high density interval is needed from the posterior without having to perform the calculation again.
Maybe something like that: np.quantile(ci.posterior_dist.sample(1000)[:,-1,0], [0.98, 0.02])
. Although this seems to be based on the processed data ...
Hi @MilaimKas ,
Unfortunately this information is not currently available directly. Maybe you'd have to compute the simulated posteriors and then take the effect on each one so to get a distribution for effects.
Hello @WillianFuks I took a quick look at the code. It looks like it should be possible to implement something without too much effort. I would love to contribute to the project (even though I do not have much experience with code development).