Skip to content
Prev 17146 / 20628 Next

Unclear output from MCMCglmm with categorical predictors

Thanks for your response Walid.
However, it doesn't really answer my questions, so I'll try to clarify those.

An intercept estimate in my model makes no biological sense because  
all species have both diet and habitat. This is why I chose to  
suppress the intercept.

In the context of categorical predictors, suppressing the intercept   
means that an arbitrarily-chosen category is taken as baseline, and  
the model estimates the difference (in the response variable) between  
this baseline and all other categories.
When dealing with two categorical traits as predictors, each data  
point is a combination of the effects of both traits, i.e. it is a  
combination of one category from each trait.

If this is indeed the case, the baseline value must include one  
category of each predictor in the model, otherwise their effects would  
be confounded.

For example, in my model I would expect one diet category AND one  
habitat category, say, 'herbivorous' and 'aquatic', to be  
baseline/intercept (un-estimated).
Instead, it seems that only 'herbivorous' is absorbed in the  
intercept, while all habitat classes have posterior estimates.

My questions are:
1- why does no habitat category get absorbed in the intercept? and
2- what can I do to fix that?

If it's at all useful, here is an example:

## data format
unique(Tdata$Habitat)
[1] TE AR AQ ST SA
Levels: AQ AR SA ST TE

unique(Tdata$Diet)
[1] Herb Omni Faun
Levels: Faun Herb Omni

ModTHRE <- MCMCglmm(Response ~ -1 + Habitat + Diet,
                     prior = list(R = list(V = 1, nu = 0.002)),
                     ginverse = list(Binomial=INphylo$Ainv),
                     burnin = 25000, nitt = 225000, thin = 200,
                     family = "threshold",
                     data = Tdata,
                     verbose = FALSE)

## model output
summary(ModTHRE)

  Iterations = 25001:224801
  Thinning interval  = 200
  Sample size  = 1000

  DIC: 2321.861

  R-structure:  ~units

       post.mean l-95% CI u-95% CI eff.samp
units         1   0.9973    1.003     1000

  Location effects: Response ~ -1 + ForagingHab + Troph_Lev

             post.mean l-95% CI u-95% CI eff.samp  pMCMC
HabitatST   -0.07612 -0.42629  0.33746   1000.0  0.694
HabitatTE   -0.36682 -0.52533 -0.21118   1000.0 <0.001 ***
HabitatSA   -0.04691 -0.25769  0.19636   1000.0  0.724
HabitatAR   -0.07302 -0.29900  0.16681    883.3  0.548
HabitatAQ   -0.47948 -0.82598 -0.15793   1000.0  0.002 **
DietHerb     0.30708  0.11255  0.48545   1000.0  0.002 **
DietOmni     0.05263 -0.12176  0.26105   1000.0  0.604
---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1

  Cutpoints:
                          post.mean l-95% CI u-95% CI eff.samp
cutpoint.traitActivity.1    0.4911    0.436   0.5495    877.6



Any thoughts, ideas of what's going on here, or corrections of my  
mis-perceptions, are all very welcome.

Many thanks,
Roi


Quoting Walid Mawass <walidmawass10 at gmail.com>: