R/wald.test.overall.r

Defines functions wald.test.overall

Documented in wald.test.overall

wald.test.overall <- function(fit) {

  p <- length(coef(fit))
  betahat <- coef(fit)[-1]
  v <- vcov(fit)[2:p,2:p]

  df1 <- p - 1
  teststat <- t(betahat)%*%solve(v)%*%betahat/df1
  df2 <- length(fit$y) - fit$qrx1$rank

  pval <- pf(teststat,df1,df2,lower.tail=FALSE)

  ans <- list(F=teststat,p.value=pval,df1=df1,df2=df2)
  ans 

}

Try the Rfit package in your browser

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

Rfit documentation built on Sept. 8, 2023, 5:59 p.m.