the_gsru_pseudo-code
This is an old revision of the document!
This is from Legarra & Misztal 2008
Double precision:: xpx(neq),y(ndata),e(ndata),X(ndata,neq), & sol(neq),lambda,lhs,rhs,val do i=1,neq xpx(i)=dot_product(X(:,i),X(:,i)) !form diagonal of X′X enddo lambda=vare/vara e=y do until convergence do i=1,neq !form lhs lhs=xpx(i)+lambda ! form rhs with y corrected by other effects (formula 1) rhs=dot_product(X(:,i),e) +xpx(i) *sol(i) ! do Gauss Seidel val=rhs/lhs ! MCMC sample solution from its conditional (commented out here) ! val=normal(rhs/lhs,1d0/lhs) ! update e with current estimate (formula 2) e=e - X(:,i)*(val-sol(i)) !update sol sol(i)=val enddo enddo
the_gsru_pseudo-code.1336994215.txt.gz · Last modified: 2024/03/25 18:22 (external edit)