<s> """<STR_LIT>""" <EOL> import statsmodels . api as sm <EOL> import pandas as pd <EOL> data = sm . datasets . sunspots . load ( ) <EOL> dates = sm . tsa . datetools . dates_from_range ( '<STR_LIT>' , length = len ( data . endog ) ) <EOL> endog = pd . TimeSeries ( data . endog , index = dates ) <EOL> ar_model = sm . tsa . AR ( endog , freq = '<STR_LIT:A>' ) <EOL> pandas_ar_res = ar_model . fit ( maxlag = <NUM_LIT:9> , method = '<STR_LIT>' , disp = - <NUM_LIT:1> ) <EOL> pred = pandas_ar_res . predict ( start = '<STR_LIT>' , end = '<STR_LIT>' ) <EOL> print ( pred ) <EOL> ar_model = sm . tsa . AR ( data . endog , dates = dates , freq = '<STR_LIT:A>' ) <EOL> ar_res = ar_model . fit ( maxlag = <NUM_LIT:9> , method = '<STR_LIT>' , disp = - <NUM_LIT:1> ) <EOL> pred = ar_res . predict ( start = '<STR_LIT>' , end = '<STR_LIT>' ) <EOL> print ( pred ) <EOL> print ( ar_res . data . predict_dates ) </s>
