Selecting predictor variables

732 views
Skip to first unread message

Chenxi Li

unread,
Nov 19, 2014, 8:57:39 PM11/19/14
to causal...@googlegroups.com
Hello Kay,

I am trying to selecting a "good" predictor variable from the multivariate dataset.  There is an example "plot(impact$model$bsts.model,"coefficients")", but how can we select variables from this plots. The coefficients of each Bayesian time series model is a vector,but the plot only can see the color for different variables.

Thank you very much.
Chenxi

Kay Brodersen

unread,
Nov 20, 2014, 3:48:39 AM11/20/14
to Chenxi Li, causal...@googlegroups.com
Hi Chenxi,

Variable selection is implemented via a spike-and-slab prior in CausalImpact. This means that you can supply even large numbers of predictor variables to CausalImpact(data = ...). The model will automatically infer a suitable subset. It does this by computing the posterior inclusion probability for each predictor. These inclusion probabilities are what you're looking at when you type plot(impact$model$bsts.model, "coefficients"). The colour indicates whether the coefficient itself has a positive or a negative expectation. You can further inspect the posterior distributions over the coefficients by typing names(impact$model$bsts.model).

Kay


--
You received this message because you are subscribed to the Google Groups "CausalImpact" group.
To unsubscribe from this group and stop receiving emails from it, send an email to causalimpact...@googlegroups.com.
To post to this group, send email to causal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/causalimpact/bf3021e3-e9f7-4475-97ba-427d0921fe45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kay Brodersen

unread,
Dec 3, 2014, 6:44:13 AM12/3/14
to Chenxi Li, causal...@googlegroups.com
Hi Chenxi,

There is no explicit check for collinearity / estimability, but the spike-and-slab prior should do a good job at selecting informative predictors even in the presence of strongly correlated variables.

Kay


On 2 December 2014 at 18:28, Chenxi Li <sisi8...@gmail.com> wrote:
Hello Kay,

I would like to select a "good" predictor variable from the multivariable dataset used the plot function. The high collinearity would affect the importance of variables which would change the results of inclusion probability. Did any step to check the collinearity between variables in the function to selecting "better" predictor variables from multi-variable dataset in CausalImpact package?

Thank you very much.
Chenxi
On Fri, Nov 21, 2014 at 12:02 AM, Chenxi Li <sisi8...@gmail.com> wrote:
Hello Kay,

Thank you to answer so quickly. It was trying to use this "CausalImpact" package on air pollution data and select a pollutant as predictor from the dataset. Thank you very much.

Chenxi



Reply all
Reply to author
Forward
0 new messages