Trev.Parker@csiro.au wrote:
Hello S-plus Fans,
I am trying to extract the test of significants i.e probability of t, from
a GLM. When I use the summary function eg summary(glm(formula = y ~ b3,
family = quasi(link = identity, variance = constant), data =
resample.dist)), I only get a t value for the intercept and b3, see below:
Coefficients:
Value Std. Error t value
(Intercept) 0.01296489 0.0007813802 16.59229
b3 0.46420517 0.0104191808 44.55294
How can I:
1. get the Pr(t) for the intercept and b3
2. Extract the probability as a single number into a data frame
Your help is appreciated. Thanks
Try this:
> fit <- glm(ozone^(1/3) ~ bs(radiation, 5) +
+ poly(wind, temperature, degree = 2), data = air)
> t.table <- summary(fit)$coef
> pr.t <- 2*pt(-abs(t.table[,3]),fit$df)
> t.table <- cbind(t.table, "Pr(>|t|)" = pr.t)
> data.class(t.table)
[1] "matrix"
Regards,
Sundar
|