/* fixed point computational exercise */ closeall; output file = fp_1.out reset; /* functional equation for simple infinite horizon unemployed search model in which the accepted job is kept forever */ /* parameters */ b = 1; rho = .05; lambda = .3; /* assume the wage offer distribution is negative exponential with parameter .2 - so that the mean wage offer is 5 */ gwstar = 0; _intord = 40; proc ifp(x); retp( (x - gwstar) .* ( .2 * exp( - .2 * x)) ); endp; proc t_oper(wstar); gwstar = wstar; retp( b + lambda/rho * intquad1( &ifp, (100 | wstar)) ); endp; /* /* plot t_oper */ library pgraph; graphset; xvec = seqa(.1,.1,300); xy(xvec,(t_oper(xvec) ~ xvec)); */ /* successive approximation to get fixed point */ x_old = 1; diff = 10; do until diff lt .000001; gwstar = x_old; x_new = .9 * t_oper(x_old) + .1 *x_old; diff = abs(x_new - x_old); print x_new; x_old = x_new; endo; print "wstar" x_old; end;