We now set the aggregate model with A and Q changing according to transition matrix.
We set
fc(K,K1,para)=para[.,1]*K^alpha-(K1-(1-delta)*K)/para[.,2]
rather than
fc(K,K1,A,Q)=A*K^alpha-(K1-(1-delta)*K)/Q
or
fc(k,k1,para)=para*A*k^alpha+(1-delta)*k-k1
rather than
fc(k,k1,theta)=theta*A*k^alpha+(1-delta)*k-k1
in general.
We also change the value of Kstar(or kstar) by xstar.
All we have to modify is to change the calling part of fc in terms of para[j,.] rather than
A[j] and Q[j] for aggregate model or theta[j] for non-aggregate model.