[R-sig-ME] Partitioning species and environment effects MCMCglmm

Demétrius Martins emaildemetrius at gmail.com
Wed May 31 14:57:54 CEST 2017


Dear
​list​
,

I'm working on plant traits and I want to partition the variance of each
trait by separating the species effect from the plot effect (i.e. place
where the sample was taken)
​ ​
and residuals
.

I'm interested in how the traits covary, hence I'm
​ ​
analysing the traits as a multiresponse model.

I have the following model:

# priors

priorwl.1<-list(R=list(V=diag(17), nu=16.002),G=list(G1=list(V=diag(17),
nu=16.002),

                                                     G2= list(V=diag(17),
nu=16.002) ))


#model


mod.bays.wl1<- MCMCglmm(  cbind (l_LMA, l_N.mg.g.1, l_C.mg.g.1,
l_Ca.mg.g.1, l_K.mg.g.1, l_Mg.mg.g.1, l_Na.mg.g.1, l_P.mg.g.1,w_WD, w_MC,
w_N.mg.g, w_C.mg.g, w_Ca.mg.g, w_K.mg.g, w_Mg.mg.g, w_Na.mg.g, w_P.mg.g) ~
trait -1

                          random=~ us(trait):Genus_species  +
us(trait):Plot,

                          rcov = ~ us(trait):units,

                          prior = priorwl.1,  family = rep("gaussian",17),
data=logdata,

                          burnin = 50000, nitt = 1050000, thin = 100, pr =
TRUE, slice=T)


I’m calculating the variance of each random term of the model as:


​​
l_C.spvar<-mod.bays.wl1$VCV[,'traitl_C.mg.g.1:traitl_C.mg.g.1.Genus_species']
/  (mod.bays.wl1$VCV[,'traitl_C.mg.g.1:traitl_C.mg.g.1.Genus_species'] +


                        mod.bays.wl1$VCV[,'traitl_C.mg.g.
1:traitl_C.mg.g.1.Plot']+


mod.bays.wl1$VCV[,'traitl_C.mg.g.1:traitl_C.mg.g.1.units'])



l_C.plotvar<-mod.bays.wl1$VCV[,'traitl_C.mg.g.1:traitl_C.mg.g.1.Plot'] /
(mod.bays.wl1$VCV[,'traitl_C.mg.g.1:traitl_C.mg.g.1.Genus_species'] +


                 mod.bays.wl1$VCV[,'traitl_C.mg.g.1:traitl_C.mg.g.1.Plot']+


                              mod.bays.wl1$VCV[,'traitl_C.
mg.g.1:traitl_C.mg.g.1.units'])


l_C.resvar<-mod.bays.wl1$VCV[,'traitl_C.mg.g.1:traitl_C.mg.g.1.units'] /
 (mod.bays.wl1$VCV[,'traitl_C.mg.g.1:traitl_C.mg.g.1.Genus_species'] +


 mod.bays.wl1$VCV[,'traitl_C.mg.g.1:traitl_C.mg.g.1.Plot']+


 mod.bays.wl1$VCV[,'traitl_C.mg.g.1:traitl_C.mg.g.1.units'])



in this example
,
I’m calculating the variance of the two random effects and the residual on
the l_C.mg.g.1 trait.



I’ve done this to every single trait specified on the model, however
,
I get very similar effects (species, plot and residual) for every single
trait, for example:

​

l_C.plotvar

l_C.resvar

l_C.spvar

l_Ca.plotvar

l_Ca.resvar

l_Ca.spvar

l_K.plotvar

l_K.resvar

l_K.spvar

mean.var

0.8222

0.0772

0.1007

0.8181

0.0790

0.1029

0.8142

0.0802

0.1057

lower

0.6481

0.0076

0.0104

0.6418

0.0066

0.0086

0.6283

0.0073

0.0134

upper

0.9823

0.1543

0.2062

0.9777

0.1564

0.2052

0.9734

0.1587

0.2175
​


Column end
ing
​ ​
with(plotvar) = plot effect

Column end
ing
​ ​
with(restvar) = residual

Column end
​ing​
 with(spvar) = species effect
ing
with(spvar) = species effect



I don't know what I could be possibly doing wrong in this case. I
partitioned the variance of each trait by using the lme4 package and
extracted the variance of the random effects of each trait. The
​ variance​
 differ drastically one from another
​ across traits​
, hence I have very different results when using MCMCglmm and lme4.

​Does anybody know why variances of the traits are so similar?​

I appreciate any guidance on this problem.

Best wishes,
Demetrius


*Demétrius Martins*
PhD Student
Imperial College London
*​*

	[[alternative HTML version deleted]]



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