[R] Model design

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Fri Dec 16 15:17:49 CET 2011


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