google / CausalImpact

An R package for causal inference in time series
Apache License 2.0
1.7k stars 253 forks source link

CausalImpact do not works at all #72

Open NikitaLinberg opened 7 months ago

NikitaLinberg commented 7 months ago

I have pd.DataFrame with 5 columns. I need to see what happenes with one of it

pre_period=[0, 118] post_period=[119, 138] impact = CausalImpact(df_3_prognoz[['cnt_users']], pre_period, post_period, model_args={'nseasons': 7}) impact.run() And i have this `~\AppData\Local\anaconda3\lib\site-packages\causalimpact\analysis.py in _run_with_data(self, data, pre_period, post_period, model_args, alpha, estimation) 412 # Zoom in on data in modeling range 413 if data.shape[1] == 1: # no exogenous values provided --> 414 raise ValueError("data contains no exogenous variables") 415 data_modeling = data.copy() 416

ValueError: data contains no exogenous variables`

But If I don't write "impact.run()", 'impact' gave me just <causalimpact.analysis.CausalImpact at 0x19d842355a0> without any data

SeanRichterWalsh commented 7 months ago

This does not look like valid R code. Are you using the R CausalImpact package?