On Sun, Sep 11, 2016 at 11:00 AM, R. Trott <
roberto...@gmail.com> wrote:
> Hi
>
> I'm trying to fit an ARMA model with an exogenous variable:
>
> import statsmodels.api as sm
>
> arma_mod30 = sm.tsa.ARMA(LowP_RS, (4,0), exog=Temp_RS).fit()
>
>
> which works fine.
>
>
> Next I'd like to add a second exogenous series, i.e.:
>
>
> arma_mod30 = sm.tsa.ARMA(LowP_RS, (4,0), exog=[Temp_RS, Inlet_RS]).fit()
when we do np.asarray([Temp_RS, Inlet_RS]) internally, then this has
two rows and nobs columns, i.e. it is transposed.
use
exog=np.column_stack([Temp_RS, Inlet_RS])
to get a 2-D array with observation in rows and two columns for the variables
Josef