R/hypothmat.R

Defines functions hypothmat

Documented in hypothmat

hypothmat <-
function(sfit,mmat,n,p){

      q <- length(mmat[,1])
      bpart <- mmat%*%sfit$coefficients
      varpart <- mmat%*%sfit$betacov%*%t(mmat)
      tst <- t(bpart)%*%solve(varpart)%*%bpart
      # pv <- 1 - pchisq(tst,q)
      pvf <- 1 - pf(tst/q,q,n-p)
      hypothmat <- c(tst,pvf)
      return(hypothmat)
}

Try the DBfit package in your browser

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

DBfit documentation built on May 1, 2021, 1:09 a.m.