3

Here are my data:

             Substrate   Species Human.Impact Count
1              rubbles E. quadricolor   0    0
2   corals and rubbles E. quadricolor   0    0
3               corals E. quadricolor   0    4
4      corals and sand E. quadricolor   0    0
5                 sand E. quadricolor   0    0
6              rubbles   S. mertensii   0    0
7   corals and rubbles   S. mertensii   0    2
8               corals   S. mertensii   0   10
9      corals and sand   S. mertensii   0    9
10                sand   S. mertensii   0    0
11             rubbles      H. crispa   0    0
12  corals and rubbles      H. crispa   0    6
13              corals      H. crispa   0    6
14     corals and sand      H. crispa   0    5
15                sand      H. crispa   0    0
16             rubbles   M. doreensis   0    0
17  corals and rubbles   M. doreensis   0    0
18              corals   M. doreensis   0    0
19     corals and sand   M. doreensis   0    0
20                sand   M. doreensis   0    0
21             rubbles   H. magnifica   0    0
22  corals and rubbles   H. magnifica   0    0
23              corals   H. magnifica   0    1
24     corals and sand   H. magnifica   0    0
25                sand   H. magnifica   0    0
26             rubbles    S. gigantea   0    0
27  corals and rubbles    S. gigantea   0    0
28              corals    S. gigantea   0    0
29     corals and sand    S. gigantea   0    0
30                sand    S. gigantea   0    0
31             rubbles      H. aurora   0    0
32  corals and rubbles      H. aurora   0    0
33              corals      H. aurora   0    2
34     corals and sand      H. aurora   0    4
35                sand      H. aurora   0    0
36             rubbles E. quadricolor   1    0
37  corals and rubbles E. quadricolor   1    0
38              corals E. quadricolor   1    8
39     corals and sand E. quadricolor   1    0
40                sand E. quadricolor   1    0
41             rubbles   S. mertensii   1    0
42  corals and rubbles   S. mertensii   1    0
43              corals   S. mertensii   1    0
44     corals and sand   S. mertensii   1    0
45                sand   S. mertensii   1    0
46             rubbles      H. crispa   1    0
47  corals and rubbles      H. crispa   1    0
48              corals      H. crispa   1   18
49     corals and sand      H. crispa   1    0
50                sand      H. crispa   1    0
51             rubbles   M. doreensis   1    0
52  corals and rubbles   M. doreensis   1    0
53              corals   M. doreensis   1    0
54     corals and sand   M. doreensis   1    0
55                sand   M. doreensis   1    0
56             rubbles   H. magnifica   1    0
57  corals and rubbles   H. magnifica   1    0
58              corals   H. magnifica   1    3
59     corals and sand   H. magnifica   1    0
60                sand   H. magnifica   1    0
61             rubbles    S. gigantea   1    0
62  corals and rubbles    S. gigantea   1    0
63              corals    S. gigantea   1    1
64     corals and sand    S. gigantea   1    0
65                sand    S. gigantea   1    0
66             rubbles      H. aurora   1    0
67  corals and rubbles      H. aurora   1    0
68              corals      H. aurora   1    1
69     corals and sand      H. aurora   1    0
70                sand      H. aurora   1    0
71             rubbles E. quadricolor   2    0
72  corals and rubbles E. quadricolor   2    0
73              corals E. quadricolor   2    0
74     corals and sand E. quadricolor   2    1
75                sand E. quadricolor   2    0
76             rubbles   S. mertensii   2    0
77  corals and rubbles   S. mertensii   2    0
78              corals   S. mertensii   2    2
79     corals and sand   S. mertensii   2    1
80                sand   S. mertensii   2    0
81             rubbles      H. crispa   2    0
82  corals and rubbles      H. crispa   2    0
83              corals      H. crispa   2    0
84     corals and sand      H. crispa   2    3
85                sand      H. crispa   2    0
86             rubbles   M. doreensis   2    0
87  corals and rubbles   M. doreensis   2    0
88              corals   M. doreensis   2    0
89     corals and sand   M. doreensis   2    0
90                sand   M. doreensis   2    0
91             rubbles   H. magnifica   2    0
92  corals and rubbles   H. magnifica   2    0
93              corals   H. magnifica   2    0
94     corals and sand   H. magnifica   2    0
95                sand   H. magnifica   2    0
96             rubbles    S. gigantea   2    0
97  corals and rubbles    S. gigantea   2    0
98              corals    S. gigantea   2    0
99     corals and sand    S. gigantea   2    0
100               sand    S. gigantea   2    0
101            rubbles      H. aurora   2    0
102 corals and rubbles      H. aurora   2    0
103             corals      H. aurora   2    4
104    corals and sand      H. aurora   2    5
105               sand      H. aurora   2    0
106            rubbles E. quadricolor   3    0
107 corals and rubbles E. quadricolor   3    0
108             corals E. quadricolor   3    0
109    corals and sand E. quadricolor   3    0
110               sand E. quadricolor   3    0
111            rubbles   S. mertensii   3    2
112 corals and rubbles   S. mertensii   3    0
113             corals   S. mertensii   3    1
114    corals and sand   S. mertensii   3    0
115               sand   S. mertensii   3    0
116            rubbles      H. crispa   3    1
117 corals and rubbles      H. crispa   3    0
118             corals      H. crispa   3    6
119    corals and sand      H. crispa   3    3
120               sand      H. crispa   3    0
121            rubbles   M. doreensis   3    0
122 corals and rubbles   M. doreensis   3    0
123             corals   M. doreensis   3    3
124    corals and sand   M. doreensis   3    0
125               sand   M. doreensis   3    0
126            rubbles   H. magnifica   3    0
127 corals and rubbles   H. magnifica   3    0
128             corals   H. magnifica   3    0
129    corals and sand   H. magnifica   3    0
130               sand   H. magnifica   3    0
131            rubbles    S. gigantea   3    1
132 corals and rubbles    S. gigantea   3    0
133             corals    S. gigantea   3    5
134    corals and sand    S. gigantea   3    0
135               sand    S. gigantea   3    2
136            rubbles      H. aurora   3    0
137 corals and rubbles      H. aurora   3    0
138             corals      H. aurora   3    8
139    corals and sand      H. aurora   3    3
140               sand      H. aurora   3    0

I'd like to know if the species are found in random substrate or if each species seem to have its own personal substrate.

Here is I think might be good (coded in R):

summary(glm(Count ~ substrate * species + Human.impact, data=myData, family='Poisson'))

Does it seem good to you? All p.values are extremely close to 1 (except for Human.impact). Am I missing something or is there really no difference in habitat choice per species?

Note: Human.impact is added in order to remove some unwilling variance of the model.

Remi.b
  • 5,112
  • 1
    Think about the hypotheses behind the p values provided by "summary". Are such comparisons to baseline categories really of key interest to your research question? – Michael M Dec 10 '13 at 10:37
  • @MichaelMayer I think indeed there is the whole point of my question. I don't quite know if they really indicate no difference of choice of substrate between species. I was thinking also about running one test per species and an anova (anova.lm()) to compare the models but again I am not quite sure of what it means! Thanks for your help – Remi.b Dec 10 '13 at 12:19

2 Answers2

1

If you want to test the null hypothesis of no relation between two categorical variables $X$ and $Y$ (choice of substrate and species) while controlling for further categorical variables (human impact), running a log-linear Poisson regression on the counts of the corresponding contingency table is often an option, see e.g. http://www.education.umd.edu/EDMS/fac/Hancock/Course_Materials/EDMS771/readings/LogLinearModels%20reading.pdf

There, you will also learn that (conditional) independence between $X$ and $Y$ is similar to having no interaction effects between $X$ and $Y$ on mean counts. Thus, to test the null hypothesis of interest, you will need to check the null hypothesis of no interaction between choice of substrate and species (controlling for human impact).

Based on your code, you get such approximate likelihood ratio test by running

mymodel <- glm(Count ~ substrate * species + Human.impact, data=myData, family='Poisson')
drop1(mymodel, test = "LRT")

Now, if the single p value for the interactions is below your significance level, you have demonstrated that there is some relation between choice of substrate and species (conditional on human impact). If this is not the case, you can't reject the null hypothesis of no conditional relation.

Michael M
  • 11,815
  • 5
  • 33
  • 50
0

I believe your p values reflect that your data are heavily zero-inflated. When whole levels of a factor have only or mostly zeroes, you get massive standard deviation and big p values. I have asked a question about this myself here. Using zero-inflated models may help, but zeroinflfrom the package pscldoesn't handle all zeroes well either.