Module Expr Str ImportFrom alias alias alias Import alias identifier Import alias identifier Import alias identifier Import alias identifier Import alias identifier ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str Str body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Slice BinOpSub NameLoad NameLoad NameLoad Slice Num attr comprehension NameStore Call NameLoad NameLoad NameLoad If CompareNotEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults Str body If CompareEq NameLoad Str body Assign NameStore Num orelse If CompareEq NameLoad Str body Assign NameStore Num orelse If CompareEq NameLoad Str body Assign NameStore Num orelse If CompareEq NameLoad Str body Assign NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore ListLoad If Call NameLoad NameLoad NameLoad body Assign NameStore ListLoad NameLoad For NameStore Call NameLoad Num BinOpAdd NameLoad Num body For NameStore NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str NameLoad If CompareNotEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Num Str If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr Num Str If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr Num Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign SubscriptStore NameLoad Slice NameLoad Call AttributeLoad NameLoad attr NameLoad keyword Num If CompareGt NameLoad Num body Assign SubscriptStore NameLoad Index TupleLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str ImportFrom alias ImportFrom alias Import alias Import alias identifier Import alias Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Str With Call NameLoad NameLoad Str NameStore body Assign NameStore Call NameLoad NameLoad Assign NameStore Num While CompareNotIn Call NameLoad Str Call AttributeLoad NameLoad attr body AugAssignAdd NameStore Num While NameLoad body AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Break Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword BinOpAdd NameLoad Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Dict Call NameLoad Str Call NameLoad Str Call NameLoad Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpMult NameLoad BinOpSub NameLoad Num Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Num NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad ImportFrom alias Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias Return Call NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Str Str FunctionDef arguments args NameParam defaults Num body Return Call AttributeLoad AttributeLoad NameLoad attr attr BinOpSub Num BinOpDiv NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Return BinOpDiv NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad body Expr Str If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad ImportFrom alias identifier Assign TupleStore NameStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign SubscriptStore NameLoad Slice NameLoad BinOpAdd NameLoad SubscriptLoad NameLoad Slice NameLoad For NameStore Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad For NameStore Call NameLoad NameLoad body AugAssignAdd NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpSub BinOpSub NameLoad NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Assign NameStore NameLoad While CompareLt NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A 
Miscellaneous utility code for VAR estimation
 statsmodels.compat.python range string_types asbytes N/A numpy np N/A scipy.stats stats N/A scipy.linalg L N/A scipy.linalg.decomp decomp N/A statsmodels.tsa.tsatools tsa scipy.linalg cholesky get_var_endog N/A N/A y lags trend has_constant N/A c skip N/A N/A 
    Make predictor matrix for VAR(p) process

    Z := (Z_0, ..., Z_T).T (T x Kp)
    Z_t = [1 y_t y_{t-1} ... y_{t - p + 1}] (Kp x 1)

    Ref: Lutkepohl p.70 (transposed)

    has_constant can be 'raise', 'add', or 'skip'. See add_constant.
     N/A nobs N/A len y N/A Z N/A N/A np array N/A N/A N/A N/A N/A y N/A N/A t lags t N/A -1 ravel N/A t N/A range lags nobs N/A N/A trend nc N/A N/A Z N/A N/A tsa add_trend Z prepend True trend trend has_constant has_constant N/A Z N/A get_trendorder N/A N/A trend N/A c N/A N/A N/A trend c N/A N/A trendorder 1 N/A N/A N/A trend nc N/A N/A trendorder 0 N/A N/A N/A trend ct N/A N/A trendorder 2 N/A N/A N/A trend ctt N/A N/A trendorder 3 N/A trendorder N/A make_lag_names N/A N/A names lag_order trendorder N/A 1 N/A N/A 
    Produce list of lag-variable names. Constant / trends go at the beginning

    Examples
    --------
    >>> make_lag_names(['foo', 'bar'], 2, 1)
    ['const', 'L1.foo', 'L1.bar', 'L2.foo', 'L2.bar']

     N/A lag_names N/A N/A N/A isinstance names string_types N/A N/A names N/A names N/A i N/A range 1 N/A lag_order 1 N/A N/A name names N/A N/A N/A N/A isinstance name string_types N/A N/A name N/A str name N/A N/A N/A lag_names append N/A N/A N/A L N/A str i . name N/A N/A trendorder 0 N/A N/A N/A N/A lag_names insert 0 const N/A N/A trendorder 1 N/A N/A N/A N/A lag_names insert 0 trend N/A N/A trendorder 2 N/A N/A N/A N/A lag_names insert 0 trend**2 N/A lag_names N/A comp_matrix N/A N/A coefs N/A N/A N/A 
    Return compansion matrix for the VAR(1) representation for a VAR(p) process
    (companion form)

    A = [A_1 A_2 ... A_p-1 A_p
         I_K 0       0     0
         0   I_K ... 0     0
         0 ...       I_K   0]
     N/A N/A p k k2 N/A coefs shape N/A N/A k k2 N/A kp N/A k p N/A result N/A N/A np zeros N/A kp kp N/A N/A result N/A k N/A N/A np concatenate coefs axis 1 N/A N/A p 1 N/A N/A N/A result N/A N/A N/A N/A np arange k kp N/A N/A np arange N/A kp k 1 N/A result N/A parse_lutkepohl_data N/A N/A path N/A N/A N/A 
    Parse data files from Lutkepohl (2005) book

    Source for data files: www.jmulti.de
     collections deque datetime datetime N/A pandas N/A pandas.core.datetools dt N/A re N/A regex N/A N/A re compile N/A asbytes <(.*) (\w)([\d]+)>.* N/A N/A open path rb f N/A N/A lines N/A deque f N/A to_skip 0 N/A N/A N/A asbytes */ N/A N/A lines popleft N/A N/A to_skip 1 N/A True N/A N/A to_skip 1 N/A line N/A N/A lines popleft N/A m N/A N/A regex match line N/A m N/A N/A N/A year freq start_point N/A N/A m groups N/A N/A data N/A N/A np genfromtxt path names True skip_header N/A to_skip 1 N/A n N/A len data N/A start_point N/A int start_point N/A year N/A int year N/A offsets N/A N/A asbytes Q N/A asbytes M N/A asbytes A N/A N/A dt BQuarterEnd N/A N/A dt BMonthEnd N/A N/A dt BYearEnd N/A offset N/A offsets N/A freq N/A inc N/A offset N/A start_point 1 N/A start_date N/A N/A N/A offset rollforward N/A datetime year 1 1 inc N/A offset N/A offsets N/A freq pandas DatetimeIndex N/A date_range N/A DatetimeIndex start start_date freq offset periods n N/A N/A data date_range N/A get_logdet N/A N/A m N/A N/A statsmodels.tools.linalg logdet_symm N/A N/A logdet_symm m N/A N/A get_logdet N/A N/A np deprecate get_logdet statsmodels.tsa.vector_ar.util.get_logdet statsmodels.tools.linalg.logdet_symm get_logdet is deprecated and will be removed in 0.8.0 norm_signif_level N/A N/A alpha N/A 0.05 N/A N/A N/A N/A N/A stats norm ppf N/A 1 N/A alpha 2 N/A acf_to_acorr N/A N/A acf N/A N/A N/A diag N/A N/A np diag N/A acf N/A 0 N/A N/A acf N/A N/A np sqrt N/A N/A np outer diag diag N/A varsim N/A N/A coefs intercept sig_u steps initvalues seed N/A 100 None None N/A N/A 
    Simulate simple VAR(p) process with known coefficients, intercept, white
    noise covariance, etc.
     N/A N/A seed None N/A N/A N/A N/A N/A np random seed seed seed numpy.random multivariate_normal rmvnorm N/A N/A p k k N/A coefs shape N/A ugen N/A rmvnorm N/A N/A np zeros N/A len sig_u sig_u steps N/A result N/A N/A np zeros N/A steps k N/A N/A result N/A p N/A intercept N/A ugen N/A p N/A t N/A range p steps N/A N/A ygen N/A result N/A t N/A j N/A range p N/A N/A ygen N/A N/A np dot N/A coefs N/A j N/A result N/A N/A N/A t j 1 N/A result N/A get_index N/A N/A lst name N/A N/A N/A N/A N/A result N/A N/A lst index name N/A N/A N/A Exception N/A N/A N/A N/A isinstance name int N/A N/A N/A result name N/A result N/A eigval_decomp N/A N/A sym_array N/A N/A N/A 
    Returns
    -------
    W: array of eigenvectors
    eigva: list of eigenvalues
    k: largest eigenvector
     N/A N/A eigva W N/A N/A decomp eig sym_array left True right False N/A k N/A N/A np argmax eigva N/A N/A W eigva k N/A vech N/A N/A A N/A N/A N/A 
    Simple vech operator
    Returns
    -------
    vechvec: vector of all elements on and below diagonal
     N/A length N/A N/A A shape N/A 1 N/A vechvec N/A N/A i N/A range length N/A N/A b i N/A N/A b length N/A N/A N/A N/A vechvec append N/A A N/A N/A b i N/A b N/A b 1 N/A vechvec N/A N/A np asarray vechvec N/A vechvec N/A