2011年12月21日 星期三

Some Possible Command Useful for Binder-Pesaran Method

In MATLAB, we can use while loop to compute matrix H.
Here I will introduce how to use while in MATLAB. In fact, I strongly recommend you to check the document in MATLAB for help.

The structure of a while loop as follow:

WHILE expression
statements
END

If this condition in expression part holds, the program will repeat statements an indefinite number of times.

In that case of Binder-Pesaran Method, you can compute first 100 elements of H, then use while loop as:

B=F^100*G*D^100;
while max(max(abs(B)))>10^-6;
B=F*B*D;
H=H+B;
end;

something like that could get H.

And you may need "for loop" to compute first 100 elements of H. It is not big problem since you have done Problem Set 2.

2011年12月20日 星期二

Problem Set 3 解答

Answer

Another method of problem 3: undetermined coefficients
guess p_t=a_1*m_t + a_2* m-bar
plugging into eq.(10) and use eq.(11)
we can get the coefficients a_1 and a_2

2011年12月12日 星期一