Skip to content

[R-meta] The phylogenetic signal of a single trait and its significance

5 messages · Pengzhen Huang, Wolfgang Viechtbauer

#
Dear list,


I'm building a meta-regression model to test the effect of single trait Y on the effect sizes (ES). Here is the full model I fit:


phy.model <- rma.mv(ES, variance, data=dat, mods = ~ Y + X1 + X2 + X3 + X4, random=list(~1|Species/Group), R=list(Species=A))


in which I include the phylogeny of the species as one of random factors. The variables X1-X4 are other potential factors that may influence the relationship between the trait Y and ES. Now I would like to test the phylogenetic signal in the trait Y.


In section 4.2 of the paper (10.1111/2041-210X.13760), the phylogenetic signal lambda can be calculated as the degree of the phylogenetic signal in the overall variance, i.e., (sigma2 of phylogeny)/(overall sigma2). The significance of the lambda can be measured through a likelihood ratio test (LRT): X2 = ?2(ll7 ?ll9), where ll7 and ll9 are the (restricted) log-likelihoods of the non-phylogenetic model and corresponding phylogenetic model.




I encounter two issues here:
1) If I would like to get the phylogenetic signal in trait Y, should I just use the rma.mv phylogenetic model that contains the variable Y only? I don?t need to include other variables (X1-X4) (like the model above) in the rma.mv phylogenetic model for this, is that so?


2) When testing the significance of the phylogenetic signal using the LRT stated above, the X2 I get is negative and I could not perform a LRT. May I know that why this happens?




Any advice on these issues would be much appreciated!




All the best,
Pengzhen
1 day later
#
Dear Pengzhen,

You missed one of the main message of the paper. As shown in the simulation study, it is absolutely essential to include both the random species effect with phylogeny and the random species effect without phylogeny in the model.

As for your questions:

1) If your model includes moderators, then I would include those also when computing lambda.

2) Impossible to say without a reproducible example.

Best,
Wolfgang
#
Dear Wolfgang,


(Sorry that I'm not familiar with the operations!) Great thanks for the reminder! I set wrong random factors before. Based on the R code provided in OSF of your paper, I corrected my code and reran my models. Here are the codes from building the tree to running the full models (with all moderators):
Multivariate Meta-Analysis Model (k = 152; method: REML) 


Variance Components: 
            estim    sqrt   nlvls fixed        factor
sigma^2.1  0.0484   0.2201   28    no         Species
sigma^2.2  0.0199   0.1412   63    no   Species/Group 
........
Multivariate Meta-Analysis Model (k = 152; method: REML)
Variance Components:
            estim    sqrt   nlvls fixed        factor     R
sigma^2.1  0.0484   0.2201   28    no         Species    no
sigma^2.2  0.0199   0.1412   63    no   Species/Group    no
sigma^2.3  0.0000   0.0000   28    no           phylo   yes 
....
'log Lik.' 7.11124e-09 (df=16)
df    AIC      BIC     AICc    logLik    LRT   pval     QE
Full    17 208.0528 257.8162 213.1528 -87.0264               217.0285
Reduced 16 206.0528 252.8889 210.5487 -87.0264 0.0000 1.0000 217.0285
#
Dear Pengzhen,

Cerrtainly, variance components (including the one for phylogeny) can be essentially zero. That is what is happening here. So nothing unusual about that. Whether this makes sense in the present context I cannot judge.

Best,
Wolfgang
#
Dear Wolfgang,


That's great! I think it makes sense as the phylogeny variance is eithor very low or zero as well when I replace the trait Y with other representations in the models. Thank you for helping me work things out!!




Cheers!
Pengzhen


---- Replied Message ----
| From | Viechtbauer, Wolfgang (NP)<wolfgang.viechtbauer at maastrichtuniversity.nl> |
| Date | 11/30/2023 08:40 |
| To | R Special Interest Group for Meta-Analysis<r-sig-meta-analysis at r-project.org> |
| Cc | Pengzhen Huang<maiqi1317 at 163.com> |
| Subject | RE: [R-meta] The phylogenetic signal of a single trait and its significance |
Dear Pengzhen,

Cerrtainly, variance components (including the one for phylogeny) can be essentially zero. That is what is happening here. So nothing unusual about that. Whether this makes sense in the present context I cannot judge.

Best,
Wolfgang

-----Original Message-----
From: R-sig-meta-analysis <r-sig-meta-analysis-bounces at r-project.org> On Behalf
Of Pengzhen Huang via R-sig-meta-analysis
Sent: Thursday, November 30, 2023 14:30
To: r-sig-meta-analysis at r-project.org
Cc: Pengzhen Huang <maiqi1317 at 163.com>
Subject: Re: [R-meta] The phylogenetic signal of a single trait and its
significance

Dear Wolfgang,

(Sorry that I'm not familiar with the operations!) Great thanks for the
reminder! I set wrong random factors before. Based on the R code provided in OSF
of your paper, I corrected my code and reran my models. Here are the codes from
building the tree to running the full models (with all moderators):

primatetree <- compute.brlen(primatetree1)
A <- vcv(primatetree, corr=TRUE)
dat$phylo <- dat$Species
nonphy<-
rma.mv(ES,variance,data=dat,mods=~Y+X1+X2+X3+X4,random=list(~1|Species/Group))

nonphy
Multivariate Meta-Analysis Model (k = 152; method: REML)

Variance Components:
estim    sqrt   nlvls fixed        factor
sigma^2.1  0.0484   0.2201   28    no         Species
sigma^2.2  0.0199   0.1412   63    no   Species/Group
........

phy<-
rma.mv(ES,variance,data=dat,mods=~Y+X1+X2+X3+X4,random=list(~1|Species/Group,~1|
phylo),R=list(phylo=A))
phy
Multivariate Meta-Analysis Model (k = 152; method: REML)
Variance Components:
estim    sqrt   nlvls fixed        factor     R
sigma^2.1  0.0484   0.2201   28    no         Species    no
sigma^2.2  0.0199   0.1412   63    no   Species/Group    no
sigma^2.3  0.0000   0.0000   28    no           phylo   yes
....

logLik(nonphy)-logLik(phy)
'log Lik.' 7.11124e-09 (df=16)
anova.rma(nonphy,phy)
df    AIC      BIC     AICc    logLik    LRT   pval     QE
Full    17 208.0528 257.8162 213.1528 -87.0264               217.0285
Reduced 16 206.0528 252.8889 210.5487 -87.0264 0.0000 1.0000 217.0285