R/f.post.chisq.R

Defines functions f.post.chisq

f.post.chisq <- function(coeff, covar, contrast.mat){



.y <- contrast.mat %*% coeff
.cov.y <- contrast.mat %*% covar %*% t(contrast.mat)
.chisq <- t(.y) %*% solve(.cov.y) %*% .y
.df <- length(.y)
.pval <- pchisq(.chisq, df = .df, lower.tail = F)

.ut <- list(chisq = .chisq, df = .df, pval = .pval, y = .y) # probably no need for y anymore


return(.ut)

}

Try the Haplin package in your browser

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

Haplin documentation built on May 20, 2022, 5:07 p.m.