[R-sig-eco] Inference, logistic regression

Simon Blomberg s.blomberg1 at uq.edu.au
Tue Jun 3 08:16:24 CEST 2008


On Tue, 2008-06-03 at 16:06 +1000, Simon Blomberg wrote:

> The degrees of freedom for the chisq test is 93 - 92 = 1.
>  pchisq(11.97, 1, lower.tail=FALSE)
> [1] 0.0005406394
> 
> Which is pretty close to the Wald test. Wald tests can sometimes be
> misleading, since the estimate of the standard error in the denominator
> can blow out and cause the test to be not significant even when there is
> a big effect size, which is one reason to prefer the LR test. If you
> want to get R to do the LR test, fit one model with and without the
> covariate, and use anova.
> 
> fit.with <- glm(bout.psol$pres.de~bout.psol$index,family=binomial)
> 
> fit.without <- glm(bout.psol$pres.de~ 1 ,family=binomial)
> 
> anova(fit.without, fit.with)

Oops. Should have been:

anova(fit.without, fit.with, test="Chisq")

I always forget that!

Cheers,

Simon.

> 
> Cheers,
> 
> Simon.
> 
> > That's an awfully small p-value, I think I'm interpreting something  
> > wrong.  Any advice would be very welcomed.
> > 
> > Thanks very much in advance
> > Andy Rominger
> > 
> > _______________________________________________
> > R-sig-ecology mailing list
> > R-sig-ecology at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
-- 
Simon Blomberg, BSc (Hons), PhD, MAppStat. 
Lecturer and Consultant Statistician 
Faculty of Biological and Chemical Sciences 
The University of Queensland 
St. Lucia Queensland 4072 
Australia
Room 320 Goddard Building (8)
T: +61 7 3365 2506
http://www.uq.edu.au/~uqsblomb
email: S.Blomberg1_at_uq.edu.au

Policies:
1.  I will NOT analyse your data for you.
2.  Your deadline is your problem.

The combination of some data and an aching desire for 
an answer does not ensure that a reasonable answer can 
be extracted from a given body of data. - John Tukey.



More information about the R-sig-ecology mailing list