rhs = alpha(1)*psi(t,1) z(t,3) = rhs**(1/alpha(2)) fac1 = theta(t,1)*(z(t-1,1)**alpha(3)) fac2 = (1-alpha(3))*(1-alpha(6))*fac1*alpha(1)*psi(t,1) wh = whold call fderzero(f,derf,u1,u2,wh,prec,isol,alpha,fac2) if (isol.eq.0) then write(*,*) 'troubles with working hours routine' stop endif z(t,4) = isol wold = wh ccccc here along homotopy move alpha(8) from 0 to 1. z(t,2) = alpha(8)*wh + (1-alpha(8)) prod = (z(t,2)**(1-alpha(3)))*fac1 yncome = (1-alpha(7))*(alpha(3)*prod - alpha(5)*z(t-1,1)) + & (1-alpha(6))*(1-alpha(3))*prod z(t,1) = z(t-1,1) + yncome - z(t,3) if (z(t,1).le.0) then write(*,*) 'consumption too large' stop endif zlog(t,1) = log(z(t,1)) C calculate the phi to be predicted C 'phi' contains the stuff inside the conditional expectation that C we will try to predict in sbeta ret = 1 + (1-alpha(7))*(alpha(3)*prod/z(t-1,1) - alpha(5)) phi(t-1,1) = rhs*ret