R/thetagup.R

thetagup <-
function(q,G,betag,lg,sg,thetag){
	for(g in 1:G){
		if(q==1){
			thetag[,,g] <- diag(q) - betag[,,g] %*% lg[,,g] + 
					betag[,,g] %*% sg[,,g] %*% betag[,,g]
		}
		if(q>1){
			thetag[,,g] <- diag(q) - betag[,,g] %*% lg[,,g] + 
					betag[,,g] %*% sg[,,g] %*% t(betag[,,g])
		}
	}
	thetag
}

Try the mmtfa package in your browser

Any scripts or data that you put into this service are public.

mmtfa documentation built on May 2, 2019, 1:45 p.m.