{"action":"created","issue":{"url":"https://api.github.com/repos/statsmodels/statsmodels/issues/3232","repository_url":"https://api.github.com/repos/statsmodels/statsmodels","labels_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/3232/labels{/name}","comments_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/3232/comments","events_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/3232/events","html_url":"https://github.com/statsmodels/statsmodels/issues/3232","id":181907373,"number":3232,"title":"Cannot perform fitting on SARIMAX model","user":{"login":"marta-em","id":22732142,"avatar_url":"https://avatars.githubusercontent.com/u/22732142?v=3","gravatar_id":"","url":"https://api.github.com/users/marta-em","html_url":"https://github.com/marta-em","followers_url":"https://api.github.com/users/marta-em/followers","following_url":"https://api.github.com/users/marta-em/following{/other_user}","gists_url":"https://api.github.com/users/marta-em/gists{/gist_id}","starred_url":"https://api.github.com/users/marta-em/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marta-em/subscriptions","organizations_url":"https://api.github.com/users/marta-em/orgs","repos_url":"https://api.github.com/users/marta-em/repos","events_url":"https://api.github.com/users/marta-em/events{/privacy}","received_events_url":"https://api.github.com/users/marta-em/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/statsmodels/statsmodels/labels/comp-tsa","name":"comp-tsa","color":"ededed"},{"url":"https://api.github.com/repos/statsmodels/statsmodels/labels/type-bug","name":"type-bug","color":"ff9999"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-09T19:59:44Z","updated_at":"2016-10-09T20:50:29Z","closed_at":null,"body":"The following code doesn't work on dummy data. It worked on real-life data. \r\n\r\nststsmodels ver. 0.8.0rc1 \r\n\r\n\r\n```\r\nimport pandas as pd\r\nimport statsmodels.api as sm\r\nimport random\r\n\r\nindex = pd.date_range('2015-01-01', '2015-01-31',freq='H')\r\n\r\ndf = pd.DataFrame({\r\n     'speed': random.sample(range(100000),len(index)),\r\n      'power': random.sample(range(100000),len(index))},\r\n       index=index)\r\n\r\nendog = df.ix[:, 'power']\r\nexog = sm.add_constant(df.ix[:, 'speed'])\r\n\r\narima = sm.tsa.statespace.SARIMAX(endog.ix[:'2015-01-30'], exog=exog.ix[:'2015-01-30'], order=(1,0,1))\r\nmodel_results = arima.fit()\r\n\r\narima = sm.tsa.statespace.SARIMAX(endog, exog=exog, order=(1,0,1))\r\nres = arima.filter(model_results.params)\r\n\r\npredict_steps = res.forecast(steps=24, exog=exog.ix['2015-01-31':])\r\n```\r\n\r\n\r\nTraceback (most recent call last):\r\n  File \"C:/Users/PycharmProjects/models/ARIMA_test.py\", line 24, in <module>\r\n    model_results = arima.fit()\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\statsmodels\\tsa\\statespace\\mlemodel.py\", line 405, in fit\r\n    start_params = self.start_params\r\n  File \"C:\\Anaconda3\\lib\\site-packages\\statsmodels\\tsa\\statespace\\sarimax.py\", line 967, in start_params\r\n    endog -= np.dot(exog, params_exog)\r\nTypeError: Cannot cast ufunc subtract output from dtype('float64') to dtype('int64') with casting rule 'same_kind'\r\n\r\n\r\nWhy the error occurs and how to fix it? \r\n"},"comment":{"url":"https://api.github.com/repos/statsmodels/statsmodels/issues/comments/252511805","html_url":"https://github.com/statsmodels/statsmodels/issues/3232#issuecomment-252511805","issue_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/3232","id":252511805,"user":{"login":"ChadFulton","id":280864,"avatar_url":"https://avatars.githubusercontent.com/u/280864?v=3","gravatar_id":"","url":"https://api.github.com/users/ChadFulton","html_url":"https://github.com/ChadFulton","followers_url":"https://api.github.com/users/ChadFulton/followers","following_url":"https://api.github.com/users/ChadFulton/following{/other_user}","gists_url":"https://api.github.com/users/ChadFulton/gists{/gist_id}","starred_url":"https://api.github.com/users/ChadFulton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChadFulton/subscriptions","organizations_url":"https://api.github.com/users/ChadFulton/orgs","repos_url":"https://api.github.com/users/ChadFulton/repos","events_url":"https://api.github.com/users/ChadFulton/events{/privacy}","received_events_url":"https://api.github.com/users/ChadFulton/received_events","type":"User","site_admin":false},"created_at":"2016-10-09T20:50:29Z","updated_at":"2016-10-09T20:50:29Z","body":"Thanks for the report! Looks like the issue occurs if `endog` is an integer array."}}
{"actor":{"display_login":"ChadFulton"}}