Dear list,

 

I am currently working on a data set on the fly abundance in flowers of
Trollius europaeus in 20 populations, recorded over three years. 

 

I am interested in the of effect of several explanatory variables such
as plant population size, mean plant size, plant density, elevation and
distance to next sampled population on the fly abundance in a
population.

 

As I think that my data is zero-inflated (it contains 87% zero values),
I would like to use a zero-inflated model, which also allows me to fit
fixed effects as well as random effects to account for the populations
being repeatedly measured over three years.

 

I therefore tried to fit the MCMCglmm with a zipoisson family and am
wondering if any of you could give me some advice on the coding, as I am
not really sure if I have done things correctly. 

 

I have checked the MCMCglmm documentation as well as previous posts
regarding MCMCglmm with a zipoisson family, but still have some problems
with how to code and if my priors are ok.

 

So I would greatly appreciate it if you could have a look at the code
below and let me know if it is ok and/or point me at the right reading
material.

 

---

Data set:

n= 16867

counts done in 2006,2007 and 2008

9 populations were sampled in 2006, all 20 in 2007 & 2008

 

response: 

abund -  number of flies per flower, ranging from 0 - 7

 

variables:

YEAR -  year of sampling (factor)

pop - name of the sampled population (factor)

fl - population size (as No. of flowers) (int)

elev - elevation (int)

mps - mean plant size (average No. of flowers per individual) (num)

dens -  plant population density (num)

distance - distance to closest sampled population (num)

 

 

MODEL CODE:

 

priorA <- list(R=list(V=diag(2),n=2,fix=2),
G=list(G1=list(V=diag(2),n=2),G2=list(V=diag(2),n=2)))

 

abund3.mcmc <-
MCMCglmm(abund~trait:fl+trait:mps+trait:elev+trait:distance+trait:dens,r
andom=~idh(trait):YEAR+idh(trait):pop,rcov=~idh(trait):units,data=flyden
s,family="zipoisson",prior=priorD)

 

----

 

Thanks already for the help :> 

 

Regards,

 

Charlotte 

 

 

 

 


	[[alternative HTML version deleted]]


