[R-sig-ME] Zipoisson MCMCglmm for abundance data

Daniel Sol dsolrueda at gmail.com
Tue Nov 27 14:07:45 CET 2012

Hi everybody,

I'm trying to model species abundances and I have some doubts about
how to fit my model with MCMCglmm.

My aim is to test whether the abundance of species in urban habitats
(variable "abund.urb") is associated with their density in the
surrounding habitats (variable "dens.surr", log+0.5 transformed) with
a dataset of 22 localities. The response variable (variable
"abund.urb") is zero-inflated, so a zipoisson stucture of errors seems
to be a good option. To model this response variable, I need to take
into account the likely non-independence of observations coming from
the same location (variable "location") and the same species (variable
"animal", as some species are found in more than one locality). I also
need to include phylogenetic corrections (phylo object "tree") and
take into account that the sampling effort (variable "effort") vary
between locations. The script is shown below.

zi.prior <-  list(R = list(V = diag(2), n = 1.002, fix = 2),
			  G = list(G1 = list(V = 1, n = 0.002),
		  	  G2 = list(V = 1, n = 0.002),
		              G3 = list(V = 1, n = 0.002)))
mev <-1/(effort)
mesd <- (mev)**0.5

   m2 <- MCMCglmm(abund.urb ~ -1 +
at.level(trait,1):log(dens.surr+0.5) +  	at.level(trait,1):location,
	random = ~idh(at.level(trait,1)):location +
idh(at.level(trait,1)):animal + us(mesd):units,
	rcov = ~ idh(trait):units,
	data = dat0.phyl, family = "zipoisson", prior = zi.prior,
	verbose = TRUE, pr = FALSE, pl = FALSE)

I would appreciate help in the following questions:

1. Does the model look appropriate?

2. How can I transform the model to allow slopes (in addition of
intercepts)  to vary at random within localities? I have made several
attempts but they do not work.

3. Is the use of "animal" as random factor enough to control for
repeated species data, or I also have to add an additional random
factor coding for each species.

3. Is the estimated of "med" correct?

3. Should I use trait-1 or simply -1?

4. Are there other priors that would be worth testing?

I'm new in using MCMCglmm so any help is appreciated.

Many thanks in advance,


Daniel Sol
CREAF (Centre for Ecological Research and Applied Forestries)
CSIC (Centre for Advanced Studies of Blanes-Spanish National Research Council)
Autonomous University of Barcelona, Bellaterra, Catalonia E-08193, Spain
TEL: +34 93-5814678
FAX: +34 93-5814151
E-MAIL: d.sol at creaf.uab.es

More information about the R-sig-mixed-models mailing list