简体   繁体   中英

I am getting an error of “object arrays are not supported” when i am fitting the Dynamic Factor Model under statsmodels package

I'm trying to fit the dynamic factor model to my data for forecasting but I'm getting this error. 'dk' is a dataframe of stock index time series data. I'm doing the following:

dk_dfm = dk.loc['08-Nov-15':,'std_Volume':'std_IR']

mod = statsmodels.api.tsa.DynamicFactor(endog = dk_dfm, k_factors=1, factor_order=2, error_order=3)

till here it's getting processed.

dfm = mod.fit(method='newton', disp=False)

here i'm getting the error: 'object arrays are not supported'

you can try

dk_dfm = dk.loc['08-Nov-15':,'std_Volume':'std_IR'].values

to get a numpy array, I have no experience with statsmodels but this solution tends to work for this error EDIT: The fix that worked was upgrading to version 0.10rc2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM