Andrew Rominger | 3 Jun 06:38
Picon
Favicon

[R-sig-eco] Inference, logistic regression

Dear list,

Please pardon this beginner's-level question, I feel it's not quite up  
to the same caliber as recent discussions.

I'm working with a simple logistic regression model comparing the  
presence/absence of an insect species against an index of plant  
species turnover:

> foo<-glm(bout.psol$pres.de~bout.psol$index,family=binomial)

The term bout.psol$pres.de is binary 0,1; and bout.psol$index is continuous.

I'd like to use a likelihood ratio statistic to test the significance  
of this regression, but I'm a little uncertain as how to proceed.   
When I call summary(foo), I get...

Call:
glm(formula = bout.psol$pres.de ~ bout.psol$index,
     family = binomial)

Deviance Residuals:
     Min       1Q   Median       3Q      Max
-1.7180  -1.1289   0.6314   1.0323   1.7499

Coefficients:
                      Estimate Std. Error z value Pr(>|z|)
(Intercept)           0.30584    0.23095   1.324  0.18542
bout.psol.edit$index  0.04552    0.01439   3.163  0.00156 **
---
(Continue reading)

David Hewitt | 10 Jun 06:58
Picon

Re: [R-sig-eco] Inference, logistic regression


Slightly OT... can you be sure that absences were true absences, or is it
possible they were there and you missed them?

> I'm working with a simple logistic regression model comparing the  
> presence/absence of an insect species against an index of plant  
> species turnover:
> 

-----
David Hewitt
Research Fishery Biologist
USGS Klamath Falls Field Station (USA)
--

-- 
View this message in context: http://www.nabble.com/Inference%2C-logistic-regression-tp17615961p17747806.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.
Manuel Spínola | 3 Jun 16:19
Picon
Favicon

Re: [R-sig-eco] Inference, logistic regression

Another twist will be to fit models with and without the covariate and 
use AICc values, delta AICc, and Akaike weights and interpret parameter 
estimates to assess the covariate merits and stay away from P values.
Best,

Manuel Spínola

Andrew Rominger escribió:
> Dear list,
>
> Please pardon this beginner's-level question, I feel it's not quite up 
> to the same caliber as recent discussions.
>
> I'm working with a simple logistic regression model comparing the 
> presence/absence of an insect species against an index of plant 
> species turnover:
>
>> foo<-glm(bout.psol$pres.de~bout.psol$index,family=binomial)
>
> The term bout.psol$pres.de is binary 0,1; and bout.psol$index is 
> continuous.
>
> I'd like to use a likelihood ratio statistic to test the significance 
> of this regression, but I'm a little uncertain as how to proceed.  
> When I call summary(foo), I get...
>
> Call:
> glm(formula = bout.psol$pres.de ~ bout.psol$index,
>     family = binomial)
>
(Continue reading)

Simon Blomberg | 3 Jun 08:06
Picon
Picon
Favicon

Re: [R-sig-eco] Inference, logistic regression

On Mon, 2008-06-02 at 21:38 -0700, Andrew Rominger wrote:
> Dear list,
> 
> Please pardon this beginner's-level question, I feel it's not quite up  
> to the same caliber as recent discussions.
> 
> I'm working with a simple logistic regression model comparing the  
> presence/absence of an insect species against an index of plant  
> species turnover:
> 
> > foo<-glm(bout.psol$pres.de~bout.psol$index,family=binomial)
> 
> The term bout.psol$pres.de is binary 0,1; and bout.psol$index is continuous.
> 
> I'd like to use a likelihood ratio statistic to test the significance  
> of this regression, but I'm a little uncertain as how to proceed.   
> When I call summary(foo), I get...
> 
> Call:
> glm(formula = bout.psol$pres.de ~ bout.psol$index,
>      family = binomial)
> 
> Deviance Residuals:
>      Min       1Q   Median       3Q      Max
> -1.7180  -1.1289   0.6314   1.0323   1.7499
> 
> Coefficients:
>                       Estimate Std. Error z value Pr(>|z|)
> (Intercept)           0.30584    0.23095   1.324  0.18542
> bout.psol.edit$index  0.04552    0.01439   3.163  0.00156 **
(Continue reading)

Simon Blomberg | 3 Jun 08:16
Picon
Picon
Favicon

Re: [R-sig-eco] Inference, logistic regression

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.

> 
(Continue reading)


Gmane