{"action":"created","issue":{"url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4465","repository_url":"https://api.github.com/repos/statsmodels/statsmodels","labels_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4465/labels{/name}","comments_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4465/comments","events_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4465/events","html_url":"https://github.com/statsmodels/statsmodels/issues/4465","id":313193791,"number":4465,"title":"maxlag should be < nobs always OCCUR in python3, how to fix it?","user":{"login":"xgkkk","id":16152270,"avatar_url":"https://avatars1.githubusercontent.com/u/16152270?v=4","gravatar_id":"","url":"https://api.github.com/users/xgkkk","html_url":"https://github.com/xgkkk","followers_url":"https://api.github.com/users/xgkkk/followers","following_url":"https://api.github.com/users/xgkkk/following{/other_user}","gists_url":"https://api.github.com/users/xgkkk/gists{/gist_id}","starred_url":"https://api.github.com/users/xgkkk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xgkkk/subscriptions","organizations_url":"https://api.github.com/users/xgkkk/orgs","repos_url":"https://api.github.com/users/xgkkk/repos","events_url":"https://api.github.com/users/xgkkk/events{/privacy}","received_events_url":"https://api.github.com/users/xgkkk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-11T06:49:54Z","updated_at":"2018-04-12T01:43:40Z","closed_at":null,"author_association":"NONE","body":"I have more than two years data but less than three years which consists of every weekly data.  And I want to make a weekly prediction.  Assume each year has 52 weeks. That means I have more than 104 items.\r\nI want to use the first 104 items (two years) to train my sarima model and use other data after these 104 weekly data to test my model.\r\nSo data_train should be data[:52*2].\r\nWhen I run the code below:\r\n```\r\n    mod = sm.tsa.statespace.SARIMAX([m for m in data_train],\r\n                                    order=(0, 0, 0),\r\n                                    seasonal_order=(1, 1, 0, 52),\r\n                                    enforce_stationarity=False,\r\n                                    enforce_invertibility=False)\r\n    results = mod.fit(disp=False)\r\n```\r\nIt always turns out \r\n\r\n```\r\n  File \"D:\\Anaconda3\\envs\\tensorflow\\lib\\site-packages\\statsmodels\\tsa\\statespace\\sarimax.py\", line 1009, in start_params\r\n    self.k_seasonal_ma, self.polynomial_seasonal_ma\r\n  File \"D:\\Anaconda3\\envs\\tensorflow\\lib\\site-packages\\statsmodels\\tsa\\statespace\\sarimax.py\", line 901, in _conditional_sum_squares\r\n    X = np.c_[X, lagmat(endog, k_ar)[r:, cols]]\r\n  File \"D:\\Anaconda3\\envs\\tensorflow\\lib\\site-packages\\statsmodels\\tsa\\tsatools.py\", line 379, in lagmat\r\n    raise ValueError(\"maxlag should be < nobs\")\r\nValueError: maxlag should be < nobs\r\n```\r\nsm.version.full_version = 0.8.0\r\nEspecially when I use grid search to find the best parameter of pdq and PDQ with the lowest AIC, it will turn out more and more **\"maxlag should be < nobs\"**. \r\nI want to know if my idea is false or it is just a bug or any other thing is wrong. I am not so familiar with arima.\r\nSo is there any approach to fix it?  Or any idea to finish it with other lib in python.\r\nThanks."},"comment":{"url":"https://api.github.com/repos/statsmodels/statsmodels/issues/comments/380647944","html_url":"https://github.com/statsmodels/statsmodels/issues/4465#issuecomment-380647944","issue_url":"https://api.github.com/repos/statsmodels/statsmodels/issues/4465","id":380647944,"user":{"login":"xgkkk","id":16152270,"avatar_url":"https://avatars1.githubusercontent.com/u/16152270?v=4","gravatar_id":"","url":"https://api.github.com/users/xgkkk","html_url":"https://github.com/xgkkk","followers_url":"https://api.github.com/users/xgkkk/followers","following_url":"https://api.github.com/users/xgkkk/following{/other_user}","gists_url":"https://api.github.com/users/xgkkk/gists{/gist_id}","starred_url":"https://api.github.com/users/xgkkk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xgkkk/subscriptions","organizations_url":"https://api.github.com/users/xgkkk/orgs","repos_url":"https://api.github.com/users/xgkkk/repos","events_url":"https://api.github.com/users/xgkkk/events{/privacy}","received_events_url":"https://api.github.com/users/xgkkk/received_events","type":"User","site_admin":false},"created_at":"2018-04-12T01:43:40Z","updated_at":"2018-04-12T01:43:40Z","author_association":"NONE","body":"@ChadFulton So how do Q and q  influence the number of observations? Thanks."}}
{"actor":{"display_login":"xgkkk"}}