1. Improving Model of Interaction
Networks
Konstans Wells & Bob O'Hara
Blogged at
http://blogs.nature.com/boboh/2012/03/29/doing_stuff_with_ecological_network
s
2. Typical Data
Fi lu Fi th Pr af Fi su Ma bu
Commom Bulbul 128 110 70 30 27
Blue Monkey 19 35 2 28 36
Red tailed Monkey 11 19 0 52 29
Voilet backed starling 1 0 190 0 0
Blackcap 64 23 3 8 9
http://www.nceas.ucsb.edu/interactionweb/html/schleuning-et-al-2010.html
3. What's wrong?
Network statistics are messy
Q=
1
( ki k j
)
∑ Aij − 2m δ(c i , c j )
2m i , j
Derived for known networks
behaviour when uncertain is difficult to understand
4. Statistical Problems
How do we estimate
sampling error?
Are the zeroes real?
What if the sampling is
not representative?
6. Building the Model I
Fi lu Fi th Pr af Fi su Ma bu
Common Bulbul 1 λ11 λ21 λ131 λ41 λ51
Common Bulbul 2 λ12 λ22 λ132 λ42 λ52
Red tailed Monkey 1 λ13 λ23 λ33 λ43 λ53
Red tailed Monkey 2 λ14 λ24 λ34 λ44 λ54
Red tailed Monkey 3 λ15 λ25 λ35 λ45 λ55
Start with mean rates of interaction per individual
7. Building the Model II
Fi lu Fi th Pr af Fi su Ma bu
Common Bulbul 1 λ11 λ21 λ131 λ41 λ51
Common Bulbul 2 λ12 λ22 λ132 λ42 λ52
Red tailed Monkey 1 λ13 λ23 λ33 0 λ53
Red tailed Monkey 2 λ14 0 λ34 λ44 λ54
Red tailed Monkey 3 λ15 λ25 λ35 λ45 λ55
Can set some means to zero
8. What is λij?
Individual rate of visitation
No. of visits ~ Poisson(λij)
We can model this further
10. Individual To Species
Species-level rate of interaction is
Λc ,r= ∑ ̄
λ i , j =nc m r λ c , r
i , j ∈c , r
Abundances of
resource &
consumer
11. Individual To Species
Species-level rate of interaction is
Λc ,r= ∑ ̄
λ i , j =nc m r λ c , r
i , j ∈c , r
Abundances of Mean individual-
resource & level
consumer preferences
Extracts abundance effects from preferences
12. In practice...
We might observe trees, and not be able to
distinguish individuals visiting them
We have several resources, but lump consumers
together
nc = 1
If we estimate nc, we can get back to λij
13. Further modelling
Log-linear:
log(λ ij )=β(r i , c j )+ γ (i , j)
β(r i , c j )=ρ(r i )+ χ (c j )+ ι (r i , c j )
Resource + Species + Interaction
Separates out “palatability” and “hungriness” from
specificity
14. Better Measures
Modularity
Q=
1
2m i , j ( ki k j
) 1
∑ A ij − 2m δ(ci , c j )= 2 ∑ ( pij − pi⋅ p⋅j ) δ(c i , c j )
i, j
“the fraction of edges that fall within communities minus the
expected value of the same quantity if edges are assigned at
random, conditional on the given community memberships
and the degrees of vertices.”
But
logit p ij −logit pi⋅ p⋅j =ι (r i , c j )
15. Fitting the Model
Simplest: log-linear model
glm(Count ~ Resource*Consumer,
family=poisson())
Assumes no over-dispersion
Can model further, e.g. add resource-specific
covariates
16. More complicated models
If we have several individuals of resource and
consumer:
glm(Count ~ Resource*Consumer +
Res.Ind*Con.Ind + offset(Time),
family=poisson()
Now Res.Ind:Con.Ind is over-dispersion
Could use random effects
17. Adding Zeroes
Where the data is a 0, λij is estimated as low
Can't tell where the “true” zeroes are
So, use a zero-inflated Poisson distribution
adds zeroes
But they are uncertain
18. How well does our model perform?
Simulation study
12 resource species, 9 consumers
Effects: Each cell a 3 x 3 matrix
Generalist Opportunist Specialist
Generalist 0.75 0.25 0
Opportunist 0.2 0.01 0
Specialist 0.01 0 0.2
Erratic 0.05 0.01 0
19. Sample Sizes
Balanced:
3,5,10,15,20 individuals of each species
Unbalanced:
5 individuals of each resource species
5, 10, 15, 20 individuals of generalist consumers
3 individuals of other consumers
22. Thoughts
Model links more closely to actual mechanisms
more interpretable
Can build models for specific questions
modularity
Can build hierarchical models, to combine
several networks
meta-regression
Agent-based interaction models: estimating per individual interaction strength and covariates before simplifying data into per species ecological networks