R/calc.delta.errors.R

Defines functions calc.delta.errors

Documented in calc.delta.errors

calc.delta.errors <-
function(markers,beta.m,se,beta.cov) {

		beta.main <- beta.m[,1:2]
		beta.inter <- beta.m[,3]
		n.rows <- dim(beta.main)[1] #No of ETs
		n.cols <- dim(beta.main)[2]

		se.main <- se[,1:2]
		se.inter <- se[,3]

		
		if(n.rows == n.cols){
			act_delta <- solve(beta.main)%*%beta.inter
			}else{
			act_delta <- pseudoinverse(beta.main)%*%beta.inter
			}
		
		m12 = act_delta[1]/(1+act_delta[2])
		m21 = act_delta[2]/(1+act_delta[1])
		

		##### Code for error prop
		col.hdrs <- NULL		
		full.matrix <- matrix(0,n.rows,3*n.rows)
		coeffs <- NULL
		se <- NULL
		
		for(i in 1:n.rows) {
			numr <- c("1","2","12")
			col.hdrs <- append(col.hdrs,paste(letters[i],numr,sep=""))
			}
		
		for(i in 1:n.rows){
			coeffs <- append(coeffs,append(beta.main[i,],beta.inter[i]))
			se <- append(se,append(se.main[i,],se.inter[i]))
			}

		full.matrix	 <- rbind(coeffs,se)
		rownames(full.matrix) <- c("coeff","se")
		colnames(full.matrix) <- col.hdrs

		colnames(beta.cov) <- colnames(full.matrix)
		rownames(beta.cov) <- colnames(full.matrix)
		
		if (n.rows == 2) {
			#m12
			EXPR1 <- expression((b2*a12-a2*b12)/(a1*b2-a2*b1+(-b1*a12+a1*b12)))
			m12.errors <- propagate(expr = EXPR1, use.cov=beta.cov,data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
			#m21
			EXPR2 <- expression((-b1*a12+a1*b12)/((a1+a12)*b2-a2*(b1+b12)))
			m21.errors <- propagate(expr = EXPR2, use.cov=beta.cov, data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
        }

		if (n.rows == 3) {
			#m12
			EXPR1 <- expression((a2^2*(b1*b12 + c1*c12) + (b2*c1 - b1*c2)*(b2*c12 - b12*c2) - a2*(a12*b1*b2 + a1*b12*b2 + a12*c1*c2 + a1*c12*c2) + a1*a12*(b2^2 + c2^2))/(a1^2*b12*b2 + a1^2*b2^2 + b12*b2*c1^2 + b2^2*c1^2 + a2^2*(b1^2 + c1^2) - b1*b2*c1*c12 - b1*b12*c1*c2 - 2*b1*b2*c1*c2 + a1^2*c12*c2 + b1^2*c12*c2 + a1^2*c2^2 + b1^2*c2^2 - a1*a2*(b1*b12 + 2*b1*b2 + c1*c12 + 2*c1*c2) + a12*(a2*(b1^2 + c1^2) - a1*(b1*b2 + c1*c2))))
			m12.errors <- propagate(expr = EXPR1, use.cov=beta.cov,data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
			#m21
			EXPR2 <- expression((-(a1*a2*(b1*b12 + c1*c12)) + (b12*c1 - b1*c12)*(b2*c1 - b1*c2) + a1^2*(b12*b2 + c12*c2) + a12*(a2*(b1^2 + c1^2) - a1*(b1*b2 + c1*c2)))/(a2^2*(b1^2 + b1*b12 + c1*(c1 + c12)) + (b2*c1 - b1*c2)*(b2*(c1 + c12) - (b1 + b12)*c2) + a1^2*(b2^2 + c2^2) + a1*a12*(b2^2 + c2^2) - a2*(a12*(b1*b2 + c1*c2) + a1*(2*b1*b2 + b12*b2 + 2*c1*c2 + c12*c2))))
			m21.errors <- propagate(expr = EXPR2, use.cov=beta.cov, data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
        }
        
		if (n.rows == 4) {
			#m12
			EXPR1 <- expression((b2^2*c1*c12 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1*b12*c2^2 + b2^2*d1*d12 + c2^2*d1*d12 + a2^2*(b1*b12 + c1*c12 + d1*d12) - b12*b2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1*b12*d2^2 + c1*c12*d2^2 + a1*a12*(b2^2 + c2^2 + d2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2) + a1*(b12*b2 + c12*c2 + d12*d2)))/(a1^2*b12*b2 + a1^2*b2^2 + b12*b2*c1^2 + b2^2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 - 2*b1*b2*c1*c2 + a1^2*c12*c2 + b1^2*c12*c2 + a1^2*c2^2 + b1^2*c2^2 + b12*b2*d1^2 + b2^2*d1^2 + c12*c2*d1^2 + c2^2*d1^2 + a2^2*(b1^2 + c1^2 + d1^2) - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - 2*b1*b2*d1*d2 - c1*c12*d1*d2 - 2*c1*c2*d1*d2 + a1^2*d12*d2 + b1^2*d12*d2 + c1^2*d12*d2 + a1^2*d2^2 + b1^2*d2^2 + c1^2*d2^2 - a1*a2*(b1*b12 + 2*b1*b2 + c1*c12 + 2*c1*c2 + d1*d12 + 2*d1*d2) + a12*(a2*(b1^2 + c1^2 + d1^2) - a1*(b1*b2 + c1*c2 + d1*d2))))
			m12.errors <- propagate(expr = EXPR1, use.cov=beta.cov,data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
			#m21
			EXPR2 <- expression((b12*b2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 + b1^2*c12*c2 + b12*b2*d1^2 + c12*c2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - a1*a2*(b1*b12 + c1*c12 + d1*d12) - b1*b12*d1*d2 - c1*c12*d1*d2 + b1^2*d12*d2 + c1^2*d12*d2 + a1^2*(b12*b2 + c12*c2 + d12*d2) + a12*(a2*(b1^2 + c1^2 + d1^2) - a1*(b1*b2 + c1*c2 + d1*d2)))/(b2^2*c1^2 + b2^2*c1*c12 - 2*b1*b2*c1*c2 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1^2*c2^2 + b1*b12*c2^2 + b2^2*d1^2 + c2^2*d1^2 + b2^2*d1*d12 + c2^2*d1*d12 + a2^2*(b1^2 + b1*b12 + c1^2 + c1*c12 + d1*(d1 + d12)) - 2*b1*b2*d1*d2 - b12*b2*d1*d2 - 2*c1*c2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1^2*d2^2 + b1*b12*d2^2 + c1^2*d2^2 + c1*c12*d2^2 + a1^2*(b2^2 + c2^2 + d2^2) + a1*a12*(b2^2 + c2^2 + d2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2) + a1*(2*b1*b2 + b12*b2 + 2*c1*c2 + c12*c2 + 2*d1*d2 + d12*d2))))
			m21.errors <- propagate(expr = EXPR2, use.cov=beta.cov, data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
        }        

		if (n.rows == 5) {
			#m12
			EXPR1 <- expression((b2^2*c1*c12 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1*b12*c2^2 + b2^2*d1*d12 + c2^2*d1*d12 - b12*b2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1*b12*d2^2 + c1*c12*d2^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 + a2^2*(b1*b12 + c1*c12 + d1*d12 + e1*e12) - b12*b2*e1*e2 - c12*c2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1*b12*e2^2 + c1*c12*e2^2 + d1*d12*e2^2 + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2) + a1*(b12*b2 + c12*c2 + d12*d2 + e12*e2)))/(a1^2*b12*b2 + a1^2*b2^2 + b12*b2*c1^2 + b2^2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 - 2*b1*b2*c1*c2 + a1^2*c12*c2 + b1^2*c12*c2 + a1^2*c2^2 + b1^2*c2^2 + b12*b2*d1^2 + b2^2*d1^2 + c12*c2*d1^2 + c2^2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - 2*b1*b2*d1*d2 - c1*c12*d1*d2 - 2*c1*c2*d1*d2 + a1^2*d12*d2 + b1^2*d12*d2 + c1^2*d12*d2 + a1^2*d2^2 + b1^2*d2^2 + c1^2*d2^2 + b12*b2*e1^2 + b2^2*e1^2 + c12*c2*e1^2 + c2^2*e1^2 + d12*d2*e1^2 + d2^2*e1^2 + a2^2*(b1^2 + c1^2 + d1^2 + e1^2) - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - 2*b1*b2*e1*e2 - c1*c12*e1*e2 - 2*c1*c2*e1*e2 - d1*d12*e1*e2 - 2*d1*d2*e1*e2 + a1^2*e12*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + a1^2*e2^2 + b1^2*e2^2 + c1^2*e2^2 + d1^2*e2^2 - a1*a2*(b1*b12 + 2*b1*b2 + c1*c12 + 2*c1*c2 + d1*d12 + 2*d1*d2 + e1*e12 + 2*e1*e2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2))))
			m12.errors <- propagate(expr = EXPR1, use.cov=beta.cov,data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
			#m21
			EXPR2 <- expression((b12*b2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 + b1^2*c12*c2 + b12*b2*d1^2 + c12*c2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - c1*c12*d1*d2 + b1^2*d12*d2 + c1^2*d12*d2 + b12*b2*e1^2 + c12*c2*e1^2 + d12*d2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - a1*a2*(b1*b12 + c1*c12 + d1*d12 + e1*e12) - b1*b12*e1*e2 - c1*c12*e1*e2 - d1*d12*e1*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + a1^2*(b12*b2 + c12*c2 + d12*d2 + e12*e2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2)))/(b2^2*c1^2 + b2^2*c1*c12 - 2*b1*b2*c1*c2 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1^2*c2^2 + b1*b12*c2^2 + b2^2*d1^2 + c2^2*d1^2 + b2^2*d1*d12 + c2^2*d1*d12 - 2*b1*b2*d1*d2 - b12*b2*d1*d2 - 2*c1*c2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1^2*d2^2 + b1*b12*d2^2 + c1^2*d2^2 + c1*c12*d2^2 + b2^2*e1^2 + c2^2*e1^2 + d2^2*e1^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 + a2^2*(b1^2 + b1*b12 + c1^2 + c1*c12 + d1^2 + d1*d12 + e1^2 + e1*e12) - 2*b1*b2*e1*e2 - b12*b2*e1*e2 - 2*c1*c2*e1*e2 - c12*c2*e1*e2 - 2*d1*d2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1^2*e2^2 + b1*b12*e2^2 + c1^2*e2^2 + c1*c12*e2^2 + d1^2*e2^2 + d1*d12*e2^2 + a1^2*(b2^2 + c2^2 + d2^2 + e2^2) + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2) + a1*(2*b1*b2 + b12*b2 + 2*c1*c2 + c12*c2 + 2*d1*d2 + d12*d2 + 2*e1*e2 + e12*e2))))
			m21.errors <- propagate(expr = EXPR2, use.cov=beta.cov, data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
        }
        
		if (n.rows == 6) {
			#m12
			EXPR1 <- expression((b2^2*c1*c12 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1*b12*c2^2 + b2^2*d1*d12 + c2^2*d1*d12 - b12*b2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1*b12*d2^2 + c1*c12*d2^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - b12*b2*e1*e2 - c12*c2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1*b12*e2^2 + c1*c12*e2^2 + d1*d12*e2^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 + a2^2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12) - b12*b2*f1*f2 - c12*c2*f1*f2 - d12*d2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1*b12*f2^2 + c1*c12*f2^2 + d1*d12*f2^2 + e1*e12*f2^2 + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2) + a1*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2)))/(a1^2*b12*b2 + a1^2*b2^2 + b12*b2*c1^2 + b2^2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 - 2*b1*b2*c1*c2 + a1^2*c12*c2 + b1^2*c12*c2 + a1^2*c2^2 + b1^2*c2^2 + b12*b2*d1^2 + b2^2*d1^2 + c12*c2*d1^2 + c2^2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - 2*b1*b2*d1*d2 - c1*c12*d1*d2 - 2*c1*c2*d1*d2 + a1^2*d12*d2 + b1^2*d12*d2 + c1^2*d12*d2 + a1^2*d2^2 + b1^2*d2^2 + c1^2*d2^2 + b12*b2*e1^2 + b2^2*e1^2 + c12*c2*e1^2 + c2^2*e1^2 + d12*d2*e1^2 + d2^2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - 2*b1*b2*e1*e2 - c1*c12*e1*e2 - 2*c1*c2*e1*e2 - d1*d12*e1*e2 - 2*d1*d2*e1*e2 + a1^2*e12*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + a1^2*e2^2 + b1^2*e2^2 + c1^2*e2^2 + d1^2*e2^2 + b12*b2*f1^2 + b2^2*f1^2 + c12*c2*f1^2 + c2^2*f1^2 + d12*d2*f1^2 + d2^2*f1^2 + e12*e2*f1^2 + e2^2*f1^2 + a2^2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2) - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - 2*b1*b2*f1*f2 - c1*c12*f1*f2 - 2*c1*c2*f1*f2 - d1*d12*f1*f2 - 2*d1*d2*f1*f2 - e1*e12*f1*f2 - 2*e1*e2*f1*f2 + a1^2*f12*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + a1^2*f2^2 + b1^2*f2^2 + c1^2*f2^2 + d1^2*f2^2 + e1^2*f2^2 - a1*a2*(b1*b12 + 2*b1*b2 + c1*c12 + 2*c1*c2 + d1*d12 + 2*d1*d2 + e1*e12 + 2*e1*e2 + f1*f12 + 2*f1*f2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2))))
			m12.errors <- propagate(expr = EXPR1, use.cov=beta.cov,data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
			#m21
			EXPR2 <- expression((b12*b2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 + b1^2*c12*c2 + b12*b2*d1^2 + c12*c2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - c1*c12*d1*d2 + b1^2*d12*d2 + c1^2*d12*d2 + b12*b2*e1^2 + c12*c2*e1^2 + d12*d2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - c1*c12*e1*e2 - d1*d12*e1*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + b12*b2*f1^2 + c12*c2*f1^2 + d12*d2*f1^2 + e12*e2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - a1*a2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12) - b1*b12*f1*f2 - c1*c12*f1*f2 - d1*d12*f1*f2 - e1*e12*f1*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + a1^2*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2)))/(b2^2*c1^2 + b2^2*c1*c12 - 2*b1*b2*c1*c2 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1^2*c2^2 + b1*b12*c2^2 + b2^2*d1^2 + c2^2*d1^2 + b2^2*d1*d12 + c2^2*d1*d12 - 2*b1*b2*d1*d2 - b12*b2*d1*d2 - 2*c1*c2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1^2*d2^2 + b1*b12*d2^2 + c1^2*d2^2 + c1*c12*d2^2 + b2^2*e1^2 + c2^2*e1^2 + d2^2*e1^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - 2*b1*b2*e1*e2 - b12*b2*e1*e2 - 2*c1*c2*e1*e2 - c12*c2*e1*e2 - 2*d1*d2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1^2*e2^2 + b1*b12*e2^2 + c1^2*e2^2 + c1*c12*e2^2 + d1^2*e2^2 + d1*d12*e2^2 + b2^2*f1^2 + c2^2*f1^2 + d2^2*f1^2 + e2^2*f1^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 + a2^2*(b1^2 + b1*b12 + c1^2 + c1*c12 + d1^2 + d1*d12 + e1^2 + e1*e12 + f1^2 + f1*f12) - 2*b1*b2*f1*f2 - b12*b2*f1*f2 - 2*c1*c2*f1*f2 - c12*c2*f1*f2 - 2*d1*d2*f1*f2 - d12*d2*f1*f2 - 2*e1*e2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1^2*f2^2 + b1*b12*f2^2 + c1^2*f2^2 + c1*c12*f2^2 + d1^2*f2^2 + d1*d12*f2^2 + e1^2*f2^2 + e1*e12*f2^2 + a1^2*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2) + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2) + a1*(2*b1*b2 + b12*b2 + 2*c1*c2 + c12*c2 + 2*d1*d2 + d12*d2 + 2*e1*e2 + e12*e2 + 2*f1*f2 + f12*f2))))
			m21.errors <- propagate(expr = EXPR2, use.cov=beta.cov, data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
        }

		if (n.rows == 7) {
			##m12
			EXPR1 <- expression((b2^2*c1*c12 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1*b12*c2^2 + b2^2*d1*d12 + c2^2*d1*d12 - b12*b2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1*b12*d2^2 + c1*c12*d2^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - b12*b2*e1*e2 - c12*c2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1*b12*e2^2 + c1*c12*e2^2 + d1*d12*e2^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 - b12*b2*f1*f2 - c12*c2*f1*f2 - d12*d2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1*b12*f2^2 + c1*c12*f2^2 + d1*d12*f2^2 + e1*e12*f2^2 + b2^2*g1*g12 + c2^2*g1*g12 + d2^2*g1*g12 + e2^2*g1*g12 + f2^2*g1*g12 + a2^2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12 + g1*g12) - b12*b2*g1*g2 - c12*c2*g1*g2 - d12*d2*g1*g2 - e12*e2*g1*g2 - f12*f2*g1*g2 - b1*b2*g12*g2 - c1*c2*g12*g2 - d1*d2*g12*g2 - e1*e2*g12*g2 - f1*f2*g12*g2 + b1*b12*g2^2 + c1*c12*g2^2 + d1*d12*g2^2 + e1*e12*g2^2 + f1*f12*g2^2 + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2) + a1*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2 + g12*g2)))/(a1^2*b12*b2 + a1^2*b2^2 + b12*b2*c1^2 + b2^2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 - 2*b1*b2*c1*c2 + a1^2*c12*c2 + b1^2*c12*c2 + a1^2*c2^2 + b1^2*c2^2 + b12*b2*d1^2 + b2^2*d1^2 + c12*c2*d1^2 + c2^2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - 2*b1*b2*d1*d2 - c1*c12*d1*d2 - 2*c1*c2*d1*d2 + a1^2*d12*d2 + b1^2*d12*d2 + c1^2*d12*d2 + a1^2*d2^2 + b1^2*d2^2 + c1^2*d2^2 + b12*b2*e1^2 + b2^2*e1^2 + c12*c2*e1^2 + c2^2*e1^2 + d12*d2*e1^2 + d2^2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - 2*b1*b2*e1*e2 - c1*c12*e1*e2 - 2*c1*c2*e1*e2 - d1*d12*e1*e2 - 2*d1*d2*e1*e2 + a1^2*e12*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + a1^2*e2^2 + b1^2*e2^2 + c1^2*e2^2 + d1^2*e2^2 + b12*b2*f1^2 + b2^2*f1^2 + c12*c2*f1^2 + c2^2*f1^2 + d12*d2*f1^2 + d2^2*f1^2 + e12*e2*f1^2 + e2^2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - 2*b1*b2*f1*f2 - c1*c12*f1*f2 - 2*c1*c2*f1*f2 - d1*d12*f1*f2 - 2*d1*d2*f1*f2 - e1*e12*f1*f2 - 2*e1*e2*f1*f2 + a1^2*f12*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + a1^2*f2^2 + b1^2*f2^2 + c1^2*f2^2 + d1^2*f2^2 + e1^2*f2^2 + b12*b2*g1^2 + b2^2*g1^2 + c12*c2*g1^2 + c2^2*g1^2 + d12*d2*g1^2 + d2^2*g1^2 + e12*e2*g1^2 + e2^2*g1^2 + f12*f2*g1^2 + f2^2*g1^2 + a2^2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2) - b1*b2*g1*g12 - c1*c2*g1*g12 - d1*d2*g1*g12 - e1*e2*g1*g12 - f1*f2*g1*g12 - b1*b12*g1*g2 - 2*b1*b2*g1*g2 - c1*c12*g1*g2 - 2*c1*c2*g1*g2 - d1*d12*g1*g2 - 2*d1*d2*g1*g2 - e1*e12*g1*g2 - 2*e1*e2*g1*g2 - f1*f12*g1*g2 - 2*f1*f2*g1*g2 + a1^2*g12*g2 + b1^2*g12*g2 + c1^2*g12*g2 + d1^2*g12*g2 + e1^2*g12*g2 + f1^2*g12*g2 + a1^2*g2^2 + b1^2*g2^2 + c1^2*g2^2 + d1^2*g2^2 + e1^2*g2^2 + f1^2*g2^2 - a1*a2*(b1*b12 + 2*b1*b2 + c1*c12 + 2*c1*c2 + d1*d12 + 2*d1*d2 + e1*e12 + 2*e1*e2 + f1*f12 + 2*f1*f2 + g1*g12 + 2*g1*g2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2))))
			m12.errors <- propagate(expr = EXPR1, use.cov=beta.cov,data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
			##m21
			EXPR2 <- expression((b12*b2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 + b1^2*c12*c2 + b12*b2*d1^2 + c12*c2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - c1*c12*d1*d2 + b1^2*d12*d2 + c1^2*d12*d2 + b12*b2*e1^2 + c12*c2*e1^2 + d12*d2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - c1*c12*e1*e2 - d1*d12*e1*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + b12*b2*f1^2 + c12*c2*f1^2 + d12*d2*f1^2 + e12*e2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - c1*c12*f1*f2 - d1*d12*f1*f2 - e1*e12*f1*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + b12*b2*g1^2 + c12*c2*g1^2 + d12*d2*g1^2 + e12*e2*g1^2 + f12*f2*g1^2 - b1*b2*g1*g12 - c1*c2*g1*g12 - d1*d2*g1*g12 - e1*e2*g1*g12 - f1*f2*g1*g12 - a1*a2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12 + g1*g12) - b1*b12*g1*g2 - c1*c12*g1*g2 - d1*d12*g1*g2 - e1*e12*g1*g2 - f1*f12*g1*g2 + b1^2*g12*g2 + c1^2*g12*g2 + d1^2*g12*g2 + e1^2*g12*g2 + f1^2*g12*g2 + a1^2*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2 + g12*g2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2)))/(b2^2*c1^2 + b2^2*c1*c12 - 2*b1*b2*c1*c2 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1^2*c2^2 + b1*b12*c2^2 + b2^2*d1^2 + c2^2*d1^2 + b2^2*d1*d12 + c2^2*d1*d12 - 2*b1*b2*d1*d2 - b12*b2*d1*d2 - 2*c1*c2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1^2*d2^2 + b1*b12*d2^2 + c1^2*d2^2 + c1*c12*d2^2 + b2^2*e1^2 + c2^2*e1^2 + d2^2*e1^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - 2*b1*b2*e1*e2 - b12*b2*e1*e2 - 2*c1*c2*e1*e2 - c12*c2*e1*e2 - 2*d1*d2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1^2*e2^2 + b1*b12*e2^2 + c1^2*e2^2 + c1*c12*e2^2 + d1^2*e2^2 + d1*d12*e2^2 + b2^2*f1^2 + c2^2*f1^2 + d2^2*f1^2 + e2^2*f1^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 - 2*b1*b2*f1*f2 - b12*b2*f1*f2 - 2*c1*c2*f1*f2 - c12*c2*f1*f2 - 2*d1*d2*f1*f2 - d12*d2*f1*f2 - 2*e1*e2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1^2*f2^2 + b1*b12*f2^2 + c1^2*f2^2 + c1*c12*f2^2 + d1^2*f2^2 + d1*d12*f2^2 + e1^2*f2^2 + e1*e12*f2^2 + b2^2*g1^2 + c2^2*g1^2 + d2^2*g1^2 + e2^2*g1^2 + f2^2*g1^2 + b2^2*g1*g12 + c2^2*g1*g12 + d2^2*g1*g12 + e2^2*g1*g12 + f2^2*g1*g12 + a2^2*(b1^2 + b1*b12 + c1^2 + c1*c12 + d1^2 + d1*d12 + e1^2 + e1*e12 + f1^2 + f1*f12 + g1^2 + g1*g12) - 2*b1*b2*g1*g2 - b12*b2*g1*g2 - 2*c1*c2*g1*g2 - c12*c2*g1*g2 - 2*d1*d2*g1*g2 - d12*d2*g1*g2 - 2*e1*e2*g1*g2 - e12*e2*g1*g2 - 2*f1*f2*g1*g2 - f12*f2*g1*g2 - b1*b2*g12*g2 - c1*c2*g12*g2 - d1*d2*g12*g2 - e1*e2*g12*g2 - f1*f2*g12*g2 + b1^2*g2^2 + b1*b12*g2^2 + c1^2*g2^2 + c1*c12*g2^2 + d1^2*g2^2 + d1*d12*g2^2 + e1^2*g2^2 + e1*e12*g2^2 + f1^2*g2^2 + f1*f12*g2^2 + a1^2*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2) + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2) + a1*(2*b1*b2 + b12*b2 + 2*c1*c2 + c12*c2 + 2*d1*d2 + d12*d2 + 2*e1*e2 + e12*e2 + 2*f1*f2 + f12*f2 + 2*g1*g2 + g12*g2))))
			m21.errors <- propagate(expr = EXPR2, use.cov=beta.cov, data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
        }
		if (n.rows == 8) {
			#m12
			EXPR1 <- expression((b2^2*c1*c12 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1*b12*c2^2 + b2^2*d1*d12 + c2^2*d1*d12 - b12*b2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1*b12*d2^2 + c1*c12*d2^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - b12*b2*e1*e2 - c12*c2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1*b12*e2^2 + c1*c12*e2^2 + d1*d12*e2^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 - b12*b2*f1*f2 - c12*c2*f1*f2 - d12*d2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1*b12*f2^2 + c1*c12*f2^2 + d1*d12*f2^2 + e1*e12*f2^2 + b2^2*g1*g12 + c2^2*g1*g12 + d2^2*g1*g12 + e2^2*g1*g12 + f2^2*g1*g12 - b12*b2*g1*g2 - c12*c2*g1*g2 - d12*d2*g1*g2 - e12*e2*g1*g2 - f12*f2*g1*g2 - b1*b2*g12*g2 - c1*c2*g12*g2 - d1*d2*g12*g2 - e1*e2*g12*g2 - f1*f2*g12*g2 + b1*b12*g2^2 + c1*c12*g2^2 + d1*d12*g2^2 + e1*e12*g2^2 + f1*f12*g2^2 + b2^2*h1*h12 + c2^2*h1*h12 + d2^2*h1*h12 + e2^2*h1*h12 + f2^2*h1*h12 + g2^2*h1*h12 + a2^2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12 + g1*g12 + h1*h12) - b12*b2*h1*h2 - c12*c2*h1*h2 - d12*d2*h1*h2 - e12*e2*h1*h2 - f12*f2*h1*h2 - g12*g2*h1*h2 - b1*b2*h12*h2 - c1*c2*h12*h2 - d1*d2*h12*h2 - e1*e2*h12*h2 - f1*f2*h12*h2 - g1*g2*h12*h2 + b1*b12*h2^2 + c1*c12*h2^2 + d1*d12*h2^2 + e1*e12*h2^2 + f1*f12*h2^2 + g1*g12*h2^2 + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2) + a1*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2 + g12*g2 + h12*h2)))/(a1^2*b12*b2 + a1^2*b2^2 + b12*b2*c1^2 + b2^2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 - 2*b1*b2*c1*c2 + a1^2*c12*c2 + b1^2*c12*c2 + a1^2*c2^2 + b1^2*c2^2 + b12*b2*d1^2 + b2^2*d1^2 + c12*c2*d1^2 + c2^2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - 2*b1*b2*d1*d2 - c1*c12*d1*d2 - 2*c1*c2*d1*d2 + a1^2*d12*d2 + b1^2*d12*d2 + c1^2*d12*d2 + a1^2*d2^2 + b1^2*d2^2 + c1^2*d2^2 + b12*b2*e1^2 + b2^2*e1^2 + c12*c2*e1^2 + c2^2*e1^2 + d12*d2*e1^2 + d2^2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - 2*b1*b2*e1*e2 - c1*c12*e1*e2 - 2*c1*c2*e1*e2 - d1*d12*e1*e2 - 2*d1*d2*e1*e2 + a1^2*e12*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + a1^2*e2^2 + b1^2*e2^2 + c1^2*e2^2 + d1^2*e2^2 + b12*b2*f1^2 + b2^2*f1^2 + c12*c2*f1^2 + c2^2*f1^2 + d12*d2*f1^2 + d2^2*f1^2 + e12*e2*f1^2 + e2^2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - 2*b1*b2*f1*f2 - c1*c12*f1*f2 - 2*c1*c2*f1*f2 - d1*d12*f1*f2 - 2*d1*d2*f1*f2 - e1*e12*f1*f2 - 2*e1*e2*f1*f2 + a1^2*f12*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + a1^2*f2^2 + b1^2*f2^2 + c1^2*f2^2 + d1^2*f2^2 + e1^2*f2^2 + b12*b2*g1^2 + b2^2*g1^2 + c12*c2*g1^2 + c2^2*g1^2 + d12*d2*g1^2 + d2^2*g1^2 + e12*e2*g1^2 + e2^2*g1^2 + f12*f2*g1^2 + f2^2*g1^2 - b1*b2*g1*g12 - c1*c2*g1*g12 - d1*d2*g1*g12 - e1*e2*g1*g12 - f1*f2*g1*g12 - b1*b12*g1*g2 - 2*b1*b2*g1*g2 - c1*c12*g1*g2 - 2*c1*c2*g1*g2 - d1*d12*g1*g2 - 2*d1*d2*g1*g2 - e1*e12*g1*g2 - 2*e1*e2*g1*g2 - f1*f12*g1*g2 - 2*f1*f2*g1*g2 + a1^2*g12*g2 + b1^2*g12*g2 + c1^2*g12*g2 + d1^2*g12*g2 + e1^2*g12*g2 + f1^2*g12*g2 + a1^2*g2^2 + b1^2*g2^2 + c1^2*g2^2 + d1^2*g2^2 + e1^2*g2^2 + f1^2*g2^2 + b12*b2*h1^2 + b2^2*h1^2 + c12*c2*h1^2 + c2^2*h1^2 + d12*d2*h1^2 + d2^2*h1^2 + e12*e2*h1^2 + e2^2*h1^2 + f12*f2*h1^2 + f2^2*h1^2 + g12*g2*h1^2 + g2^2*h1^2 + a2^2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2) - b1*b2*h1*h12 - c1*c2*h1*h12 - d1*d2*h1*h12 - e1*e2*h1*h12 - f1*f2*h1*h12 - g1*g2*h1*h12 - b1*b12*h1*h2 - 2*b1*b2*h1*h2 - c1*c12*h1*h2 - 2*c1*c2*h1*h2 - d1*d12*h1*h2 - 2*d1*d2*h1*h2 - e1*e12*h1*h2 - 2*e1*e2*h1*h2 - f1*f12*h1*h2 - 2*f1*f2*h1*h2 - g1*g12*h1*h2 - 2*g1*g2*h1*h2 + a1^2*h12*h2 + b1^2*h12*h2 + c1^2*h12*h2 + d1^2*h12*h2 + e1^2*h12*h2 + f1^2*h12*h2 + g1^2*h12*h2 + a1^2*h2^2 + b1^2*h2^2 + c1^2*h2^2 + d1^2*h2^2 + e1^2*h2^2 + f1^2*h2^2 + g1^2*h2^2 - a1*a2*(b1*b12 + 2*b1*b2 + c1*c12 + 2*c1*c2 + d1*d12 + 2*d1*d2 + e1*e12 + 2*e1*e2 + f1*f12 + 2*f1*f2 + g1*g12 + 2*g1*g2 + h1*h12 + 2*h1*h2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2))))
			m12.errors <- propagate(expr = EXPR1, use.cov=beta.cov,data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
			#m21
			EXPR2 <- expression((b12*b2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 + b1^2*c12*c2 + b12*b2*d1^2 + c12*c2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - c1*c12*d1*d2 + b1^2*d12*d2 + c1^2*d12*d2 + b12*b2*e1^2 + c12*c2*e1^2 + d12*d2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - c1*c12*e1*e2 - d1*d12*e1*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + b12*b2*f1^2 + c12*c2*f1^2 + d12*d2*f1^2 + e12*e2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - c1*c12*f1*f2 - d1*d12*f1*f2 - e1*e12*f1*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + b12*b2*g1^2 + c12*c2*g1^2 + d12*d2*g1^2 + e12*e2*g1^2 + f12*f2*g1^2 - b1*b2*g1*g12 - c1*c2*g1*g12 - d1*d2*g1*g12 - e1*e2*g1*g12 - f1*f2*g1*g12 - b1*b12*g1*g2 - c1*c12*g1*g2 - d1*d12*g1*g2 - e1*e12*g1*g2 - f1*f12*g1*g2 + b1^2*g12*g2 + c1^2*g12*g2 + d1^2*g12*g2 + e1^2*g12*g2 + f1^2*g12*g2 + b12*b2*h1^2 + c12*c2*h1^2 + d12*d2*h1^2 + e12*e2*h1^2 + f12*f2*h1^2 + g12*g2*h1^2 - b1*b2*h1*h12 - c1*c2*h1*h12 - d1*d2*h1*h12 - e1*e2*h1*h12 - f1*f2*h1*h12 - g1*g2*h1*h12 - a1*a2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12 + g1*g12 + h1*h12) - b1*b12*h1*h2 - c1*c12*h1*h2 - d1*d12*h1*h2 - e1*e12*h1*h2 - f1*f12*h1*h2 - g1*g12*h1*h2 + b1^2*h12*h2 + c1^2*h12*h2 + d1^2*h12*h2 + e1^2*h12*h2 + f1^2*h12*h2 + g1^2*h12*h2 + a1^2*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2 + g12*g2 + h12*h2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2)))/(b2^2*c1^2 + b2^2*c1*c12 - 2*b1*b2*c1*c2 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1^2*c2^2 + b1*b12*c2^2 + b2^2*d1^2 + c2^2*d1^2 + b2^2*d1*d12 + c2^2*d1*d12 - 2*b1*b2*d1*d2 - b12*b2*d1*d2 - 2*c1*c2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1^2*d2^2 + b1*b12*d2^2 + c1^2*d2^2 + c1*c12*d2^2 + b2^2*e1^2 + c2^2*e1^2 + d2^2*e1^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - 2*b1*b2*e1*e2 - b12*b2*e1*e2 - 2*c1*c2*e1*e2 - c12*c2*e1*e2 - 2*d1*d2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1^2*e2^2 + b1*b12*e2^2 + c1^2*e2^2 + c1*c12*e2^2 + d1^2*e2^2 + d1*d12*e2^2 + b2^2*f1^2 + c2^2*f1^2 + d2^2*f1^2 + e2^2*f1^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 - 2*b1*b2*f1*f2 - b12*b2*f1*f2 - 2*c1*c2*f1*f2 - c12*c2*f1*f2 - 2*d1*d2*f1*f2 - d12*d2*f1*f2 - 2*e1*e2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1^2*f2^2 + b1*b12*f2^2 + c1^2*f2^2 + c1*c12*f2^2 + d1^2*f2^2 + d1*d12*f2^2 + e1^2*f2^2 + e1*e12*f2^2 + b2^2*g1^2 + c2^2*g1^2 + d2^2*g1^2 + e2^2*g1^2 + f2^2*g1^2 + b2^2*g1*g12 + c2^2*g1*g12 + d2^2*g1*g12 + e2^2*g1*g12 + f2^2*g1*g12 - 2*b1*b2*g1*g2 - b12*b2*g1*g2 - 2*c1*c2*g1*g2 - c12*c2*g1*g2 - 2*d1*d2*g1*g2 - d12*d2*g1*g2 - 2*e1*e2*g1*g2 - e12*e2*g1*g2 - 2*f1*f2*g1*g2 - f12*f2*g1*g2 - b1*b2*g12*g2 - c1*c2*g12*g2 - d1*d2*g12*g2 - e1*e2*g12*g2 - f1*f2*g12*g2 + b1^2*g2^2 + b1*b12*g2^2 + c1^2*g2^2 + c1*c12*g2^2 + d1^2*g2^2 + d1*d12*g2^2 + e1^2*g2^2 + e1*e12*g2^2 + f1^2*g2^2 + f1*f12*g2^2 + b2^2*h1^2 + c2^2*h1^2 + d2^2*h1^2 + e2^2*h1^2 + f2^2*h1^2 + g2^2*h1^2 + b2^2*h1*h12 + c2^2*h1*h12 + d2^2*h1*h12 + e2^2*h1*h12 + f2^2*h1*h12 + g2^2*h1*h12 + a2^2*(b1^2 + b1*b12 + c1^2 + c1*c12 + d1^2 + d1*d12 + e1^2 + e1*e12 + f1^2 + f1*f12 + g1^2 + g1*g12 + h1^2 + h1*h12) - 2*b1*b2*h1*h2 - b12*b2*h1*h2 - 2*c1*c2*h1*h2 - c12*c2*h1*h2 - 2*d1*d2*h1*h2 - d12*d2*h1*h2 - 2*e1*e2*h1*h2 - e12*e2*h1*h2 - 2*f1*f2*h1*h2 - f12*f2*h1*h2 - 2*g1*g2*h1*h2 - g12*g2*h1*h2 - b1*b2*h12*h2 - c1*c2*h12*h2 - d1*d2*h12*h2 - e1*e2*h12*h2 - f1*f2*h12*h2 - g1*g2*h12*h2 + b1^2*h2^2 + b1*b12*h2^2 + c1^2*h2^2 + c1*c12*h2^2 + d1^2*h2^2 + d1*d12*h2^2 + e1^2*h2^2 + e1*e12*h2^2 + f1^2*h2^2 + f1*f12*h2^2 + g1^2*h2^2 + g1*g12*h2^2 + a1^2*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2) + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2) + a1*(2*b1*b2 + b12*b2 + 2*c1*c2 + c12*c2 + 2*d1*d2 + d12*d2 + 2*e1*e2 + e12*e2 + 2*f1*f2 + f12*f2 + 2*g1*g2 + g12*g2 + 2*h1*h2 + h12*h2))))
			m21.errors <- propagate(expr = EXPR2, use.cov=beta.cov, data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
        }

		if (n.rows == 9) {
			#m12
			EXPR1 <- expression((b2^2*c1*c12 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1*b12*c2^2 + b2^2*d1*d12 + c2^2*d1*d12 - b12*b2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1*b12*d2^2 + c1*c12*d2^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - b12*b2*e1*e2 - c12*c2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1*b12*e2^2 + c1*c12*e2^2 + d1*d12*e2^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 - b12*b2*f1*f2 - c12*c2*f1*f2 - d12*d2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1*b12*f2^2 + c1*c12*f2^2 + d1*d12*f2^2 + e1*e12*f2^2 + b2^2*g1*g12 + c2^2*g1*g12 + d2^2*g1*g12 + e2^2*g1*g12 + f2^2*g1*g12 - b12*b2*g1*g2 - c12*c2*g1*g2 - d12*d2*g1*g2 - e12*e2*g1*g2 - f12*f2*g1*g2 - b1*b2*g12*g2 - c1*c2*g12*g2 - d1*d2*g12*g2 - e1*e2*g12*g2 - f1*f2*g12*g2 + b1*b12*g2^2 + c1*c12*g2^2 + d1*d12*g2^2 + e1*e12*g2^2 + f1*f12*g2^2 + b2^2*h1*h12 + c2^2*h1*h12 + d2^2*h1*h12 + e2^2*h1*h12 + f2^2*h1*h12 + g2^2*h1*h12 - b12*b2*h1*h2 - c12*c2*h1*h2 - d12*d2*h1*h2 - e12*e2*h1*h2 - f12*f2*h1*h2 - g12*g2*h1*h2 - b1*b2*h12*h2 - c1*c2*h12*h2 - d1*d2*h12*h2 - e1*e2*h12*h2 - f1*f2*h12*h2 - g1*g2*h12*h2 + b1*b12*h2^2 + c1*c12*h2^2 + d1*d12*h2^2 + e1*e12*h2^2 + f1*f12*h2^2 + g1*g12*h2^2 + b2^2*i1*i12 + c2^2*i1*i12 + d2^2*i1*i12 + e2^2*i1*i12 + f2^2*i1*i12 + g2^2*i1*i12 + h2^2*i1*i12 + a2^2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12 + g1*g12 + h1*h12 + i1*i12) - b12*b2*i1*i2 - c12*c2*i1*i2 - d12*d2*i1*i2 - e12*e2*i1*i2 - f12*f2*i1*i2 - g12*g2*i1*i2 - h12*h2*i1*i2 - b1*b2*i12*i2 - c1*c2*i12*i2 - d1*d2*i12*i2 - e1*e2*i12*i2 - f1*f2*i12*i2 - g1*g2*i12*i2 - h1*h2*i12*i2 + b1*b12*i2^2 + c1*c12*i2^2 + d1*d12*i2^2 + e1*e12*i2^2 + f1*f12*i2^2 + g1*g12*i2^2 + h1*h12*i2^2 + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2 + i2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2) + a1*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2 + g12*g2 + h12*h2 + i12*i2)))/(a1^2*b12*b2 + a1^2*b2^2 + b12*b2*c1^2 + b2^2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 - 2*b1*b2*c1*c2 + a1^2*c12*c2 + b1^2*c12*c2 + a1^2*c2^2 + b1^2*c2^2 + b12*b2*d1^2 + b2^2*d1^2 + c12*c2*d1^2 + c2^2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - 2*b1*b2*d1*d2 - c1*c12*d1*d2 - 2*c1*c2*d1*d2 + a1^2*d12*d2 + b1^2*d12*d2 + c1^2*d12*d2 + a1^2*d2^2 + b1^2*d2^2 + c1^2*d2^2 + b12*b2*e1^2 + b2^2*e1^2 + c12*c2*e1^2 + c2^2*e1^2 + d12*d2*e1^2 + d2^2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - 2*b1*b2*e1*e2 - c1*c12*e1*e2 - 2*c1*c2*e1*e2 - d1*d12*e1*e2 - 2*d1*d2*e1*e2 + a1^2*e12*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + a1^2*e2^2 + b1^2*e2^2 + c1^2*e2^2 + d1^2*e2^2 + b12*b2*f1^2 + b2^2*f1^2 + c12*c2*f1^2 + c2^2*f1^2 + d12*d2*f1^2 + d2^2*f1^2 + e12*e2*f1^2 + e2^2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - 2*b1*b2*f1*f2 - c1*c12*f1*f2 - 2*c1*c2*f1*f2 - d1*d12*f1*f2 - 2*d1*d2*f1*f2 - e1*e12*f1*f2 - 2*e1*e2*f1*f2 + a1^2*f12*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + a1^2*f2^2 + b1^2*f2^2 + c1^2*f2^2 + d1^2*f2^2 + e1^2*f2^2 + b12*b2*g1^2 + b2^2*g1^2 + c12*c2*g1^2 + c2^2*g1^2 + d12*d2*g1^2 + d2^2*g1^2 + e12*e2*g1^2 + e2^2*g1^2 + f12*f2*g1^2 + f2^2*g1^2 - b1*b2*g1*g12 - c1*c2*g1*g12 - d1*d2*g1*g12 - e1*e2*g1*g12 - f1*f2*g1*g12 - b1*b12*g1*g2 - 2*b1*b2*g1*g2 - c1*c12*g1*g2 - 2*c1*c2*g1*g2 - d1*d12*g1*g2 - 2*d1*d2*g1*g2 - e1*e12*g1*g2 - 2*e1*e2*g1*g2 - f1*f12*g1*g2 - 2*f1*f2*g1*g2 + a1^2*g12*g2 + b1^2*g12*g2 + c1^2*g12*g2 + d1^2*g12*g2 + e1^2*g12*g2 + f1^2*g12*g2 + a1^2*g2^2 + b1^2*g2^2 + c1^2*g2^2 + d1^2*g2^2 + e1^2*g2^2 + f1^2*g2^2 + b12*b2*h1^2 + b2^2*h1^2 + c12*c2*h1^2 + c2^2*h1^2 + d12*d2*h1^2 + d2^2*h1^2 + e12*e2*h1^2 + e2^2*h1^2 + f12*f2*h1^2 + f2^2*h1^2 + g12*g2*h1^2 + g2^2*h1^2 - b1*b2*h1*h12 - c1*c2*h1*h12 - d1*d2*h1*h12 - e1*e2*h1*h12 - f1*f2*h1*h12 - g1*g2*h1*h12 - b1*b12*h1*h2 - 2*b1*b2*h1*h2 - c1*c12*h1*h2 - 2*c1*c2*h1*h2 - d1*d12*h1*h2 - 2*d1*d2*h1*h2 - e1*e12*h1*h2 - 2*e1*e2*h1*h2 - f1*f12*h1*h2 - 2*f1*f2*h1*h2 - g1*g12*h1*h2 - 2*g1*g2*h1*h2 + a1^2*h12*h2 + b1^2*h12*h2 + c1^2*h12*h2 + d1^2*h12*h2 + e1^2*h12*h2 + f1^2*h12*h2 + g1^2*h12*h2 + a1^2*h2^2 + b1^2*h2^2 + c1^2*h2^2 + d1^2*h2^2 + e1^2*h2^2 + f1^2*h2^2 + g1^2*h2^2 + b12*b2*i1^2 + b2^2*i1^2 + c12*c2*i1^2 + c2^2*i1^2 + d12*d2*i1^2 + d2^2*i1^2 + e12*e2*i1^2 + e2^2*i1^2 + f12*f2*i1^2 + f2^2*i1^2 + g12*g2*i1^2 + g2^2*i1^2 + h12*h2*i1^2 + h2^2*i1^2 + a2^2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2 + i1^2) - b1*b2*i1*i12 - c1*c2*i1*i12 - d1*d2*i1*i12 - e1*e2*i1*i12 - f1*f2*i1*i12 - g1*g2*i1*i12 - h1*h2*i1*i12 - b1*b12*i1*i2 - 2*b1*b2*i1*i2 - c1*c12*i1*i2 - 2*c1*c2*i1*i2 - d1*d12*i1*i2 - 2*d1*d2*i1*i2 - e1*e12*i1*i2 - 2*e1*e2*i1*i2 - f1*f12*i1*i2 - 2*f1*f2*i1*i2 - g1*g12*i1*i2 - 2*g1*g2*i1*i2 - h1*h12*i1*i2 - 2*h1*h2*i1*i2 + a1^2*i12*i2 + b1^2*i12*i2 + c1^2*i12*i2 + d1^2*i12*i2 + e1^2*i12*i2 + f1^2*i12*i2 + g1^2*i12*i2 + h1^2*i12*i2 + a1^2*i2^2 + b1^2*i2^2 + c1^2*i2^2 + d1^2*i2^2 + e1^2*i2^2 + f1^2*i2^2 + g1^2*i2^2 + h1^2*i2^2 - a1*a2*(b1*b12 + 2*b1*b2 + c1*c12 + 2*c1*c2 + d1*d12 + 2*d1*d2 + e1*e12 + 2*e1*e2 + f1*f12 + 2*f1*f2 + g1*g12 + 2*g1*g2 + h1*h12 + 2*h1*h2 + i1*i12 + 2*i1*i2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2 + i1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2))))
			m12.errors <- propagate(expr = EXPR1, use.cov=beta.cov,data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
			
			#m21
			EXPR2 <- expression((b12*b2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 + b1^2*c12*c2 + b12*b2*d1^2 + c12*c2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - c1*c12*d1*d2 + b1^2*d12*d2 + c1^2*d12*d2 + b12*b2*e1^2 + c12*c2*e1^2 + d12*d2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - c1*c12*e1*e2 - d1*d12*e1*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + b12*b2*f1^2 + c12*c2*f1^2 + d12*d2*f1^2 + e12*e2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - c1*c12*f1*f2 - d1*d12*f1*f2 - e1*e12*f1*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + b12*b2*g1^2 + c12*c2*g1^2 + d12*d2*g1^2 + e12*e2*g1^2 + f12*f2*g1^2 - b1*b2*g1*g12 - c1*c2*g1*g12 - d1*d2*g1*g12 - e1*e2*g1*g12 - f1*f2*g1*g12 - b1*b12*g1*g2 - c1*c12*g1*g2 - d1*d12*g1*g2 - e1*e12*g1*g2 - f1*f12*g1*g2 + b1^2*g12*g2 + c1^2*g12*g2 + d1^2*g12*g2 + e1^2*g12*g2 + f1^2*g12*g2 + b12*b2*h1^2 + c12*c2*h1^2 + d12*d2*h1^2 + e12*e2*h1^2 + f12*f2*h1^2 + g12*g2*h1^2 - b1*b2*h1*h12 - c1*c2*h1*h12 - d1*d2*h1*h12 - e1*e2*h1*h12 - f1*f2*h1*h12 - g1*g2*h1*h12 - b1*b12*h1*h2 - c1*c12*h1*h2 - d1*d12*h1*h2 - e1*e12*h1*h2 - f1*f12*h1*h2 - g1*g12*h1*h2 + b1^2*h12*h2 + c1^2*h12*h2 + d1^2*h12*h2 + e1^2*h12*h2 + f1^2*h12*h2 + g1^2*h12*h2 + b12*b2*i1^2 + c12*c2*i1^2 + d12*d2*i1^2 + e12*e2*i1^2 + f12*f2*i1^2 + g12*g2*i1^2 + h12*h2*i1^2 - b1*b2*i1*i12 - c1*c2*i1*i12 - d1*d2*i1*i12 - e1*e2*i1*i12 - f1*f2*i1*i12 - g1*g2*i1*i12 - h1*h2*i1*i12 - a1*a2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12 + g1*g12 + h1*h12 + i1*i12) - b1*b12*i1*i2 - c1*c12*i1*i2 - d1*d12*i1*i2 - e1*e12*i1*i2 - f1*f12*i1*i2 - g1*g12*i1*i2 - h1*h12*i1*i2 + b1^2*i12*i2 + c1^2*i12*i2 + d1^2*i12*i2 + e1^2*i12*i2 + f1^2*i12*i2 + g1^2*i12*i2 + h1^2*i12*i2 + a1^2*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2 + g12*g2 + h12*h2 + i12*i2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2 + i1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2)))/(b2^2*c1^2 + b2^2*c1*c12 - 2*b1*b2*c1*c2 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1^2*c2^2 + b1*b12*c2^2 + b2^2*d1^2 + c2^2*d1^2 + b2^2*d1*d12 + c2^2*d1*d12 - 2*b1*b2*d1*d2 - b12*b2*d1*d2 - 2*c1*c2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1^2*d2^2 + b1*b12*d2^2 + c1^2*d2^2 + c1*c12*d2^2 + b2^2*e1^2 + c2^2*e1^2 + d2^2*e1^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - 2*b1*b2*e1*e2 - b12*b2*e1*e2 - 2*c1*c2*e1*e2 - c12*c2*e1*e2 - 2*d1*d2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1^2*e2^2 + b1*b12*e2^2 + c1^2*e2^2 + c1*c12*e2^2 + d1^2*e2^2 + d1*d12*e2^2 + b2^2*f1^2 + c2^2*f1^2 + d2^2*f1^2 + e2^2*f1^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 - 2*b1*b2*f1*f2 - b12*b2*f1*f2 - 2*c1*c2*f1*f2 - c12*c2*f1*f2 - 2*d1*d2*f1*f2 - d12*d2*f1*f2 - 2*e1*e2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1^2*f2^2 + b1*b12*f2^2 + c1^2*f2^2 + c1*c12*f2^2 + d1^2*f2^2 + d1*d12*f2^2 + e1^2*f2^2 + e1*e12*f2^2 + b2^2*g1^2 + c2^2*g1^2 + d2^2*g1^2 + e2^2*g1^2 + f2^2*g1^2 + b2^2*g1*g12 + c2^2*g1*g12 + d2^2*g1*g12 + e2^2*g1*g12 + f2^2*g1*g12 - 2*b1*b2*g1*g2 - b12*b2*g1*g2 - 2*c1*c2*g1*g2 - c12*c2*g1*g2 - 2*d1*d2*g1*g2 - d12*d2*g1*g2 - 2*e1*e2*g1*g2 - e12*e2*g1*g2 - 2*f1*f2*g1*g2 - f12*f2*g1*g2 - b1*b2*g12*g2 - c1*c2*g12*g2 - d1*d2*g12*g2 - e1*e2*g12*g2 - f1*f2*g12*g2 + b1^2*g2^2 + b1*b12*g2^2 + c1^2*g2^2 + c1*c12*g2^2 + d1^2*g2^2 + d1*d12*g2^2 + e1^2*g2^2 + e1*e12*g2^2 + f1^2*g2^2 + f1*f12*g2^2 + b2^2*h1^2 + c2^2*h1^2 + d2^2*h1^2 + e2^2*h1^2 + f2^2*h1^2 + g2^2*h1^2 + b2^2*h1*h12 + c2^2*h1*h12 + d2^2*h1*h12 + e2^2*h1*h12 + f2^2*h1*h12 + g2^2*h1*h12 - 2*b1*b2*h1*h2 - b12*b2*h1*h2 - 2*c1*c2*h1*h2 - c12*c2*h1*h2 - 2*d1*d2*h1*h2 - d12*d2*h1*h2 - 2*e1*e2*h1*h2 - e12*e2*h1*h2 - 2*f1*f2*h1*h2 - f12*f2*h1*h2 - 2*g1*g2*h1*h2 - g12*g2*h1*h2 - b1*b2*h12*h2 - c1*c2*h12*h2 - d1*d2*h12*h2 - e1*e2*h12*h2 - f1*f2*h12*h2 - g1*g2*h12*h2 + b1^2*h2^2 + b1*b12*h2^2 + c1^2*h2^2 + c1*c12*h2^2 + d1^2*h2^2 + d1*d12*h2^2 + e1^2*h2^2 + e1*e12*h2^2 + f1^2*h2^2 + f1*f12*h2^2 + g1^2*h2^2 + g1*g12*h2^2 + b2^2*i1^2 + c2^2*i1^2 + d2^2*i1^2 + e2^2*i1^2 + f2^2*i1^2 + g2^2*i1^2 + h2^2*i1^2 + b2^2*i1*i12 + c2^2*i1*i12 + d2^2*i1*i12 + e2^2*i1*i12 + f2^2*i1*i12 + g2^2*i1*i12 + h2^2*i1*i12 + a2^2*(b1^2 + b1*b12 + c1^2 + c1*c12 + d1^2 + d1*d12 + e1^2 + e1*e12 + f1^2 + f1*f12 + g1^2 + g1*g12 + h1^2 + h1*h12 + i1^2 + i1*i12) - 2*b1*b2*i1*i2 - b12*b2*i1*i2 - 2*c1*c2*i1*i2 - c12*c2*i1*i2 - 2*d1*d2*i1*i2 - d12*d2*i1*i2 - 2*e1*e2*i1*i2 - e12*e2*i1*i2 - 2*f1*f2*i1*i2 - f12*f2*i1*i2 - 2*g1*g2*i1*i2 - g12*g2*i1*i2 - 2*h1*h2*i1*i2 - h12*h2*i1*i2 - b1*b2*i12*i2 - c1*c2*i12*i2 - d1*d2*i12*i2 - e1*e2*i12*i2 - f1*f2*i12*i2 - g1*g2*i12*i2 - h1*h2*i12*i2 + b1^2*i2^2 + b1*b12*i2^2 + c1^2*i2^2 + c1*c12*i2^2 + d1^2*i2^2 + d1*d12*i2^2 + e1^2*i2^2 + e1*e12*i2^2 + f1^2*i2^2 + f1*f12*i2^2 + g1^2*i2^2 + g1*g12*i2^2 + h1^2*i2^2 + h1*h12*i2^2 + a1^2*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2 + i2^2) + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2 + i2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2) + a1*(2*b1*b2 + b12*b2 + 2*c1*c2 + c12*c2 + 2*d1*d2 + d12*d2 + 2*e1*e2 + e12*e2 + 2*f1*f2 + f12*f2 + 2*g1*g2 + g12*g2 + 2*h1*h2 + h12*h2 + 2*i1*i2 + i12*i2))))
			m21.errors <- propagate(expr = EXPR2, use.cov=beta.cov, data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
        }

	if (n.rows == 10) {
			#m12
			EXPR1 <- expression((b2^2*c1*c12 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1*b12*c2^2 + b2^2*d1*d12 + c2^2*d1*d12 - b12*b2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1*b12*d2^2 + c1*c12*d2^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - b12*b2*e1*e2 - c12*c2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1*b12*e2^2 + c1*c12*e2^2 + d1*d12*e2^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 - b12*b2*f1*f2 - c12*c2*f1*f2 - d12*d2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1*b12*f2^2 + c1*c12*f2^2 + d1*d12*f2^2 + e1*e12*f2^2 + b2^2*g1*g12 + c2^2*g1*g12 + d2^2*g1*g12 + e2^2*g1*g12 + f2^2*g1*g12 - b12*b2*g1*g2 - c12*c2*g1*g2 - d12*d2*g1*g2 - e12*e2*g1*g2 - f12*f2*g1*g2 - b1*b2*g12*g2 - c1*c2*g12*g2 - d1*d2*g12*g2 - e1*e2*g12*g2 - f1*f2*g12*g2 + b1*b12*g2^2 + c1*c12*g2^2 + d1*d12*g2^2 + e1*e12*g2^2 + f1*f12*g2^2 + b2^2*h1*h12 + c2^2*h1*h12 + d2^2*h1*h12 + e2^2*h1*h12 + f2^2*h1*h12 + g2^2*h1*h12 - b12*b2*h1*h2 - c12*c2*h1*h2 - d12*d2*h1*h2 - e12*e2*h1*h2 - f12*f2*h1*h2 - g12*g2*h1*h2 - b1*b2*h12*h2 - c1*c2*h12*h2 - d1*d2*h12*h2 - e1*e2*h12*h2 - f1*f2*h12*h2 - g1*g2*h12*h2 + b1*b12*h2^2 + c1*c12*h2^2 + d1*d12*h2^2 + e1*e12*h2^2 + f1*f12*h2^2 + g1*g12*h2^2 + b2^2*i1*i12 + c2^2*i1*i12 + d2^2*i1*i12 + e2^2*i1*i12 + f2^2*i1*i12 + g2^2*i1*i12 + h2^2*i1*i12 - b12*b2*i1*i2 - c12*c2*i1*i2 - d12*d2*i1*i2 - e12*e2*i1*i2 - f12*f2*i1*i2 - g12*g2*i1*i2 - h12*h2*i1*i2 - b1*b2*i12*i2 - c1*c2*i12*i2 - d1*d2*i12*i2 - e1*e2*i12*i2 - f1*f2*i12*i2 - g1*g2*i12*i2 - h1*h2*i12*i2 + b1*b12*i2^2 + c1*c12*i2^2 + d1*d12*i2^2 + e1*e12*i2^2 + f1*f12*i2^2 + g1*g12*i2^2 + h1*h12*i2^2 + b2^2*j1*j12 + c2^2*j1*j12 + d2^2*j1*j12 + e2^2*j1*j12 + f2^2*j1*j12 + g2^2*j1*j12 + h2^2*j1*j12 + i2^2*j1*j12 + a2^2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12 + g1*g12 + h1*h12 + i1*i12 + j1*j12) - b12*b2*j1*j2 - c12*c2*j1*j2 - d12*d2*j1*j2 - e12*e2*j1*j2 - f12*f2*j1*j2 - g12*g2*j1*j2 - h12*h2*j1*j2 - i12*i2*j1*j2 - b1*b2*j12*j2 - c1*c2*j12*j2 - d1*d2*j12*j2 - e1*e2*j12*j2 - f1*f2*j12*j2 - g1*g2*j12*j2 - h1*h2*j12*j2 - i1*i2*j12*j2 + b1*b12*j2^2 + c1*c12*j2^2 + d1*d12*j2^2 + e1*e12*j2^2 + f1*f12*j2^2 + g1*g12*j2^2 + h1*h12*j2^2 + i1*i12*j2^2 + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2 + i2^2 + j2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2 + j1*j2) + a1*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2 + g12*g2 + h12*h2 + i12*i2 + j12*j2)))/(a1^2*b12*b2 + a1^2*b2^2 + b12*b2*c1^2 + b2^2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 - 2*b1*b2*c1*c2 + a1^2*c12*c2 + b1^2*c12*c2 + a1^2*c2^2 + b1^2*c2^2 + b12*b2*d1^2 + b2^2*d1^2 + c12*c2*d1^2 + c2^2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - 2*b1*b2*d1*d2 - c1*c12*d1*d2 - 2*c1*c2*d1*d2 + a1^2*d12*d2 + b1^2*d12*d2 + c1^2*d12*d2 + a1^2*d2^2 + b1^2*d2^2 + c1^2*d2^2 + b12*b2*e1^2 + b2^2*e1^2 + c12*c2*e1^2 + c2^2*e1^2 + d12*d2*e1^2 + d2^2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - 2*b1*b2*e1*e2 - c1*c12*e1*e2 - 2*c1*c2*e1*e2 - d1*d12*e1*e2 - 2*d1*d2*e1*e2 + a1^2*e12*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + a1^2*e2^2 + b1^2*e2^2 + c1^2*e2^2 + d1^2*e2^2 + b12*b2*f1^2 + b2^2*f1^2 + c12*c2*f1^2 + c2^2*f1^2 + d12*d2*f1^2 + d2^2*f1^2 + e12*e2*f1^2 + e2^2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - 2*b1*b2*f1*f2 - c1*c12*f1*f2 - 2*c1*c2*f1*f2 - d1*d12*f1*f2 - 2*d1*d2*f1*f2 - e1*e12*f1*f2 - 2*e1*e2*f1*f2 + a1^2*f12*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + a1^2*f2^2 + b1^2*f2^2 + c1^2*f2^2 + d1^2*f2^2 + e1^2*f2^2 + b12*b2*g1^2 + b2^2*g1^2 + c12*c2*g1^2 + c2^2*g1^2 + d12*d2*g1^2 + d2^2*g1^2 + e12*e2*g1^2 + e2^2*g1^2 + f12*f2*g1^2 + f2^2*g1^2 - b1*b2*g1*g12 - c1*c2*g1*g12 - d1*d2*g1*g12 - e1*e2*g1*g12 - f1*f2*g1*g12 - b1*b12*g1*g2 - 2*b1*b2*g1*g2 - c1*c12*g1*g2 - 2*c1*c2*g1*g2 - d1*d12*g1*g2 - 2*d1*d2*g1*g2 - e1*e12*g1*g2 - 2*e1*e2*g1*g2 - f1*f12*g1*g2 - 2*f1*f2*g1*g2 + a1^2*g12*g2 + b1^2*g12*g2 + c1^2*g12*g2 + d1^2*g12*g2 + e1^2*g12*g2 + f1^2*g12*g2 + a1^2*g2^2 + b1^2*g2^2 + c1^2*g2^2 + d1^2*g2^2 + e1^2*g2^2 + f1^2*g2^2 + b12*b2*h1^2 + b2^2*h1^2 + c12*c2*h1^2 + c2^2*h1^2 + d12*d2*h1^2 + d2^2*h1^2 + e12*e2*h1^2 + e2^2*h1^2 + f12*f2*h1^2 + f2^2*h1^2 + g12*g2*h1^2 + g2^2*h1^2 - b1*b2*h1*h12 - c1*c2*h1*h12 - d1*d2*h1*h12 - e1*e2*h1*h12 - f1*f2*h1*h12 - g1*g2*h1*h12 - b1*b12*h1*h2 - 2*b1*b2*h1*h2 - c1*c12*h1*h2 - 2*c1*c2*h1*h2 - d1*d12*h1*h2 - 2*d1*d2*h1*h2 - e1*e12*h1*h2 - 2*e1*e2*h1*h2 - f1*f12*h1*h2 - 2*f1*f2*h1*h2 - g1*g12*h1*h2 - 2*g1*g2*h1*h2 + a1^2*h12*h2 + b1^2*h12*h2 + c1^2*h12*h2 + d1^2*h12*h2 + e1^2*h12*h2 + f1^2*h12*h2 + g1^2*h12*h2 + a1^2*h2^2 + b1^2*h2^2 + c1^2*h2^2 + d1^2*h2^2 + e1^2*h2^2 + f1^2*h2^2 + g1^2*h2^2 + b12*b2*i1^2 + b2^2*i1^2 + c12*c2*i1^2 + c2^2*i1^2 + d12*d2*i1^2 + d2^2*i1^2 + e12*e2*i1^2 + e2^2*i1^2 + f12*f2*i1^2 + f2^2*i1^2 + g12*g2*i1^2 + g2^2*i1^2 + h12*h2*i1^2 + h2^2*i1^2 - b1*b2*i1*i12 - c1*c2*i1*i12 - d1*d2*i1*i12 - e1*e2*i1*i12 - f1*f2*i1*i12 - g1*g2*i1*i12 - h1*h2*i1*i12 - b1*b12*i1*i2 - 2*b1*b2*i1*i2 - c1*c12*i1*i2 - 2*c1*c2*i1*i2 - d1*d12*i1*i2 - 2*d1*d2*i1*i2 - e1*e12*i1*i2 - 2*e1*e2*i1*i2 - f1*f12*i1*i2 - 2*f1*f2*i1*i2 - g1*g12*i1*i2 - 2*g1*g2*i1*i2 - h1*h12*i1*i2 - 2*h1*h2*i1*i2 + a1^2*i12*i2 + b1^2*i12*i2 + c1^2*i12*i2 + d1^2*i12*i2 + e1^2*i12*i2 + f1^2*i12*i2 + g1^2*i12*i2 + h1^2*i12*i2 + a1^2*i2^2 + b1^2*i2^2 + c1^2*i2^2 + d1^2*i2^2 + e1^2*i2^2 + f1^2*i2^2 + g1^2*i2^2 + h1^2*i2^2 + b12*b2*j1^2 + b2^2*j1^2 + c12*c2*j1^2 + c2^2*j1^2 + d12*d2*j1^2 + d2^2*j1^2 + e12*e2*j1^2 + e2^2*j1^2 + f12*f2*j1^2 + f2^2*j1^2 + g12*g2*j1^2 + g2^2*j1^2 + h12*h2*j1^2 + h2^2*j1^2 + i12*i2*j1^2 + i2^2*j1^2 + a2^2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2 + i1^2 + j1^2) - b1*b2*j1*j12 - c1*c2*j1*j12 - d1*d2*j1*j12 - e1*e2*j1*j12 - f1*f2*j1*j12 - g1*g2*j1*j12 - h1*h2*j1*j12 - i1*i2*j1*j12 - b1*b12*j1*j2 - 2*b1*b2*j1*j2 - c1*c12*j1*j2 - 2*c1*c2*j1*j2 - d1*d12*j1*j2 - 2*d1*d2*j1*j2 - e1*e12*j1*j2 - 2*e1*e2*j1*j2 - f1*f12*j1*j2 - 2*f1*f2*j1*j2 - g1*g12*j1*j2 - 2*g1*g2*j1*j2 - h1*h12*j1*j2 - 2*h1*h2*j1*j2 - i1*i12*j1*j2 - 2*i1*i2*j1*j2 + a1^2*j12*j2 + b1^2*j12*j2 + c1^2*j12*j2 + d1^2*j12*j2 + e1^2*j12*j2 + f1^2*j12*j2 + g1^2*j12*j2 + h1^2*j12*j2 + i1^2*j12*j2 + a1^2*j2^2 + b1^2*j2^2 + c1^2*j2^2 + d1^2*j2^2 + e1^2*j2^2 + f1^2*j2^2 + g1^2*j2^2 + h1^2*j2^2 + i1^2*j2^2 - a1*a2*(b1*b12 + 2*b1*b2 + c1*c12 + 2*c1*c2 + d1*d12 + 2*d1*d2 + e1*e12 + 2*e1*e2 + f1*f12 + 2*f1*f2 + g1*g12 + 2*g1*g2 + h1*h12 + 2*h1*h2 + i1*i12 + 2*i1*i2 + j1*j12 + 2*j1*j2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2 + i1^2 + j1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2 + j1*j2))))
			m12.errors <- propagate(expr = EXPR1, use.cov=beta.cov,data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
			#m21
			EXPR2 <- expression((b12*b2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 + b1^2*c12*c2 + b12*b2*d1^2 + c12*c2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - c1*c12*d1*d2 + b1^2*d12*d2 + c1^2*d12*d2 + b12*b2*e1^2 + c12*c2*e1^2 + d12*d2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - c1*c12*e1*e2 - d1*d12*e1*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + b12*b2*f1^2 + c12*c2*f1^2 + d12*d2*f1^2 + e12*e2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - c1*c12*f1*f2 - d1*d12*f1*f2 - e1*e12*f1*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + b12*b2*g1^2 + c12*c2*g1^2 + d12*d2*g1^2 + e12*e2*g1^2 + f12*f2*g1^2 - b1*b2*g1*g12 - c1*c2*g1*g12 - d1*d2*g1*g12 - e1*e2*g1*g12 - f1*f2*g1*g12 - b1*b12*g1*g2 - c1*c12*g1*g2 - d1*d12*g1*g2 - e1*e12*g1*g2 - f1*f12*g1*g2 + b1^2*g12*g2 + c1^2*g12*g2 + d1^2*g12*g2 + e1^2*g12*g2 + f1^2*g12*g2 + b12*b2*h1^2 + c12*c2*h1^2 + d12*d2*h1^2 + e12*e2*h1^2 + f12*f2*h1^2 + g12*g2*h1^2 - b1*b2*h1*h12 - c1*c2*h1*h12 - d1*d2*h1*h12 - e1*e2*h1*h12 - f1*f2*h1*h12 - g1*g2*h1*h12 - b1*b12*h1*h2 - c1*c12*h1*h2 - d1*d12*h1*h2 - e1*e12*h1*h2 - f1*f12*h1*h2 - g1*g12*h1*h2 + b1^2*h12*h2 + c1^2*h12*h2 + d1^2*h12*h2 + e1^2*h12*h2 + f1^2*h12*h2 + g1^2*h12*h2 + b12*b2*i1^2 + c12*c2*i1^2 + d12*d2*i1^2 + e12*e2*i1^2 + f12*f2*i1^2 + g12*g2*i1^2 + h12*h2*i1^2 - b1*b2*i1*i12 - c1*c2*i1*i12 - d1*d2*i1*i12 - e1*e2*i1*i12 - f1*f2*i1*i12 - g1*g2*i1*i12 - h1*h2*i1*i12 - b1*b12*i1*i2 - c1*c12*i1*i2 - d1*d12*i1*i2 - e1*e12*i1*i2 - f1*f12*i1*i2 - g1*g12*i1*i2 - h1*h12*i1*i2 + b1^2*i12*i2 + c1^2*i12*i2 + d1^2*i12*i2 + e1^2*i12*i2 + f1^2*i12*i2 + g1^2*i12*i2 + h1^2*i12*i2 + b12*b2*j1^2 + c12*c2*j1^2 + d12*d2*j1^2 + e12*e2*j1^2 + f12*f2*j1^2 + g12*g2*j1^2 + h12*h2*j1^2 + i12*i2*j1^2 - b1*b2*j1*j12 - c1*c2*j1*j12 - d1*d2*j1*j12 - e1*e2*j1*j12 - f1*f2*j1*j12 - g1*g2*j1*j12 - h1*h2*j1*j12 - i1*i2*j1*j12 - a1*a2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12 + g1*g12 + h1*h12 + i1*i12 + j1*j12) - b1*b12*j1*j2 - c1*c12*j1*j2 - d1*d12*j1*j2 - e1*e12*j1*j2 - f1*f12*j1*j2 - g1*g12*j1*j2 - h1*h12*j1*j2 - i1*i12*j1*j2 + b1^2*j12*j2 + c1^2*j12*j2 + d1^2*j12*j2 + e1^2*j12*j2 + f1^2*j12*j2 + g1^2*j12*j2 + h1^2*j12*j2 + i1^2*j12*j2 + a1^2*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2 + g12*g2 + h12*h2 + i12*i2 + j12*j2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2 + i1^2 + j1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2 + j1*j2)))/(b2^2*c1^2 + b2^2*c1*c12 - 2*b1*b2*c1*c2 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1^2*c2^2 + b1*b12*c2^2 + b2^2*d1^2 + c2^2*d1^2 + b2^2*d1*d12 + c2^2*d1*d12 - 2*b1*b2*d1*d2 - b12*b2*d1*d2 - 2*c1*c2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1^2*d2^2 + b1*b12*d2^2 + c1^2*d2^2 + c1*c12*d2^2 + b2^2*e1^2 + c2^2*e1^2 + d2^2*e1^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - 2*b1*b2*e1*e2 - b12*b2*e1*e2 - 2*c1*c2*e1*e2 - c12*c2*e1*e2 - 2*d1*d2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1^2*e2^2 + b1*b12*e2^2 + c1^2*e2^2 + c1*c12*e2^2 + d1^2*e2^2 + d1*d12*e2^2 + b2^2*f1^2 + c2^2*f1^2 + d2^2*f1^2 + e2^2*f1^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 - 2*b1*b2*f1*f2 - b12*b2*f1*f2 - 2*c1*c2*f1*f2 - c12*c2*f1*f2 - 2*d1*d2*f1*f2 - d12*d2*f1*f2 - 2*e1*e2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1^2*f2^2 + b1*b12*f2^2 + c1^2*f2^2 + c1*c12*f2^2 + d1^2*f2^2 + d1*d12*f2^2 + e1^2*f2^2 + e1*e12*f2^2 + b2^2*g1^2 + c2^2*g1^2 + d2^2*g1^2 + e2^2*g1^2 + f2^2*g1^2 + b2^2*g1*g12 + c2^2*g1*g12 + d2^2*g1*g12 + e2^2*g1*g12 + f2^2*g1*g12 - 2*b1*b2*g1*g2 - b12*b2*g1*g2 - 2*c1*c2*g1*g2 - c12*c2*g1*g2 - 2*d1*d2*g1*g2 - d12*d2*g1*g2 - 2*e1*e2*g1*g2 - e12*e2*g1*g2 - 2*f1*f2*g1*g2 - f12*f2*g1*g2 - b1*b2*g12*g2 - c1*c2*g12*g2 - d1*d2*g12*g2 - e1*e2*g12*g2 - f1*f2*g12*g2 + b1^2*g2^2 + b1*b12*g2^2 + c1^2*g2^2 + c1*c12*g2^2 + d1^2*g2^2 + d1*d12*g2^2 + e1^2*g2^2 + e1*e12*g2^2 + f1^2*g2^2 + f1*f12*g2^2 + b2^2*h1^2 + c2^2*h1^2 + d2^2*h1^2 + e2^2*h1^2 + f2^2*h1^2 + g2^2*h1^2 + b2^2*h1*h12 + c2^2*h1*h12 + d2^2*h1*h12 + e2^2*h1*h12 + f2^2*h1*h12 + g2^2*h1*h12 - 2*b1*b2*h1*h2 - b12*b2*h1*h2 - 2*c1*c2*h1*h2 - c12*c2*h1*h2 - 2*d1*d2*h1*h2 - d12*d2*h1*h2 - 2*e1*e2*h1*h2 - e12*e2*h1*h2 - 2*f1*f2*h1*h2 - f12*f2*h1*h2 - 2*g1*g2*h1*h2 - g12*g2*h1*h2 - b1*b2*h12*h2 - c1*c2*h12*h2 - d1*d2*h12*h2 - e1*e2*h12*h2 - f1*f2*h12*h2 - g1*g2*h12*h2 + b1^2*h2^2 + b1*b12*h2^2 + c1^2*h2^2 + c1*c12*h2^2 + d1^2*h2^2 + d1*d12*h2^2 + e1^2*h2^2 + e1*e12*h2^2 + f1^2*h2^2 + f1*f12*h2^2 + g1^2*h2^2 + g1*g12*h2^2 + b2^2*i1^2 + c2^2*i1^2 + d2^2*i1^2 + e2^2*i1^2 + f2^2*i1^2 + g2^2*i1^2 + h2^2*i1^2 + b2^2*i1*i12 + c2^2*i1*i12 + d2^2*i1*i12 + e2^2*i1*i12 + f2^2*i1*i12 + g2^2*i1*i12 + h2^2*i1*i12 - 2*b1*b2*i1*i2 - b12*b2*i1*i2 - 2*c1*c2*i1*i2 - c12*c2*i1*i2 - 2*d1*d2*i1*i2 - d12*d2*i1*i2 - 2*e1*e2*i1*i2 - e12*e2*i1*i2 - 2*f1*f2*i1*i2 - f12*f2*i1*i2 - 2*g1*g2*i1*i2 - g12*g2*i1*i2 - 2*h1*h2*i1*i2 - h12*h2*i1*i2 - b1*b2*i12*i2 - c1*c2*i12*i2 - d1*d2*i12*i2 - e1*e2*i12*i2 - f1*f2*i12*i2 - g1*g2*i12*i2 - h1*h2*i12*i2 + b1^2*i2^2 + b1*b12*i2^2 + c1^2*i2^2 + c1*c12*i2^2 + d1^2*i2^2 + d1*d12*i2^2 + e1^2*i2^2 + e1*e12*i2^2 + f1^2*i2^2 + f1*f12*i2^2 + g1^2*i2^2 + g1*g12*i2^2 + h1^2*i2^2 + h1*h12*i2^2 + b2^2*j1^2 + c2^2*j1^2 + d2^2*j1^2 + e2^2*j1^2 + f2^2*j1^2 + g2^2*j1^2 + h2^2*j1^2 + i2^2*j1^2 + b2^2*j1*j12 + c2^2*j1*j12 + d2^2*j1*j12 + e2^2*j1*j12 + f2^2*j1*j12 + g2^2*j1*j12 + h2^2*j1*j12 + i2^2*j1*j12 + a2^2*(b1^2 + b1*b12 + c1^2 + c1*c12 + d1^2 + d1*d12 + e1^2 + e1*e12 + f1^2 + f1*f12 + g1^2 + g1*g12 + h1^2 + h1*h12 + i1^2 + i1*i12 + j1^2 + j1*j12) - 2*b1*b2*j1*j2 - b12*b2*j1*j2 - 2*c1*c2*j1*j2 - c12*c2*j1*j2 - 2*d1*d2*j1*j2 - d12*d2*j1*j2 - 2*e1*e2*j1*j2 - e12*e2*j1*j2 - 2*f1*f2*j1*j2 - f12*f2*j1*j2 - 2*g1*g2*j1*j2 - g12*g2*j1*j2 - 2*h1*h2*j1*j2 - h12*h2*j1*j2 - 2*i1*i2*j1*j2 - i12*i2*j1*j2 - b1*b2*j12*j2 - c1*c2*j12*j2 - d1*d2*j12*j2 - e1*e2*j12*j2 - f1*f2*j12*j2 - g1*g2*j12*j2 - h1*h2*j12*j2 - i1*i2*j12*j2 + b1^2*j2^2 + b1*b12*j2^2 + c1^2*j2^2 + c1*c12*j2^2 + d1^2*j2^2 + d1*d12*j2^2 + e1^2*j2^2 + e1*e12*j2^2 + f1^2*j2^2 + f1*f12*j2^2 + g1^2*j2^2 + g1*g12*j2^2 + h1^2*j2^2 + h1*h12*j2^2 + i1^2*j2^2 + i1*i12*j2^2 + a1^2*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2 + i2^2 + j2^2) + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2 + i2^2 + j2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2 + j1*j2) + a1*(2*b1*b2 + b12*b2 + 2*c1*c2 + c12*c2 + 2*d1*d2 + d12*d2 + 2*e1*e2 + e12*e2 + 2*f1*f2 + f12*f2 + 2*g1*g2 + g12*g2 + 2*h1*h2 + h12*h2 + 2*i1*i2 + i12*i2 + 2*j1*j2 + j12*j2))))
			m21.errors <- propagate(expr = EXPR2, use.cov=beta.cov, data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
        }
 
	if (n.rows == 11) {
			#m12
			EXPR1 <- expression((b2^2*c1*c12 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1*b12*c2^2 + b2^2*d1*d12 + c2^2*d1*d12 - b12*b2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1*b12*d2^2 + c1*c12*d2^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - b12*b2*e1*e2 - c12*c2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1*b12*e2^2 + c1*c12*e2^2 + d1*d12*e2^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 - b12*b2*f1*f2 - c12*c2*f1*f2 - d12*d2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1*b12*f2^2 + c1*c12*f2^2 + d1*d12*f2^2 + e1*e12*f2^2 + b2^2*g1*g12 + c2^2*g1*g12 + d2^2*g1*g12 + e2^2*g1*g12 + f2^2*g1*g12 - b12*b2*g1*g2 - c12*c2*g1*g2 - d12*d2*g1*g2 - e12*e2*g1*g2 - f12*f2*g1*g2 - b1*b2*g12*g2 - c1*c2*g12*g2 - d1*d2*g12*g2 - e1*e2*g12*g2 - f1*f2*g12*g2 + b1*b12*g2^2 + c1*c12*g2^2 + d1*d12*g2^2 + e1*e12*g2^2 + f1*f12*g2^2 + b2^2*h1*h12 + c2^2*h1*h12 + d2^2*h1*h12 + e2^2*h1*h12 + f2^2*h1*h12 + g2^2*h1*h12 - b12*b2*h1*h2 - c12*c2*h1*h2 - d12*d2*h1*h2 - e12*e2*h1*h2 - f12*f2*h1*h2 - g12*g2*h1*h2 - b1*b2*h12*h2 - c1*c2*h12*h2 - d1*d2*h12*h2 - e1*e2*h12*h2 - f1*f2*h12*h2 - g1*g2*h12*h2 + b1*b12*h2^2 + c1*c12*h2^2 + d1*d12*h2^2 + e1*e12*h2^2 + f1*f12*h2^2 + g1*g12*h2^2 + b2^2*i1*i12 + c2^2*i1*i12 + d2^2*i1*i12 + e2^2*i1*i12 + f2^2*i1*i12 + g2^2*i1*i12 + h2^2*i1*i12 - b12*b2*i1*i2 - c12*c2*i1*i2 - d12*d2*i1*i2 - e12*e2*i1*i2 - f12*f2*i1*i2 - g12*g2*i1*i2 - h12*h2*i1*i2 - b1*b2*i12*i2 - c1*c2*i12*i2 - d1*d2*i12*i2 - e1*e2*i12*i2 - f1*f2*i12*i2 - g1*g2*i12*i2 - h1*h2*i12*i2 + b1*b12*i2^2 + c1*c12*i2^2 + d1*d12*i2^2 + e1*e12*i2^2 + f1*f12*i2^2 + g1*g12*i2^2 + h1*h12*i2^2 + b2^2*j1*j12 + c2^2*j1*j12 + d2^2*j1*j12 + e2^2*j1*j12 + f2^2*j1*j12 + g2^2*j1*j12 + h2^2*j1*j12 + i2^2*j1*j12 - b12*b2*j1*j2 - c12*c2*j1*j2 - d12*d2*j1*j2 - e12*e2*j1*j2 - f12*f2*j1*j2 - g12*g2*j1*j2 - h12*h2*j1*j2 - i12*i2*j1*j2 - b1*b2*j12*j2 - c1*c2*j12*j2 - d1*d2*j12*j2 - e1*e2*j12*j2 - f1*f2*j12*j2 - g1*g2*j12*j2 - h1*h2*j12*j2 - i1*i2*j12*j2 + b1*b12*j2^2 + c1*c12*j2^2 + d1*d12*j2^2 + e1*e12*j2^2 + f1*f12*j2^2 + g1*g12*j2^2 + h1*h12*j2^2 + i1*i12*j2^2 + b2^2*k1*k12 + c2^2*k1*k12 + d2^2*k1*k12 + e2^2*k1*k12 + f2^2*k1*k12 + g2^2*k1*k12 + h2^2*k1*k12 + i2^2*k1*k12 + j2^2*k1*k12 + a2^2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12 + g1*g12 + h1*h12 + i1*i12 + j1*j12 + k1*k12) - b12*b2*k1*k2 - c12*c2*k1*k2 - d12*d2*k1*k2 - e12*e2*k1*k2 - f12*f2*k1*k2 - g12*g2*k1*k2 - h12*h2*k1*k2 - i12*i2*k1*k2 - j12*j2*k1*k2 - b1*b2*k12*k2 - c1*c2*k12*k2 - d1*d2*k12*k2 - e1*e2*k12*k2 - f1*f2*k12*k2 - g1*g2*k12*k2 - h1*h2*k12*k2 - i1*i2*k12*k2 - j1*j2*k12*k2 + b1*b12*k2^2 + c1*c12*k2^2 + d1*d12*k2^2 + e1*e12*k2^2 + f1*f12*k2^2 + g1*g12*k2^2 + h1*h12*k2^2 + i1*i12*k2^2 + j1*j12*k2^2 + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2 + i2^2 + j2^2 + k2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2 + j1*j2 + k1*k2) + a1*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2 + g12*g2 + h12*h2 + i12*i2 + j12*j2 + k12*k2)))/(a1^2*b12*b2 + a1^2*b2^2 + b12*b2*c1^2 + b2^2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 - 2*b1*b2*c1*c2 + a1^2*c12*c2 + b1^2*c12*c2 + a1^2*c2^2 + b1^2*c2^2 + b12*b2*d1^2 + b2^2*d1^2 + c12*c2*d1^2 + c2^2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - 2*b1*b2*d1*d2 - c1*c12*d1*d2 - 2*c1*c2*d1*d2 + a1^2*d12*d2 + b1^2*d12*d2 + c1^2*d12*d2 + a1^2*d2^2 + b1^2*d2^2 + c1^2*d2^2 + b12*b2*e1^2 + b2^2*e1^2 + c12*c2*e1^2 + c2^2*e1^2 + d12*d2*e1^2 + d2^2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - 2*b1*b2*e1*e2 - c1*c12*e1*e2 - 2*c1*c2*e1*e2 - d1*d12*e1*e2 - 2*d1*d2*e1*e2 + a1^2*e12*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + a1^2*e2^2 + b1^2*e2^2 + c1^2*e2^2 + d1^2*e2^2 + b12*b2*f1^2 + b2^2*f1^2 + c12*c2*f1^2 + c2^2*f1^2 + d12*d2*f1^2 + d2^2*f1^2 + e12*e2*f1^2 + e2^2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - 2*b1*b2*f1*f2 - c1*c12*f1*f2 - 2*c1*c2*f1*f2 - d1*d12*f1*f2 - 2*d1*d2*f1*f2 - e1*e12*f1*f2 - 2*e1*e2*f1*f2 + a1^2*f12*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + a1^2*f2^2 + b1^2*f2^2 + c1^2*f2^2 + d1^2*f2^2 + e1^2*f2^2 + b12*b2*g1^2 + b2^2*g1^2 + c12*c2*g1^2 + c2^2*g1^2 + d12*d2*g1^2 + d2^2*g1^2 + e12*e2*g1^2 + e2^2*g1^2 + f12*f2*g1^2 + f2^2*g1^2 - b1*b2*g1*g12 - c1*c2*g1*g12 - d1*d2*g1*g12 - e1*e2*g1*g12 - f1*f2*g1*g12 - b1*b12*g1*g2 - 2*b1*b2*g1*g2 - c1*c12*g1*g2 - 2*c1*c2*g1*g2 - d1*d12*g1*g2 - 2*d1*d2*g1*g2 - e1*e12*g1*g2 - 2*e1*e2*g1*g2 - f1*f12*g1*g2 - 2*f1*f2*g1*g2 + a1^2*g12*g2 + b1^2*g12*g2 + c1^2*g12*g2 + d1^2*g12*g2 + e1^2*g12*g2 + f1^2*g12*g2 + a1^2*g2^2 + b1^2*g2^2 + c1^2*g2^2 + d1^2*g2^2 + e1^2*g2^2 + f1^2*g2^2 + b12*b2*h1^2 + b2^2*h1^2 + c12*c2*h1^2 + c2^2*h1^2 + d12*d2*h1^2 + d2^2*h1^2 + e12*e2*h1^2 + e2^2*h1^2 + f12*f2*h1^2 + f2^2*h1^2 + g12*g2*h1^2 + g2^2*h1^2 - b1*b2*h1*h12 - c1*c2*h1*h12 - d1*d2*h1*h12 - e1*e2*h1*h12 - f1*f2*h1*h12 - g1*g2*h1*h12 - b1*b12*h1*h2 - 2*b1*b2*h1*h2 - c1*c12*h1*h2 - 2*c1*c2*h1*h2 - d1*d12*h1*h2 - 2*d1*d2*h1*h2 - e1*e12*h1*h2 - 2*e1*e2*h1*h2 - f1*f12*h1*h2 - 2*f1*f2*h1*h2 - g1*g12*h1*h2 - 2*g1*g2*h1*h2 + a1^2*h12*h2 + b1^2*h12*h2 + c1^2*h12*h2 + d1^2*h12*h2 + e1^2*h12*h2 + f1^2*h12*h2 + g1^2*h12*h2 + a1^2*h2^2 + b1^2*h2^2 + c1^2*h2^2 + d1^2*h2^2 + e1^2*h2^2 + f1^2*h2^2 + g1^2*h2^2 + b12*b2*i1^2 + b2^2*i1^2 + c12*c2*i1^2 + c2^2*i1^2 + d12*d2*i1^2 + d2^2*i1^2 + e12*e2*i1^2 + e2^2*i1^2 + f12*f2*i1^2 + f2^2*i1^2 + g12*g2*i1^2 + g2^2*i1^2 + h12*h2*i1^2 + h2^2*i1^2 - b1*b2*i1*i12 - c1*c2*i1*i12 - d1*d2*i1*i12 - e1*e2*i1*i12 - f1*f2*i1*i12 - g1*g2*i1*i12 - h1*h2*i1*i12 - b1*b12*i1*i2 - 2*b1*b2*i1*i2 - c1*c12*i1*i2 - 2*c1*c2*i1*i2 - d1*d12*i1*i2 - 2*d1*d2*i1*i2 - e1*e12*i1*i2 - 2*e1*e2*i1*i2 - f1*f12*i1*i2 - 2*f1*f2*i1*i2 - g1*g12*i1*i2 - 2*g1*g2*i1*i2 - h1*h12*i1*i2 - 2*h1*h2*i1*i2 + a1^2*i12*i2 + b1^2*i12*i2 + c1^2*i12*i2 + d1^2*i12*i2 + e1^2*i12*i2 + f1^2*i12*i2 + g1^2*i12*i2 + h1^2*i12*i2 + a1^2*i2^2 + b1^2*i2^2 + c1^2*i2^2 + d1^2*i2^2 + e1^2*i2^2 + f1^2*i2^2 + g1^2*i2^2 + h1^2*i2^2 + b12*b2*j1^2 + b2^2*j1^2 + c12*c2*j1^2 + c2^2*j1^2 + d12*d2*j1^2 + d2^2*j1^2 + e12*e2*j1^2 + e2^2*j1^2 + f12*f2*j1^2 + f2^2*j1^2 + g12*g2*j1^2 + g2^2*j1^2 + h12*h2*j1^2 + h2^2*j1^2 + i12*i2*j1^2 + i2^2*j1^2 - b1*b2*j1*j12 - c1*c2*j1*j12 - d1*d2*j1*j12 - e1*e2*j1*j12 - f1*f2*j1*j12 - g1*g2*j1*j12 - h1*h2*j1*j12 - i1*i2*j1*j12 - b1*b12*j1*j2 - 2*b1*b2*j1*j2 - c1*c12*j1*j2 - 2*c1*c2*j1*j2 - d1*d12*j1*j2 - 2*d1*d2*j1*j2 - e1*e12*j1*j2 - 2*e1*e2*j1*j2 - f1*f12*j1*j2 - 2*f1*f2*j1*j2 - g1*g12*j1*j2 - 2*g1*g2*j1*j2 - h1*h12*j1*j2 - 2*h1*h2*j1*j2 - i1*i12*j1*j2 - 2*i1*i2*j1*j2 + a1^2*j12*j2 + b1^2*j12*j2 + c1^2*j12*j2 + d1^2*j12*j2 + e1^2*j12*j2 + f1^2*j12*j2 + g1^2*j12*j2 + h1^2*j12*j2 + i1^2*j12*j2 + a1^2*j2^2 + b1^2*j2^2 + c1^2*j2^2 + d1^2*j2^2 + e1^2*j2^2 + f1^2*j2^2 + g1^2*j2^2 + h1^2*j2^2 + i1^2*j2^2 + b12*b2*k1^2 + b2^2*k1^2 + c12*c2*k1^2 + c2^2*k1^2 + d12*d2*k1^2 + d2^2*k1^2 + e12*e2*k1^2 + e2^2*k1^2 + f12*f2*k1^2 + f2^2*k1^2 + g12*g2*k1^2 + g2^2*k1^2 + h12*h2*k1^2 + h2^2*k1^2 + i12*i2*k1^2 + i2^2*k1^2 + j12*j2*k1^2 + j2^2*k1^2 + a2^2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2 + i1^2 + j1^2 + k1^2) - b1*b2*k1*k12 - c1*c2*k1*k12 - d1*d2*k1*k12 - e1*e2*k1*k12 - f1*f2*k1*k12 - g1*g2*k1*k12 - h1*h2*k1*k12 - i1*i2*k1*k12 - j1*j2*k1*k12 - b1*b12*k1*k2 - 2*b1*b2*k1*k2 - c1*c12*k1*k2 - 2*c1*c2*k1*k2 - d1*d12*k1*k2 - 2*d1*d2*k1*k2 - e1*e12*k1*k2 - 2*e1*e2*k1*k2 - f1*f12*k1*k2 - 2*f1*f2*k1*k2 - g1*g12*k1*k2 - 2*g1*g2*k1*k2 - h1*h12*k1*k2 - 2*h1*h2*k1*k2 - i1*i12*k1*k2 - 2*i1*i2*k1*k2 - j1*j12*k1*k2 - 2*j1*j2*k1*k2 + a1^2*k12*k2 + b1^2*k12*k2 + c1^2*k12*k2 + d1^2*k12*k2 + e1^2*k12*k2 + f1^2*k12*k2 + g1^2*k12*k2 + h1^2*k12*k2 + i1^2*k12*k2 + j1^2*k12*k2 + a1^2*k2^2 + b1^2*k2^2 + c1^2*k2^2 + d1^2*k2^2 + e1^2*k2^2 + f1^2*k2^2 + g1^2*k2^2 + h1^2*k2^2 + i1^2*k2^2 + j1^2*k2^2 - a1*a2*(b1*b12 + 2*b1*b2 + c1*c12 + 2*c1*c2 + d1*d12 + 2*d1*d2 + e1*e12 + 2*e1*e2 + f1*f12 + 2*f1*f2 + g1*g12 + 2*g1*g2 + h1*h12 + 2*h1*h2 + i1*i12 + 2*i1*i2 + j1*j12 + 2*j1*j2 + k1*k12 + 2*k1*k2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2 + i1^2 + j1^2 + k1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2 + j1*j2 + k1*k2))))
			m12.errors <- propagate(expr = EXPR1, use.cov=beta.cov,data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
			#m21
			EXPR2 <- expression((b12*b2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 + b1^2*c12*c2 + b12*b2*d1^2 + c12*c2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - c1*c12*d1*d2 + b1^2*d12*d2 + c1^2*d12*d2 + b12*b2*e1^2 + c12*c2*e1^2 + d12*d2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - c1*c12*e1*e2 - d1*d12*e1*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + b12*b2*f1^2 + c12*c2*f1^2 + d12*d2*f1^2 + e12*e2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - c1*c12*f1*f2 - d1*d12*f1*f2 - e1*e12*f1*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + b12*b2*g1^2 + c12*c2*g1^2 + d12*d2*g1^2 + e12*e2*g1^2 + f12*f2*g1^2 - b1*b2*g1*g12 - c1*c2*g1*g12 - d1*d2*g1*g12 - e1*e2*g1*g12 - f1*f2*g1*g12 - b1*b12*g1*g2 - c1*c12*g1*g2 - d1*d12*g1*g2 - e1*e12*g1*g2 - f1*f12*g1*g2 + b1^2*g12*g2 + c1^2*g12*g2 + d1^2*g12*g2 + e1^2*g12*g2 + f1^2*g12*g2 + b12*b2*h1^2 + c12*c2*h1^2 + d12*d2*h1^2 + e12*e2*h1^2 + f12*f2*h1^2 + g12*g2*h1^2 - b1*b2*h1*h12 - c1*c2*h1*h12 - d1*d2*h1*h12 - e1*e2*h1*h12 - f1*f2*h1*h12 - g1*g2*h1*h12 - b1*b12*h1*h2 - c1*c12*h1*h2 - d1*d12*h1*h2 - e1*e12*h1*h2 - f1*f12*h1*h2 - g1*g12*h1*h2 + b1^2*h12*h2 + c1^2*h12*h2 + d1^2*h12*h2 + e1^2*h12*h2 + f1^2*h12*h2 + g1^2*h12*h2 + b12*b2*i1^2 + c12*c2*i1^2 + d12*d2*i1^2 + e12*e2*i1^2 + f12*f2*i1^2 + g12*g2*i1^2 + h12*h2*i1^2 - b1*b2*i1*i12 - c1*c2*i1*i12 - d1*d2*i1*i12 - e1*e2*i1*i12 - f1*f2*i1*i12 - g1*g2*i1*i12 - h1*h2*i1*i12 - b1*b12*i1*i2 - c1*c12*i1*i2 - d1*d12*i1*i2 - e1*e12*i1*i2 - f1*f12*i1*i2 - g1*g12*i1*i2 - h1*h12*i1*i2 + b1^2*i12*i2 + c1^2*i12*i2 + d1^2*i12*i2 + e1^2*i12*i2 + f1^2*i12*i2 + g1^2*i12*i2 + h1^2*i12*i2 + b12*b2*j1^2 + c12*c2*j1^2 + d12*d2*j1^2 + e12*e2*j1^2 + f12*f2*j1^2 + g12*g2*j1^2 + h12*h2*j1^2 + i12*i2*j1^2 - b1*b2*j1*j12 - c1*c2*j1*j12 - d1*d2*j1*j12 - e1*e2*j1*j12 - f1*f2*j1*j12 - g1*g2*j1*j12 - h1*h2*j1*j12 - i1*i2*j1*j12 - b1*b12*j1*j2 - c1*c12*j1*j2 - d1*d12*j1*j2 - e1*e12*j1*j2 - f1*f12*j1*j2 - g1*g12*j1*j2 - h1*h12*j1*j2 - i1*i12*j1*j2 + b1^2*j12*j2 + c1^2*j12*j2 + d1^2*j12*j2 + e1^2*j12*j2 + f1^2*j12*j2 + g1^2*j12*j2 + h1^2*j12*j2 + i1^2*j12*j2 + b12*b2*k1^2 + c12*c2*k1^2 + d12*d2*k1^2 + e12*e2*k1^2 + f12*f2*k1^2 + g12*g2*k1^2 + h12*h2*k1^2 + i12*i2*k1^2 + j12*j2*k1^2 - b1*b2*k1*k12 - c1*c2*k1*k12 - d1*d2*k1*k12 - e1*e2*k1*k12 - f1*f2*k1*k12 - g1*g2*k1*k12 - h1*h2*k1*k12 - i1*i2*k1*k12 - j1*j2*k1*k12 - a1*a2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12 + g1*g12 + h1*h12 + i1*i12 + j1*j12 + k1*k12) - b1*b12*k1*k2 - c1*c12*k1*k2 - d1*d12*k1*k2 - e1*e12*k1*k2 - f1*f12*k1*k2 - g1*g12*k1*k2 - h1*h12*k1*k2 - i1*i12*k1*k2 - j1*j12*k1*k2 + b1^2*k12*k2 + c1^2*k12*k2 + d1^2*k12*k2 + e1^2*k12*k2 + f1^2*k12*k2 + g1^2*k12*k2 + h1^2*k12*k2 + i1^2*k12*k2 + j1^2*k12*k2 + a1^2*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2 + g12*g2 + h12*h2 + i12*i2 + j12*j2 + k12*k2) + a12*(a2*(b1^2 + c1^2 + d1^2 + e1^2 + f1^2 + g1^2 + h1^2 + i1^2 + j1^2 + k1^2) - a1*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2 + j1*j2 + k1*k2)))/(b2^2*c1^2 + b2^2*c1*c12 - 2*b1*b2*c1*c2 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1^2*c2^2 + b1*b12*c2^2 + b2^2*d1^2 + c2^2*d1^2 + b2^2*d1*d12 + c2^2*d1*d12 - 2*b1*b2*d1*d2 - b12*b2*d1*d2 - 2*c1*c2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1^2*d2^2 + b1*b12*d2^2 + c1^2*d2^2 + c1*c12*d2^2 + b2^2*e1^2 + c2^2*e1^2 + d2^2*e1^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - 2*b1*b2*e1*e2 - b12*b2*e1*e2 - 2*c1*c2*e1*e2 - c12*c2*e1*e2 - 2*d1*d2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1^2*e2^2 + b1*b12*e2^2 + c1^2*e2^2 + c1*c12*e2^2 + d1^2*e2^2 + d1*d12*e2^2 + b2^2*f1^2 + c2^2*f1^2 + d2^2*f1^2 + e2^2*f1^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 - 2*b1*b2*f1*f2 - b12*b2*f1*f2 - 2*c1*c2*f1*f2 - c12*c2*f1*f2 - 2*d1*d2*f1*f2 - d12*d2*f1*f2 - 2*e1*e2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1^2*f2^2 + b1*b12*f2^2 + c1^2*f2^2 + c1*c12*f2^2 + d1^2*f2^2 + d1*d12*f2^2 + e1^2*f2^2 + e1*e12*f2^2 + b2^2*g1^2 + c2^2*g1^2 + d2^2*g1^2 + e2^2*g1^2 + f2^2*g1^2 + b2^2*g1*g12 + c2^2*g1*g12 + d2^2*g1*g12 + e2^2*g1*g12 + f2^2*g1*g12 - 2*b1*b2*g1*g2 - b12*b2*g1*g2 - 2*c1*c2*g1*g2 - c12*c2*g1*g2 - 2*d1*d2*g1*g2 - d12*d2*g1*g2 - 2*e1*e2*g1*g2 - e12*e2*g1*g2 - 2*f1*f2*g1*g2 - f12*f2*g1*g2 - b1*b2*g12*g2 - c1*c2*g12*g2 - d1*d2*g12*g2 - e1*e2*g12*g2 - f1*f2*g12*g2 + b1^2*g2^2 + b1*b12*g2^2 + c1^2*g2^2 + c1*c12*g2^2 + d1^2*g2^2 + d1*d12*g2^2 + e1^2*g2^2 + e1*e12*g2^2 + f1^2*g2^2 + f1*f12*g2^2 + b2^2*h1^2 + c2^2*h1^2 + d2^2*h1^2 + e2^2*h1^2 + f2^2*h1^2 + g2^2*h1^2 + b2^2*h1*h12 + c2^2*h1*h12 + d2^2*h1*h12 + e2^2*h1*h12 + f2^2*h1*h12 + g2^2*h1*h12 - 2*b1*b2*h1*h2 - b12*b2*h1*h2 - 2*c1*c2*h1*h2 - c12*c2*h1*h2 - 2*d1*d2*h1*h2 - d12*d2*h1*h2 - 2*e1*e2*h1*h2 - e12*e2*h1*h2 - 2*f1*f2*h1*h2 - f12*f2*h1*h2 - 2*g1*g2*h1*h2 - g12*g2*h1*h2 - b1*b2*h12*h2 - c1*c2*h12*h2 - d1*d2*h12*h2 - e1*e2*h12*h2 - f1*f2*h12*h2 - g1*g2*h12*h2 + b1^2*h2^2 + b1*b12*h2^2 + c1^2*h2^2 + c1*c12*h2^2 + d1^2*h2^2 + d1*d12*h2^2 + e1^2*h2^2 + e1*e12*h2^2 + f1^2*h2^2 + f1*f12*h2^2 + g1^2*h2^2 + g1*g12*h2^2 + b2^2*i1^2 + c2^2*i1^2 + d2^2*i1^2 + e2^2*i1^2 + f2^2*i1^2 + g2^2*i1^2 + h2^2*i1^2 + b2^2*i1*i12 + c2^2*i1*i12 + d2^2*i1*i12 + e2^2*i1*i12 + f2^2*i1*i12 + g2^2*i1*i12 + h2^2*i1*i12 - 2*b1*b2*i1*i2 - b12*b2*i1*i2 - 2*c1*c2*i1*i2 - c12*c2*i1*i2 - 2*d1*d2*i1*i2 - d12*d2*i1*i2 - 2*e1*e2*i1*i2 - e12*e2*i1*i2 - 2*f1*f2*i1*i2 - f12*f2*i1*i2 - 2*g1*g2*i1*i2 - g12*g2*i1*i2 - 2*h1*h2*i1*i2 - h12*h2*i1*i2 - b1*b2*i12*i2 - c1*c2*i12*i2 - d1*d2*i12*i2 - e1*e2*i12*i2 - f1*f2*i12*i2 - g1*g2*i12*i2 - h1*h2*i12*i2 + b1^2*i2^2 + b1*b12*i2^2 + c1^2*i2^2 + c1*c12*i2^2 + d1^2*i2^2 + d1*d12*i2^2 + e1^2*i2^2 + e1*e12*i2^2 + f1^2*i2^2 + f1*f12*i2^2 + g1^2*i2^2 + g1*g12*i2^2 + h1^2*i2^2 + h1*h12*i2^2 + b2^2*j1^2 + c2^2*j1^2 + d2^2*j1^2 + e2^2*j1^2 + f2^2*j1^2 + g2^2*j1^2 + h2^2*j1^2 + i2^2*j1^2 + b2^2*j1*j12 + c2^2*j1*j12 + d2^2*j1*j12 + e2^2*j1*j12 + f2^2*j1*j12 + g2^2*j1*j12 + h2^2*j1*j12 + i2^2*j1*j12 - 2*b1*b2*j1*j2 - b12*b2*j1*j2 - 2*c1*c2*j1*j2 - c12*c2*j1*j2 - 2*d1*d2*j1*j2 - d12*d2*j1*j2 - 2*e1*e2*j1*j2 - e12*e2*j1*j2 - 2*f1*f2*j1*j2 - f12*f2*j1*j2 - 2*g1*g2*j1*j2 - g12*g2*j1*j2 - 2*h1*h2*j1*j2 - h12*h2*j1*j2 - 2*i1*i2*j1*j2 - i12*i2*j1*j2 - b1*b2*j12*j2 - c1*c2*j12*j2 - d1*d2*j12*j2 - e1*e2*j12*j2 - f1*f2*j12*j2 - g1*g2*j12*j2 - h1*h2*j12*j2 - i1*i2*j12*j2 + b1^2*j2^2 + b1*b12*j2^2 + c1^2*j2^2 + c1*c12*j2^2 + d1^2*j2^2 + d1*d12*j2^2 + e1^2*j2^2 + e1*e12*j2^2 + f1^2*j2^2 + f1*f12*j2^2 + g1^2*j2^2 + g1*g12*j2^2 + h1^2*j2^2 + h1*h12*j2^2 + i1^2*j2^2 + i1*i12*j2^2 + b2^2*k1^2 + c2^2*k1^2 + d2^2*k1^2 + e2^2*k1^2 + f2^2*k1^2 + g2^2*k1^2 + h2^2*k1^2 + i2^2*k1^2 + j2^2*k1^2 + b2^2*k1*k12 + c2^2*k1*k12 + d2^2*k1*k12 + e2^2*k1*k12 + f2^2*k1*k12 + g2^2*k1*k12 + h2^2*k1*k12 + i2^2*k1*k12 + j2^2*k1*k12 + a2^2*(b1^2 + b1*b12 + c1^2 + c1*c12 + d1^2 + d1*d12 + e1^2 + e1*e12 + f1^2 + f1*f12 + g1^2 + g1*g12 + h1^2 + h1*h12 + i1^2 + i1*i12 + j1^2 + j1*j12 + k1^2 + k1*k12) - 2*b1*b2*k1*k2 - b12*b2*k1*k2 - 2*c1*c2*k1*k2 - c12*c2*k1*k2 - 2*d1*d2*k1*k2 - d12*d2*k1*k2 - 2*e1*e2*k1*k2 - e12*e2*k1*k2 - 2*f1*f2*k1*k2 - f12*f2*k1*k2 - 2*g1*g2*k1*k2 - g12*g2*k1*k2 - 2*h1*h2*k1*k2 - h12*h2*k1*k2 - 2*i1*i2*k1*k2 - i12*i2*k1*k2 - 2*j1*j2*k1*k2 - j12*j2*k1*k2 - b1*b2*k12*k2 - c1*c2*k12*k2 - d1*d2*k12*k2 - e1*e2*k12*k2 - f1*f2*k12*k2 - g1*g2*k12*k2 - h1*h2*k12*k2 - i1*i2*k12*k2 - j1*j2*k12*k2 + b1^2*k2^2 + b1*b12*k2^2 + c1^2*k2^2 + c1*c12*k2^2 + d1^2*k2^2 + d1*d12*k2^2 + e1^2*k2^2 + e1*e12*k2^2 + f1^2*k2^2 + f1*f12*k2^2 + g1^2*k2^2 + g1*g12*k2^2 + h1^2*k2^2 + h1*h12*k2^2 + i1^2*k2^2 + i1*i12*k2^2 + j1^2*k2^2 + j1*j12*k2^2 + a1^2*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2 + i2^2 + j2^2 + k2^2) + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2 + i2^2 + j2^2 + k2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2 + j1*j2 + k1*k2) + a1*(2*b1*b2 + b12*b2 + 2*c1*c2 + c12*c2 + 2*d1*d2 + d12*d2 + 2*e1*e2 + e12*e2 + 2*f1*f2 + f12*f2 + 2*g1*g2 + g12*g2 + 2*h1*h2 + h12*h2 + 2*i1*i2 + i12*i2 + 2*j1*j2 + j12*j2 + 2*k1*k2 + k12*k2))))
			m21.errors <- propagate(expr = EXPR2, use.cov=beta.cov, data = full.matrix, type = "stat", do.sim=FALSE,do.perm = FALSE,verbose = FALSE,plot = FALSE)
        }

 		if (n.rows == 12) {
			#m12
			EXPR1 <- expression((b2^2*c1*c12 - b12*b2*c1*c2 - b1*b2*c12*c2 + b1*b12*c2^2 + b2^2*d1*d12 + c2^2*d1*d12 - b12*b2*d1*d2 - c12*c2*d1*d2 - b1*b2*d12*d2 - c1*c2*d12*d2 + b1*b12*d2^2 + c1*c12*d2^2 + b2^2*e1*e12 + c2^2*e1*e12 + d2^2*e1*e12 - b12*b2*e1*e2 - c12*c2*e1*e2 - d12*d2*e1*e2 - b1*b2*e12*e2 - c1*c2*e12*e2 - d1*d2*e12*e2 + b1*b12*e2^2 + c1*c12*e2^2 + d1*d12*e2^2 + b2^2*f1*f12 + c2^2*f1*f12 + d2^2*f1*f12 + e2^2*f1*f12 - b12*b2*f1*f2 - c12*c2*f1*f2 - d12*d2*f1*f2 - e12*e2*f1*f2 - b1*b2*f12*f2 - c1*c2*f12*f2 - d1*d2*f12*f2 - e1*e2*f12*f2 + b1*b12*f2^2 + c1*c12*f2^2 + d1*d12*f2^2 + e1*e12*f2^2 + b2^2*g1*g12 + c2^2*g1*g12 + d2^2*g1*g12 + e2^2*g1*g12 + f2^2*g1*g12 - b12*b2*g1*g2 - c12*c2*g1*g2 - d12*d2*g1*g2 - e12*e2*g1*g2 - f12*f2*g1*g2 - b1*b2*g12*g2 - c1*c2*g12*g2 - d1*d2*g12*g2 - e1*e2*g12*g2 - f1*f2*g12*g2 + b1*b12*g2^2 + c1*c12*g2^2 + d1*d12*g2^2 + e1*e12*g2^2 + f1*f12*g2^2 + b2^2*h1*h12 + c2^2*h1*h12 + d2^2*h1*h12 + e2^2*h1*h12 + f2^2*h1*h12 + g2^2*h1*h12 - b12*b2*h1*h2 - c12*c2*h1*h2 - d12*d2*h1*h2 - e12*e2*h1*h2 - f12*f2*h1*h2 - g12*g2*h1*h2 - b1*b2*h12*h2 - c1*c2*h12*h2 - d1*d2*h12*h2 - e1*e2*h12*h2 - f1*f2*h12*h2 - g1*g2*h12*h2 + b1*b12*h2^2 + c1*c12*h2^2 + d1*d12*h2^2 + e1*e12*h2^2 + f1*f12*h2^2 + g1*g12*h2^2 + b2^2*i1*i12 + c2^2*i1*i12 + d2^2*i1*i12 + e2^2*i1*i12 + f2^2*i1*i12 + g2^2*i1*i12 + h2^2*i1*i12 - b12*b2*i1*i2 - c12*c2*i1*i2 - d12*d2*i1*i2 - e12*e2*i1*i2 - f12*f2*i1*i2 - g12*g2*i1*i2 - h12*h2*i1*i2 - b1*b2*i12*i2 - c1*c2*i12*i2 - d1*d2*i12*i2 - e1*e2*i12*i2 - f1*f2*i12*i2 - g1*g2*i12*i2 - h1*h2*i12*i2 + b1*b12*i2^2 + c1*c12*i2^2 + d1*d12*i2^2 + e1*e12*i2^2 + f1*f12*i2^2 + g1*g12*i2^2 + h1*h12*i2^2 + b2^2*j1*j12 + c2^2*j1*j12 + d2^2*j1*j12 + e2^2*j1*j12 + f2^2*j1*j12 + g2^2*j1*j12 + h2^2*j1*j12 + i2^2*j1*j12 - b12*b2*j1*j2 - c12*c2*j1*j2 - d12*d2*j1*j2 - e12*e2*j1*j2 - f12*f2*j1*j2 - g12*g2*j1*j2 - h12*h2*j1*j2 - i12*i2*j1*j2 - b1*b2*j12*j2 - c1*c2*j12*j2 - d1*d2*j12*j2 - e1*e2*j12*j2 - f1*f2*j12*j2 - g1*g2*j12*j2 - h1*h2*j12*j2 - i1*i2*j12*j2 + b1*b12*j2^2 + c1*c12*j2^2 + d1*d12*j2^2 + e1*e12*j2^2 + f1*f12*j2^2 + g1*g12*j2^2 + h1*h12*j2^2 + i1*i12*j2^2 + b2^2*k1*k12 + c2^2*k1*k12 + d2^2*k1*k12 + e2^2*k1*k12 + f2^2*k1*k12 + g2^2*k1*k12 + h2^2*k1*k12 + i2^2*k1*k12 + j2^2*k1*k12 - b12*b2*k1*k2 - c12*c2*k1*k2 - d12*d2*k1*k2 - e12*e2*k1*k2 - f12*f2*k1*k2 - g12*g2*k1*k2 - h12*h2*k1*k2 - i12*i2*k1*k2 - j12*j2*k1*k2 - b1*b2*k12*k2 - c1*c2*k12*k2 - d1*d2*k12*k2 - e1*e2*k12*k2 - f1*f2*k12*k2 - g1*g2*k12*k2 - h1*h2*k12*k2 - i1*i2*k12*k2 - j1*j2*k12*k2 + b1*b12*k2^2 + c1*c12*k2^2 + d1*d12*k2^2 + e1*e12*k2^2 + f1*f12*k2^2 + g1*g12*k2^2 + h1*h12*k2^2 + i1*i12*k2^2 + j1*j12*k2^2 + b2^2*l1*l12 + c2^2*l1*l12 + d2^2*l1*l12 + e2^2*l1*l12 + f2^2*l1*l12 + g2^2*l1*l12 + h2^2*l1*l12 + i2^2*l1*l12 + j2^2*l1*l12 + k2^2*l1*l12 + a2^2*(b1*b12 + c1*c12 + d1*d12 + e1*e12 + f1*f12 + g1*g12 + h1*h12 + i1*i12 + j1*j12 + k1*k12 + l1*l12) - b12*b2*l1*l2 - c12*c2*l1*l2 - d12*d2*l1*l2 - e12*e2*l1*l2 - f12*f2*l1*l2 - g12*g2*l1*l2 - h12*h2*l1*l2 - i12*i2*l1*l2 - j12*j2*l1*l2 - k12*k2*l1*l2 - b1*b2*l12*l2 - c1*c2*l12*l2 - d1*d2*l12*l2 - e1*e2*l12*l2 - f1*f2*l12*l2 - g1*g2*l12*l2 - h1*h2*l12*l2 - i1*i2*l12*l2 - j1*j2*l12*l2 - k1*k2*l12*l2 + b1*b12*l2^2 + c1*c12*l2^2 + d1*d12*l2^2 + e1*e12*l2^2 + f1*f12*l2^2 + g1*g12*l2^2 + h1*h12*l2^2 + i1*i12*l2^2 + j1*j12*l2^2 + k1*k12*l2^2 + a1*a12*(b2^2 + c2^2 + d2^2 + e2^2 + f2^2 + g2^2 + h2^2 + i2^2 + j2^2 + k2^2 + l2^2) - a2*(a12*(b1*b2 + c1*c2 + d1*d2 + e1*e2 + f1*f2 + g1*g2 + h1*h2 + i1*i2 + j1*j2 + k1*k2 + l1*l2) + a1*(b12*b2 + c12*c2 + d12*d2 + e12*e2 + f12*f2 + g12*g2 + h12*h2 + i12*i2 + j12*j2 + k12*k2 + l12*l2)))/(a1^2*b12*b2 + a1^2*b2^2 + b12*b2*c1^2 + b2^2*c1^2 - b1*b2*c1*c12 - b1*b12*c1*c2 - 2*b1*b2*c1*c2 + a1^2*c12*c2 + b1^2*c12*c2 + a1^2*c2^2 + b1^2*c2^2 + b12*b2*d1^2 + b2^2*d1^2 + c12*c2*d1^2 + c2^2*d1^2 - b1*b2*d1*d12 - c1*c2*d1*d12 - b1*b12*d1*d2 - 2*b1*b2*d1*d2 - c1*c12*d1*d2 - 2*c1*c2*d1*d2 + a1^2*d12*d2 + b1^2*d12*d2 + c1^2*d12*d2 + a1^2*d2^2 + b1^2*d2^2 + c1^2*d2^2 + b12*b2*e1^2 + b2^2*e1^2 + c12*c2*e1^2 + c2^2*e1^2 + d12*d2*e1^2 + d2^2*e1^2 - b1*b2*e1*e12 - c1*c2*e1*e12 - d1*d2*e1*e12 - b1*b12*e1*e2 - 2*b1*b2*e1*e2 - c1*c12*e1*e2 - 2*c1*c2*e1*e2 - d1*d12*e1*e2 - 2*d1*d2*e1*e2 + a1^2*e12*e2 + b1^2*e12*e2 + c1^2*e12*e2 + d1^2*e12*e2 + a1^2*e2^2 + b1^2*e2^2 + c1^2*e2^2 + d1^2*e2^2 + b12*b2*f1^2 + b2^2*f1^2 + c12*c2*f1^2 + c2^2*f1^2 + d12*d2*f1^2 + d2^2*f1^2 + e12*e2*f1^2 + e2^2*f1^2 - b1*b2*f1*f12 - c1*c2*f1*f12 - d1*d2*f1*f12 - e1*e2*f1*f12 - b1*b12*f1*f2 - 2*b1*b2*f1*f2 - c1*c12*f1*f2 - 2*c1*c2*f1*f2 - d1*d12*f1*f2 - 2*d1*d2*f1*f2 - e1*e12*f1*f2 - 2*e1*e2*f1*f2 + a1^2*f12*f2 + b1^2*f12*f2 + c1^2*f12*f2 + d1^2*f12*f2 + e1^2*f12*f2 + a1^2*f2^2 + b1^2*f2^2 + c1^2*f2^2 + d1^2*f2^2 + e1^2*f2^2 + b12*b2*g1^2 + b2^2*g1^2 + c12*c2*g1^2 + c2^2*g1^2 + d12*d2*g1^2 + d2^2*g1^2 + e12*e2*g1^2 + e2^2*g1^2 + f12*f2*g1^2 + f2^2*g1^2 - b1*b2*g1*g12 - c1*c2*g1*g12 - d1*d2*g1*g12 - e1*e2*g1*g12 - f1*f2*g1*g12 - b1*b12*g1*g2 - 2*b1*b2*g1*g2 - c1*c12*g1*g2 - 2*c1*c2*g1*g2 - d1*d12*g1*g2 - 2*d1*d2*g1*g2 - e1*e12*g1*g2 - 2*e1*e2*g1*g2 - f1*f12*g1*g2 - 2*f1*f2*g1*g2 + a1^2*g12*g2 + b1^2*g12*g2 + c1^2*g12*g2 + d1^2*g12*g2 + e1^2*g12*g2 + f1^2*g12*g2 + a1^2*g2^2 + b1^2*g2^2 + c1^2*g2^2 + d1^2*g2^2 + e1^2*g2^2 + f1^2*g2^2 + b12*b2*h1^2 + b2^2*h1^2 + c12*c2*h1^2 + c2^2*h1^2 + d12*d2*h1^2 + d2^2*h1^2 + e12*e2*h1^2 + e2^2*h1^2 + f12*f2*h1^2 + f2^2*h1^2 + g12*g2*h1^2 + g2^2*h1^2 - b1*b2*h1*h12 - c1*c2*h1*h12 - d1*d2*h1*h12 - e1*e2*h1*h12 - f1*f2*h1*h12 - g1*g2*h1*h12 - b1*b12*h1*h2 - 2*b1*b2*h1*h2 - c1*c12*h1*h2 - 2*c1*c2*h1*h2 - d1*d12*h1*h2 - 2*d1*d2*h1*h2 - e1*e12*h1*h2 - 2*e1*e2*h1*h2 - f1*f12*h1*h2 - 2*f1*f2*h1*h2 - g1*g12*h1*h2 - 2*g1*g2*h1*h2 + a1^2*h12*h2 + b1^2*h12*h2 + c1^2*h12*h2 + d1^2*h12*h2 + e1^2*h12*h2 + f1^2*h12*h2 + g1^2*h12*h2 + a1^2*h2^2 + b1^2*h2^2 + c1^2*h2^2 + d1^2*h2^2 + e1^2*h2^2 + f1^2*h2^2 + g1^2*h2^2 + b12*b2*i1^2 + b2^2*i1^2 + c12*c2*i1^2 + c2^2*i1^2 + d12*d2*i1^2 + d2^2*i1^2 + e12*e2*i1^2 + e2^2*i1^2 + f12*f2*i1^2 + f2^2*i1^2 + g12*g2*i1^2 + g2^2*i1^2 + h12*h2*i1^2 + h2^2*i1^2 - b1*b2*i1*i12 - c1*c2*i1*i12 - d1*d2*i1*i12 - e1*e2*i1*i12 - f1*f2*i1*i12 - g1*g2*i1*i12 - h1*h2*i1*i12 - b1*b12*i1*i2 - 2*b1*b2*i1*i2 - c1*c12*i1*i2 - 2*c1*c2*i1*i2 - d1*d12*i1*i2 - 2*d1*d2*i1*i2 - e1*e12*i1*i2 - 2*e1*e2*i1*i2 - f1*f12*i1*i2 - 2*f1*f2*i1*i2 - g1*g12*i1*i2 - 2*g1*g2*i1*i2 - h1*h12*i1*i2 - 2*h1*h2*i1*i2 + a1^2*i12*i2 + b1^2*i12*i2 + c1^2*i12*i2 + d1^2*i12*i2 + e1^2*i12*i2 + f1^2*i12*i2 + g1^2*i12*i2 + h1^2*i12*i2 + a1^2*i2^2 + b1^2*i2^2 + c1^2*i2^2 + d1^2*i2^2 + e1^2*i2^2 + f1^2*i2^2 + g1^2