You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pystat...@googlegroups.com
Hello,
I'm analysing a time series using the statsmodels package and specifically the arima class. Just wondered if it is currently possible to specify more than one exogenous variable (for example oil price and temperature) statsmodels.tsa.arima_model.ARIMA(endog, order, exog=None, dates=None, freq=None, missing='none'). I have tried passing a list of list of values but i receive an error about matrices being different sizes. If i pass a single list it works as expected.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pystatsmodels
a list of list has the wrong shape: when it gets converted to a numpy array with np.asarray then the observations will be in columns and variables in rows which is the transpose of what we need or use.
try
exog = np.column_stack(list_of_lists)
to convert to a numpy array.
I hope that works.
Josef
Thanks Phil
Philip Worrall
unread,
May 21, 2015, 1:26:11 PM5/21/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message