[R] glm beta hypothesis testing

From: Davis, Jacob B. <JBDavis_at_txfb-ins.com>
Date: Wed 21 Jun 2006 - 01:18:36 EST

In summary.glm I'm trying to get a better feel for the z output. The following lines can be found in the function  

1 if (p > 0) {

2 p1 <- 1:p

3 Qr <- object$qr

4 coef.p <- object$coefficients[Qr$pivot[p1]]

5 covmat.unscaled <- chol2inv(Qr$qr[p1, p1, drop = FALSE])

6 dimnames(covmat.unscaled) <- list(names(coef.p), names(coef.p))

7 covmat <- dispersion * covmat.unscaled

8 var.cf <- diag(covmat)

9 s.err <- sqrt(var.cf)

10 tvalue <- coef.p/s.err

11 dn <- c("Estimate", "Std. Error")         

In line 10 where the tvalue is calculated I understand where s.err is coming from and why it is used, but coef.p is throwing me for a loop. First off what is:  

coef.p <- object$coefficients[Qr$pivot[p1]]  

giving us? This should be the distance the sample is from the null hypothesis so that when we divide by the standard error we get the t value. Then we would check distance to decide to reject or not.


Jacob Davis

Actuarial Analyst

        [[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jun 21 01:50:18 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 21 Jun 2006 - 06:11:51 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.