[R] Model design

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Fri Dec 16 18:25:19 CET 2011


Dear Alfreda,

I'm not suggesting to use ANOVA but to look at the anova table of your gls model. You can get that with anova(your.model). 

Thierry
________________________________________
Van: alfreda morinez [alfredamorinez op gmail.com]
Verzonden: vrijdag 16 december 2011 15:29
Aan: ONKELINX, Thierry
CC: r-help op r-project.org
Onderwerp: Re: [R] Model design

Hi Thierry

I looked at running an ANOVA but I have spatial autocorrelation in the
data set as indicated by Variograms and significant moran's I i.e the
cells closer together are more likely to be similar than expected
under a normal distibution - is it possible to make this approach take
it into consideration ( through the x/y coordinates of the grass).

Is the approach i am using stasitically incorrect or is it doing
something similar to a ANOVA but weighting it through the correlation
matrix?

Thanks



On Fri, Dec 16, 2011 at 2:17 PM, ONKELINX, Thierry
<Thierry.ONKELINX op inbo.be> wrote:
> Dear Alfreda,
>
> anova(area_grass) will tell you IF the average grass area is different among areas.
>
> If you want to know WHICH areas are different from each other, then you have to do some multiple comparisons. You can use the multcomp package: e.g.
>
> library(multcomp)
> glht(area_grass, linfct = mcp(AREA = "Tukey"))
>
> Best regards,
>
> Thierry
> ________________________________________
> Van: r-help-bounces op r-project.org [r-help-bounces op r-project.org] namens alfreda morinez [alfredamorinez op gmail.com]
> Verzonden: vrijdag 16 december 2011 14:07
> Aan: r-help op r-project.org
> Onderwerp: [R] Model design
>
> Dear List,
>
> I am realtively inexperienced so i apologise in advance and ask for
> understanding in the simplicity of my question:
>
> I have data on the amount of grass per km in a cell ( of which i have
> lots) "grass" and for each cell i have x/y coordinates - required due
> to spatial autocorrelation
>
> Cells can be classfied in a hierarchical nature into  AREAS and STATES
>
> i.e Cell 1, Cell 2, Cell 3 are all in AREA "A"
>
> where as Cell 4,5 and 6 are in AREA "B"
>
> However both area A + B are in state "S1"
>
> I have lots of these (13000) cells which are classfied into ~2000
> AREA's and ~750 STATE'S
>
> So my question is do AREA'S differ in the amount of grass they contain
> i.e does AREA A contain significantly more grass than AREA B?
>
> I have modelled this by
>
> area_grass <- gls(grass~AREA, correlation=corExp(form=~x+y), data = grassland
>
> I have set the contrasts to options(contrasts = c("contr.treatment",
> "contr.poly")) as there are no control groups.
>
> What i will get ( it is taking ages!)
>
> is
>
> AREA A:     -0.12.... **
> AREA B:      0.17....*
> AREA C..
>
>
> So can i then say AREA A has significantly less grass than the
> average, AREA B significantly more and AREA C is not significantly
> different?
>
> Thanks
>
> Alfreda
>
> ______________________________________________
> R-help op 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.



More information about the R-help mailing list