Picon
Picon
Favicon

Low counts

Dear members;

1) I have fitted a glm to count data (using quasipoisson to correct for
disp.). In the final model, the relationship between Res and Fitted (i.e.
the line going through the plot) and QQ looks fine, but I am worried that
low count (one to five) could violate some assumption of the glm/poisson:
Although the line in the Res vs Fitted plot looks nice, the values show a
clear pattern (five diagonal lines = the counts). Crawley/R book says it
should look like the sky at night with no patterns. I assume patterns are
not visible with large counts (e.g. 0-100), but highly visible with low
counts as in this case. I still assume this is reason for some concern about
the model, or is the concern not justified?

2) Any recommendations on literature regarding model inspection in R.

Thank you for reading this mail!

Best wishes;
Tore
Picon

Re: Low counts

Hi Tore,

I put my 2cents on Zuur et al 2009's book - Mixed effect models...
See Zero-Inflated examples in there.

cheers

milton

2010/2/1 Tore Chr Michaelsen <tore.michaelsen@...>

> Dear members;
>
> 1) I have fitted a glm to count data (using quasipoisson to correct for
> disp.). In the final model, the relationship between Res and Fitted (i.e.
> the line going through the plot) and QQ looks fine, but I am worried that
> low count (one to five) could violate some assumption of the glm/poisson:
> Although the line in the Res vs Fitted plot looks nice, the values show a
> clear pattern (five diagonal lines = the counts). Crawley/R book says it
> should look like the sky at night with no patterns. I assume patterns are
> not visible with large counts (e.g. 0-100), but highly visible with low
> counts as in this case. I still assume this is reason for some concern
> about
> the model, or is the concern not justified?
>
> 2) Any recommendations on literature regarding model inspection in R.
>
> Thank you for reading this mail!
>
> Best wishes;
(Continue reading)

Maarten de Groot | 2 Feb 08:06
Picon

Re: Low counts

Hi Tore,

How does your count distribution look like? Doe you have more zero's 
than expected (use zero inflated models), no zero's (use zero truncated 
models) or is there no problem with zero's? If it is the latter, it 
might be useful to try the negative binomial models (glm.nb()). Zuur et 
al (2009) gives a nice example that they still find a pattern in the 
residuals with a quasi poison model but no pattern with a negative 
binomial model.

Kind regards,

Maarten

Miltinho Astronauta wrote:
> Hi Tore,
>
> I put my 2cents on Zuur et al 2009's book - Mixed effect models...
> See Zero-Inflated examples in there.
>
> cheers
>
> milton
>
> 2010/2/1 Tore Chr Michaelsen <tore.michaelsen@...>
>
>   
>> Dear members;
>>
>> 1) I have fitted a glm to count data (using quasipoisson to correct for
(Continue reading)

Re: R-sig-ecology Digest, Vol 23, Issue 2

1. Low counts (Tore Chr Michaelsen)
>     2. Re: Low counts (Miltinho Astronauta)
>     3. Re: Low counts (Maarten de Groot)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 1 Feb 2010 15:04:22 +0100
> From: "Tore Chr Michaelsen"<tore.michaelsen@...>
> To:<r-sig-ecology@...>
> Subject: [R-sig-eco] Low counts
> Message-ID:<000801caa347$74c62a70$5e527f50$@michaelsen@...>
> Content-Type: text/plain;	charset="us-ascii"
>
> Dear members;
>
> 1) I have fitted a glm to count data (using quasipoisson to correct for
> disp.). In the final model, the relationship between Res and Fitted (i.e.
> the line going through the plot) and QQ looks fine, but I am worried that
> low count (one to five) could violate some assumption of the glm/poisson:
> Although the line in the Res vs Fitted plot looks nice, the values show a
> clear pattern (five diagonal lines = the counts). Crawley/R book says it
> should look like the sky at night with no patterns. I assume patterns are
> not visible with large counts (e.g. 0-100), but highly visible with low
> counts as in this case. I still assume this is reason for some concern about
> the model, or is the concern not justified?
>
>    

(Continue reading)

Picon
Picon
Favicon

Re: Low counts

Thank you for your advice!!! 

Zuur et al (2009) is now on its way to my mail box. 

Best wishes;
Tore

-----Opprinnelig melding-----
Fra: Maarten de Groot [mailto:Maarten.deGroot@...] 
Sendt: 2. februar 2010 08:07
Til: Miltinho Astronauta
Kopi: Tore Chr Michaelsen; r-sig-ecology@...
Emne: Re: [R-sig-eco] Low counts

Hi Tore,

How does your count distribution look like? Doe you have more zero's 
than expected (use zero inflated models), no zero's (use zero truncated 
models) or is there no problem with zero's? If it is the latter, it 
might be useful to try the negative binomial models (glm.nb()). Zuur et 
al (2009) gives a nice example that they still find a pattern in the 
residuals with a quasi poison model but no pattern with a negative 
binomial model.

Kind regards,

Maarten

Miltinho Astronauta wrote:
> Hi Tore,
(Continue reading)

Aisyah | 2 Feb 14:25
Picon

using metaMDS and getting error messages


Hi

Im currently trying to use the metaMDS function on MASS and keep getting
this message. Im new at this and need some help. 

>stream.mds<-metaMDS(stream)
Using step-across dissimilarities:
Too long or NA distances: 65 out of 105 (61.9%)
Stepping across 105 dissimilarities...
Error in isoMDS(dist, k = k, trace = isotrace) : 
  an initial configuration must be supplied with NA/Infs in 'd'
In addition: Warning messages:
1: In stepacross(dis, trace = trace, ...) :
  Disconnected data: Result will contain NAs
2: In metaMDSdist(comm, distance = distance, autotransform = autotransform, 
:
  Data are disconnected, results may be meaningless

The data is abundance of different species in certain plots. I've
standardized the data using the wisconsin function.

Thanks

--

-- 
View this message in context: http://n2.nabble.com/using-metaMDS-and-getting-error-messages-tp4500796p4500796.html
Sent from the r-sig-ecology mailing list archive at Nabble.com.
Jari Oksanen | 2 Feb 15:35
Picon
Picon
Favicon

Re: using metaMDS and getting error messages

On 2/02/10 15:25 PM, "Aisyah" <aisyah.faruk@...> wrote:

> 
> Hi
> 
> Im currently trying to use the metaMDS function on MASS and keep getting
> this message. Im new at this and need some help.
> 
>> stream.mds<-metaMDS(stream)
> Using step-across dissimilarities:
> Too long or NA distances: 65 out of 105 (61.9%)
> Stepping across 105 dissimilarities...
> Error in isoMDS(dist, k = k, trace = isotrace) :
>   an initial configuration must be supplied with NA/Infs in 'd'
> In addition: Warning messages:
> 1: In stepacross(dis, trace = trace, ...) :
>   Disconnected data: Result will contain NAs
> 2: In metaMDSdist(comm, distance = distance, autotransform = autotransform,
> :
>   Data are disconnected, results may be meaningless
> 
> The data is abundance of different species in certain plots. I've
> standardized the data using the wisconsin function.
> 
Aisyah,

I think the diagnostic message more or less tells you what is the problem:
the data are disconnected. This means that there are some plots or groups of
plots that have nothing in common with some other plots. It is impossible to
define the relationship of these disconnected plots with other plots. You
(Continue reading)

Nicholas Lewin-Koh | 2 Feb 17:40
Favicon

Low counts

Hi Tore,
What your seeing in the residuals may just be due to the "discreetness"
of count data.
Gordon Smyth has a nice paper on this topic (and code in the statmod
package):
Dunn, P. K., and Smyth, G. K. (1996). Randomized quantile residuals.
Journal of Computational and Graphical Statistics 5, 236-244. 
In general the "stars at night" is what you want to see in residuals,
but often,
especially in the case of small counts the Poisson or binomial may be
just fine,
but the residuals will have that striping effect because you have a very
small mean
and hence not much variation to spread the data out. Before you go
running
to a zero inflated model, or a glmm, squint your eyes and look at the
results
you are getting from the simple glm. Is the model adequate? does it
describe the 
data sufficiently? Is the improvement in the likelihood huge between the
Poisson and
the quasipoisson? Especially if you don't have a lot of data, all these
fancy
models may not be worth the cost of estimating all the extra parameters.
But at
the end of the day, since we can't see the data, you need to make the
call.

Cheers
Nicholas
(Continue reading)

Aisyah | 2 Feb 19:40
Picon

Re: using metaMDS and getting error messages


Cheers!

Sya

-----Original Message-----
From: Jari Oksanen [via r-sig-ecology] [mailto:ml-node+4501124-1657352293@...]
Sent: Tue 2/2/2010 2:36 PM
To: Aisyah Faruk
Subject: Re: using metaMDS and getting error messages

On 2/02/10 15:25 PM, "Aisyah" <aisyah.faruk@...> wrote:

> 
> Hi
> 
> Im currently trying to use the metaMDS function on MASS and keep getting
> this message. Im new at this and need some help.
> 
>> stream.mds<-metaMDS(stream)
> Using step-across dissimilarities:
> Too long or NA distances: 65 out of 105 (61.9%)
> Stepping across 105 dissimilarities...
> Error in isoMDS(dist, k = k, trace = isotrace) :
>   an initial configuration must be supplied with NA/Infs in 'd'
> In addition: Warning messages:
> 1: In stepacross(dis, trace = trace, ...) :
>   Disconnected data: Result will contain NAs
> 2: In metaMDSdist(comm, distance = distance, autotransform = autotransform,
> :
(Continue reading)

Mauricio Cifuentes | 3 Feb 11:52
Picon

nested mixed model?

Hi everybody,

I am trying to fit a model in R using the lme() function. I would like
to have your opinion about what I did and if there are better ways to
resolve this analysis. First Let me explain you how look the data that
we are analyzing. We want to compare the tooth microtexture of four
species of ungulates. 

For that we have taken pictures in eight different points within each
tooth of one individual. We used as many teeth as were available for
each individual taken in account their position and at the same time
separating them by the place they were located (mandible: down tooth;
maxilla: upper tooth). 

I am not an expert, but until here the model looks as nested design,
please let me know if I am wrong. In summary we have the following
hierarchy arrangement:

Species (4 species) > bone(mandible or maxilla) > tooth > points within
each tooth (8 points).

I have fitted this model using: lme(response ~ species, data=tooth,
random=~1|bone/tooth/points,na.action=na.omit)

I will be really grateful if you can give me your opinion about that.

Best wishes

Mauro
(Continue reading)


Gmane