Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
QBatista committed Apr 4, 2020
1 parent 21a8493 commit 91e57a9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions quantecon/amf.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def pth_order_to_stacked_1st_order(ζ_hat, A_hats):
Vector of constants of the pth order VAR.
A_hats : tuple
Sequence of `p` matrices of shape `n x n` of lagged coefficients of
Sequence of `ρ` matrices of shape `n x n` of lagged coefficients of
the pth order VAR.
Returns
Expand All @@ -295,14 +295,14 @@ def pth_order_to_stacked_1st_order(ζ_hat, A_hats):
Matrix of coefficients of the 1st order stacked VAR.
"""
p = len(A_hats)
ρ = len(A_hats)
n = A_hats[0].shape[0]

A = np.zeros((n * p, n * p))
A = np.zeros((n * ρ, n * ρ))
A[:n, :] = np.hstack(A_hats)
A[n:, :n*(p-1)] = np.eye(n * (p - 1))
A[n:, :n*(ρ-1)] = np.eye(n * (ρ - 1))

ζ = np.zeros(n * p)
ζ = np.zeros(n * ρ)
ζ[:n] = np.eye(n) @ ζ_hat

return ζ, A
Expand All @@ -316,7 +316,7 @@ def compute_BQ_restricted_B_0(A_hats, Ω_hat):
Parameters
----------
A_hats : tuple
Sequence of `p` matrices of shape `n x n` of lagged coefficients of
Sequence of `ρ` matrices of shape `n x n` of lagged coefficients of
the pth order VAR.
Ω_hat : ndarray(float, ndim=2)
Expand Down

0 comments on commit 91e57a9

Please sign in to comment.