FAQ
Hi to all the people,

I'm working with abundance data of some species, but containing too zero
values, and the factors are the ones typical in a BACI experiment
(Before-and-After-Control-Impact). Thus, these are two fixed factors. As the
data does not holds the normality and homogeneity of variances assumptions
of clasiccal ANOVA, I'm trying to fit a zero-altered model using the MCMC
glmm library.
I've two questions:

1.- how I can include an interaction between the BA (before and after) and
the CI (control-impact) components in this kind of models? I'm searching in
the notes available in the models but found no clear answer. My first
approach to this wil be to wrote a formula like: Abundance~BA+CI+BA*CI.
2.- Even when I try to fit a model without interactions I can't do it
because I obtain the following error:
fit<-MCMCglmm(Abundancia~BA+CI, random=NULL,
family="zapoisson",data=Trucha)
Error in MCMCglmm(Abundancia ~ BA + CI, random = NULL, family = "zapoisson",
:
please use idh(trait):units or us(trait):units or trait:units for error
structures involving multinomial data with more than 2 categories or
zero-infalted/altered/hurdle models

I don't know where is the problem, maybe because my original data is
organised as (obviously with much more data):

Abundance BA CI
5 1 1
3 2 1
6 1 2


Any idea or suggestion? Many thanks for your help and patience, best regards


Pablo
8 2 2
--
View this message in context: http://r.789695.n4.nabble.com/MCMC-glmm-tp3304916p3304916.html
Sent from the R help mailing list archive at Nabble.com.

Search Discussions

  • Ben Bolker at Feb 14, 2011 at 9:24 pm

    garciap <garciap <at> usal.es> writes:

    I'm working with abundance data of some species, but containing too zero
    values, and the factors are the ones typical in a BACI experiment
    (Before-and-After-Control-Impact). Thus, these are two fixed factors. As the
    data does not holds the normality and homogeneity of variances assumptions
    of clasiccal ANOVA, I'm trying to fit a zero-altered model using the MCMC
    glmm library.
    I've two questions:

    1.- how I can include an interaction between the BA (before and after) and
    the CI (control-impact) components in this kind of models? I'm searching in
    the notes available in the models but found no clear answer. My first
    approach to this wil be to wrote a formula like: Abundance~BA+CI+BA*CI.
    2.- Even when I try to fit a model without interactions I can't do it
    because I obtain the following error:
    fit<-MCMCglmm(Abundancia~BA+CI, random=NULL,
    family="zapoisson",data=Trucha)
    Error in MCMCglmm(Abundancia ~ BA + CI, random = NULL, family = "zapoisson",
    :
    please use idh(trait):units or us(trait):units or trait:units for error
    structures involving multinomial data with more than 2 categories or
    zero-infalted/altered/hurdle models
    Quick, not necessarily complete answers:

    (1) BA*CI (which is equivalent to BA+CI+BA:CI) is the right
    syntax for the before-after by control-impact interaction.

    (2) MCMCglmm fits zero-altered models by constructing an augmented
    set of response variables + predictor variables. This is a little
    tricky: I strongly recommend that you look at p. 100 and following of
    vignette("CourseNotes",package="MCMCglmm") and come back with
    further questions after you've read it ...
    As mentioned therein, if you don't have random effects then it
    will be considerably easier to fit your model using the functions
    in the pscl package.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupr-help @
categoriesr
postedFeb 14, '11 at 12:48p
activeFeb 14, '11 at 9:24p
posts2
users2
websiter-project.org
irc#r

2 users in discussion

Garciap: 1 post Ben Bolker: 1 post

People

Translate

site design / logo © 2017 Grokbase