No BSD License
-
[P,R,eig]=solve_deterministic...
PURPOSE: finds matrices P,R such that
-
[RR,PP,SS1,SS2,QQ1,QQ2]=state...
PURPOSE: set chosen variables as state variables in a model in the
-
gradient(A,B,C,V,W,P,R,S1,S2,...
PURPOSE: finds first differential of matrices representing solution with
-
gsch_order(U,V,TA,TB,SELECT);
PURPOSE: returns ordered generalized Shur decomposition
-
gschur(A,B,COND);
PURPOSE: returns ordered generalized Schur decomposition of a matrix pair (A,B)
-
gsylvester(A,B,C,D,E,F,versio...
PURPOSE: solves the generalized Sylvester equations:
-
gsylvester_schur(A,B,C,D,E,F)
PURPOSE: solves the generalized Sylvester equation:
-
linear2ss(A,B,C,V,W,xi,do_red...
PURPOSE: solves model of the form
-
lineareq(A,B,method,tol)
-
model_reduction(A,B,method)
PURPOSE: reduces dimension of the problem of finding matrices R, P, such that AR = BRP
-
null2(A,method,tol)
PURPOSE: returns an orthonormal basis of the null space and range of A
-
putv(A,method,tol)
-
rank2(A,tol)
PURPOSE: estimates matrix rank of an triangular matrix
-
schur_ord(A,B,xi)
PURPOSE: performs generalized Schur decomposition, eigenvalues lambda,
-
solve_stochastic(A,B,V,W,R,me...
PURPOSE: solves stochastic part of the mdel
-
state_check(K,R)
PURPOSE: checks whether variables defined by the matrix K can be chosen
-
state_find(K,R)
PURPOSE: finds whether some additional variable can be chosen as state variables
-
contents.m
-
demo.m
-
View all files
from
Solution to Linear Rational Expectations Models
by Pawel Kowal
Solves linear rational expectation models, delivers derivatives of solutions
|
| state_find(K,R)
|
function I = state_find(K,R)
% PURPOSE: finds whether some additional variable can be chosen as state variables
%
% ---------------------------------------------------
% USAGE: state_check(K,R)
% where:
% K a matrix representing state variables
% R a matrix determining observations in
% the system
% u_t = P u_t-1 + V epsilon_t
% y_t = R u_t + W epsilon_t
%
% Output:
% I indices of variables. One of these variables may
% be chosen as an additional state variable.
%
% COMMENTS:
%
% Copyright (c) Pawel Kowal (2006)
% All rights reserved
% LREM_SOLVE toolbox is available free for noncommercial academic use only.
% pkowal3@sgh.waw.pl
[Q,M,E] = qr((K*R)');
tol = 10*max(size(M)')*norm(M,1)*eps;
n = rank2(M,tol);
if n==size(R,2)
I = [];
return;
end
R = R*Q;
R = sum(abs(R(:,n+1:end)),2);
I = find(R>1000*eps);
|
|
Contact us at files@mathworks.com