Generalized linear models in R

Elle

New Member
Hi,

I've run a generalized linear model in R and reduced it to the minimum adequate model using the dropterm function... but now I want to present my results. Following my course notes, I've used anova('MAM', test="Chisq") and sure enough it gives me a set of p values. What I don't seem to have anywhere are the corresponding chi-square values (which I believe I should present in my results). So... does anyone know how I obtain these? Or am I missing something really obvious?!

I'm hoping someone on here might be able to help me - I had a look at the R forum but frankly they all seem a bit scary over there!

mp83

TS Contributor
This is an ANOVA table generated by

anova(budworm.lg0,budworm.lgA,test="Chisq")

Analysis of Deviance Table

Model 1: SF ~ sex + ldose - 1
Model 2: SF ~ sex + sex:I(ldose - 3)
Resid. Df Resid. Dev Df Deviance P(>|Chi|)
1 9 6.7571
2 8 4.9937 1 1.7633 0.1842

You can check that

0.1842=1-pchisq(1.7633,1)

BioStatMatt

TS Contributor
If you know the number of degrees of freedom that are associated with each test, say r1, r1, ... ,rk, and the p-value, p1, p2, ... ,pk, then you can recover the chi-square statistics m1,m2, ... ,mk .

The p-value is calculated by:

P(m1 > Chi^2(r1)) = p1

so we want to find m1 given r1 and p1, In R this can be done by:

qchisq(p1, d1, lower.tail=F)

~Matt