GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — OBC-multiple-equilibria/M_matrix.m at main · MCHatcher/OBC-multiple-equilibria Expand file tree/ Copy pathM_matrix.mMore file actions 54 lines (33 loc) · 1.49 KB / Copy pathM_matrix.mFile metadata and controls54 lines (33 loc) · 1.49 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 %Computing the M martix of impulse responses. For reference, see Holden (2023, Sec 2.4 and Online Appendix, Sec D). %Code written by Michael Hatcher ([email protected]). Any errors are my own. Last updated: 03/10/2024. not_P = NaN; %Initialization Gama_hat = (B1 - B2*Omega_bar) \ eye(length(X_init)); X_init_adj = zeros(length(X_init),1); if det(B1-B2-B3) == 0 disp('Assumption 1 not satisfied') end X_bar = (B1-B2-B3) \ B5; e_tild = NaN(length(X_init),T_guess+1); e_tild1 = e_tild; for j=1:T_guess Psi = Psi_bar-Psi_bar; Psi_1 = Psi; v = zeros(length(X_init),T_guess+1); v(1,j) = 1; for t=1:T_guess+1 %e_vec(:,t) = zeros(length(e_vec),1); e_tild(:,t) = B4*e_vec(:,t); e_tild1(:,t) = B4*e_vec(:,t) + v(:,t); end for t=T_guess:-1:1 Psi = (B1 - B2*Omega_bar) \ (B2*(Psi + Gama_hat*e_tild(:,t+1))); Psi_1 = (B1 - B2*Omega_bar) \ (B2*(Psi_1 + Gama_hat*e_tild1(:,t+1))); Psi0_t(:,t) = Psi; Psi01_t(:,t) = Psi_1; end x_irf(:,1) = Omega_bar*X_init_adj + Gama_hat*e_tild(:,1) + Psi0_t(:,1); x_irf1(:,1) = Omega_bar*X_init_adj + Gama_hat*e_tild1(:,1) + Psi01_t(:,1); for t=2:T_guess x_irf(:,t) = Omega_bar*x_irf(:,t-1) + Gama_hat*e_tild(:,t) + Psi0_t(:,t); x_irf1(:,t) = Omega_bar*x_irf1(:,t-1) + Gama_hat*e_tild1(:,t) + Psi01_t(:,t); end M(:,j) = x_irf1(1,:)' - x_irf(1,:)'; end |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |