Re: [R] Compare lm() to glm(family=poisson)

2009-08-02 Thread Ronggui Huang
In practices, it is not easy to make such decision. One example is
size of social ties in social network study. It is very common to use
OLS thought it is count variable rather than normal. I think AIC is
suggestive as well.

Ronggui

2009/8/2 Alain Zuur highs...@highstat.com:



 Mark Na wrote:

 Dear R-helpers,
 I would like to compare the fit of two models, one of which I fit using
 lm()
 and the other using glm(family=poisson). The latter doesn't provide
 r-squared, so I wonder how to go about comparing these
 models (they have the same formula).

 Thanks very much,

 Mark Na

       [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




 The decision which distribution to use (Normal versus Poisson) should be an
 a priori choice. If you really want to compare them, then inspect the
 residuals of both models and see which model doesn't have any residual
 patterns.

 Alain

 -
 
 Dr. Alain F. Zuur
 First author of:

 1. Analysing Ecological Data (2007).
 Zuur, AF, Ieno, EN and Smith, GM. Springer. 680 p.

 2. Mixed effects models and extensions in ecology with R. (2009).
 Zuur, AF, Ieno, EN, Walker, N, Saveliev, AA, and Smith, GM. Springer.

 3. A Beginner's Guide to R (2009).
 Zuur, AF, Ieno, EN, Meesters, EHWG. Springer


 Statistical consultancy, courses, data analysis and software
 Highland Statistics Ltd.
 6 Laverock road
 UK - AB41 6FN Newburgh
 Email: highs...@highstat.com
 URL: www.highstat.com



 --
 View this message in context: 
 http://www.nabble.com/Compare-lm%28%29-to-glm%28family%3Dpoisson%29-tp24764558p24772802.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




-- 
HUANG Ronggui, Wincent
PhD Candidate
Dept of Public and Social Administration
City University of Hong Kong
Home page: http://asrr.r-forge.r-project.org/rghuang.html

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Compare lm() to glm(family=poisson)

2009-08-01 Thread Ken Knoblauch
Mark Na mtb954 at gmail.com writes:
 
 Dear R-helpers,
 I would like to compare the fit of two models, one of which I fit using lm()
 and the other using glm(family=poisson). The latter doesn't provide
 r-squared, so I wonder how to go about comparing these
 models (they have the same formula).
 
 Thanks very much,
 
 Mark Na
 
I'm not sure what you are trying to do but it might be
informative to compare the diagnostic plots from the
fits.  Remember that Poisson distributed data is
heteroscedastic, mean = variance, which isn't the
default hypothesis when fitting with lm.  Also, the
default link function with the poisson family is log.
So, these are things to take into account in any potential 
comparison.  

Ken

-- 
Ken Knoblauch
Inserm U846
Stem-cell and Brain Research Institute
Department of Integrative Neurosciences
18 avenue du Doyen Lépine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.sbri.fr/members/kenneth-knoblauch.html

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Compare lm() to glm(family=poisson)

2009-08-01 Thread Alain Zuur



Mark Na wrote:
 
 Dear R-helpers,
 I would like to compare the fit of two models, one of which I fit using
 lm()
 and the other using glm(family=poisson). The latter doesn't provide
 r-squared, so I wonder how to go about comparing these
 models (they have the same formula).
 
 Thanks very much,
 
 Mark Na
 
   [[alternative HTML version deleted]]
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 


The decision which distribution to use (Normal versus Poisson) should be an
a priori choice. If you really want to compare them, then inspect the
residuals of both models and see which model doesn't have any residual
patterns.

Alain

-

Dr. Alain F. Zuur
First author of:

1. Analysing Ecological Data (2007).
Zuur, AF, Ieno, EN and Smith, GM. Springer. 680 p.

2. Mixed effects models and extensions in ecology with R. (2009).
Zuur, AF, Ieno, EN, Walker, N, Saveliev, AA, and Smith, GM. Springer.

3. A Beginner's Guide to R (2009).
Zuur, AF, Ieno, EN, Meesters, EHWG. Springer


Statistical consultancy, courses, data analysis and software
Highland Statistics Ltd.
6 Laverock road
UK - AB41 6FN Newburgh
Email: highs...@highstat.com
URL: www.highstat.com



-- 
View this message in context: 
http://www.nabble.com/Compare-lm%28%29-to-glm%28family%3Dpoisson%29-tp24764558p24772802.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Compare lm() to glm(family=poisson)

2009-07-31 Thread Mark Na
Dear R-helpers,
I would like to compare the fit of two models, one of which I fit using lm()
and the other using glm(family=poisson). The latter doesn't provide
r-squared, so I wonder how to go about comparing these
models (they have the same formula).

Thanks very much,

Mark Na

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Compare lm() to glm(family=poisson)

2009-07-31 Thread Wensui Liu
i don't understand how you can fit a poisson model with lm() function.
otherwise, how could you compare lm() with glm(...family=poisson)?

On Fri, Jul 31, 2009 at 7:41 PM, Mark Namtb...@gmail.com wrote:
 Dear R-helpers,
 I would like to compare the fit of two models, one of which I fit using lm()
 and the other using glm(family=poisson). The latter doesn't provide
 r-squared, so I wonder how to go about comparing these
 models (they have the same formula).

 Thanks very much,

 Mark Na

        [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




-- 
==
WenSui Liu
Blog   : statcompute.spaces.live.com
Tough Times Never Last. But Tough People Do.  - Robert Schuller
==

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.