Re: [R] glm beta hypothesis testing

From: Ben Bolker <bolker_at_ufl.edu>
Date: Wed 21 Jun 2006 - 03:56:10 EST

Davis, Jacob B. <JBDavis <at> txfb-ins.com> writes:

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

  digging through the function is good: debugging your way through the function is sometimes even better.

examples(glm,local=TRUE) ## run glm examples and get

   ## results left in local workspace)

ls()
debug(summary.glm)
summary(glm.D93)

  shows ...
  p is object rank (~ number of parameters)   Qr$pivot gives the order in which the parameters have been rearranged to solve the model, so Qr$pivot[p1] gives the rearranged order of the coefficients. We need this rearranged order because we're going to extract the unscaled covariance matrix by solving the inverse QR matrix, which is in the pivoted (rearranged) order.

The null hypothesis for any particular contrast in glm is that the parameter is 0, so the estimates of the coefficients (object$coefficients) *are* the distance from the null hypothesis.

   Ben Bolker



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 04:17:08 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.