/* INPUT PROJ1 ------- Deterministic Growth model from K.L.Judd: Projection Methods for Solving Aggregate Growth Models, J.Econ.Th. 58, 1992 */ library projec2; /* Parameters of model */ alpha = 1/3; beta = .95; gama = -.5; /* calibration on steady state */ aa = 1/(alpha*beta); /* constants of model */ nst = 1; /* number of state variables */ ncon = 1; /* number of control variables */ nfc = 6; /* degree of approximation */ nnn = nst~nfc~ncon; /* row vector of basic constants of model */ x = {.333, 1.667}; /* interval of state variable */ a0 = zeros(1,1); /* procedure for residual function */ proc _FRES(k,a); local R,h1,h2,h3,h4,h5,h6,h7,h8; h1 = AA*k^alpha; /* f(k(t)) */ h2 = __APROX(k,a); /* h(k(t)) */ h3 = h1-h2; /* k(t+1) */ h4 = __APROX(h3,a); /* h(k(t+1)) */ h7 = __GPOW(h4,gama); /* u'(h(k(t+1))) */ h8 = alpha*AA*h3^(alpha-1); /* f'(k(t+1)) */ h5 = beta*h7*h8; /* beta*u'(h(k(t+1)))*f'(k(t+1) */ h6 = __GPOW(h2,gama); /* u'(h(k(t))) */ R = h6-h5; retp(R); endp; /* initial value of parameters */ a0 = zeros(nst+1,ncon);/* initial values of parameters linear approximation */ a0[1] = .5; a0[2] = .2; PROJSET; _prsave = 1; _prinit = 0; _prsvfn = "a_6"; {a,ret} = PROJEC(&_FRES,nnn,x,a0);