Skip to content
Prev 1467 / 5636 Next

[R-meta] Different outputs by comparing random-effects model with a MLMA without intercept

Dear Rafael,

I appreciate the effort to provide some illustrative data, but that wasn't my point. I know nothing about the actual meaning of your data or what "potential_sce" stands for, so I cannot say anything about the implications of including this predictor versus not.

Best,
Wolfgang

-----Original Message-----
From: Rafael Rios [mailto:biorafaelrm at gmail.com] 
Sent: Wednesday, 13 March, 2019 18:12
To: Viechtbauer, Wolfgang (SP)
Cc: Michael Dewey; r-sig-meta-analysis at r-project.org
Subject: Re: [R-meta] Different outputs by comparing random-effects model with a MLMA without intercept

ATTACHMENT(S) REMOVED: script_model.R | tree_data_without_psce.tre | full_data.csv | tree_full_data.tre | data_without_psce.csv 

Dear Wolfgang,

I am sorry for my last question without providing some data. I simulated a different situation using part of my data set. I found than the average effect size differed from zero in the subgroup "no" from variable "potential_sce" using the full data. After exclusion of data related to the subgroup "yes" from variable "potential_sce" , I conducted a random-effects MLMA and found that the average effect size did not differ from zero. Which one of the two approaches would be correct? The files follow on attached.

library(metafor)
library(ape)

### Data
h1=read.csv2('full_data.csv', dec='.')
summary(h1)

h2=read.csv2('data_without_psce.csv', dec='.')
summary(h2)

### Phylogenies and correlations
#tree_full_data
pt1<-read.tree(file=file.choose(), text=NULL, tree.names=NULL, skip=0)

corr1=vcv(pt1, corr=T)

#tree_data_without_psce
pt2<-read.tree(file=file.choose(), text=NULL, tree.names=NULL, skip=0)

corr2=vcv(pt2, corr=T)

### Models
meta1=rma.mv(zf, sezf, mods=~potential_sce-1, random = list (~1|studyID, ~1|speciesID), R=list(speciesID=corr1), data = h1)
meta1

meta2=rma.mv(zf, sezf, random = list (~1|studyID, ~1|speciesID), R=list(speciesID=corr2), data=h2)
meta2

Best wishes,

Rafael.?

__________________________________________________________

Dr. Rafael Rios Moura
scientia amabilis

Behavioral Ecologist,?Ph.D.
Postdoctoral Researcher
Universidade Estadual de Campinas (UNICAMP)
Campinas, S?o Paulo, Brazil

ORCID:?http://orcid.org/0000-0002-7911-4734
Curr?culo Lattes:?http://lattes.cnpq.br/4264357546465157
Research Gate:?https://www.researchgate.net/profile/Rafael_Rios_Moura2

Em seg, 11 de mar de 2019 ?s 05:57, Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> escreveu:
Dear Rafael,

I cannot even attempt an answer to that question without a full understanding of the problem and data that you are working with.

Best,
Wolfgang

-----Original Message-----
From: Rafael Rios [mailto:biorafaelrm at gmail.com]
Sent: Sunday, 10 March, 2019 15:02
To: Viechtbauer, Wolfgang (SP)
Cc: Michael Dewey; r-sig-meta-analysis at r-project.org
Subject: Re: [R-meta] Different outputs by comparing random-effects model with a MLMA without intercept

Thanks for the answers, Michael and Wolfgang. I suspected some effects of the random variables. Since I want to test whether the average effect size differs from zero in the data without a potential_sce bias (subgroup "no"), which of the two approaches do you recommend?

Best wishes,

Rafael.
Em dom, 10 de mar de 2019 10:40, Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> escreveu:
Dear Rafael,

Let's try this again (instead of sending an empty mail -- sorry about that!).

Indeed, the results differ because model2 estimates the variance components only based on the subset, while model1 estimates those variances based on all data. You would have to allow the variance components to differ for the "no" and "yes" levels of 'potential_sce' in 'model1' for the results to be identical. Actually, even then, I don't think you would get the exact same results, since you make use of the 'R' argument. Due to the correlation across species, the estimate (and SE) of 'potential_sceno' and 'potential_sceno' will be influenced by whatever species are included in the dataset. In the subset, certain species are not included (240 instead of 348), which is another reason why there are differences.

Best,
Wolfgang

-----Original Message-----
From: Michael Dewey [mailto:lists at dewey.myzen.co.uk]
Sent: Thursday, 07 March, 2019 18:06
To: Rafael Rios; Viechtbauer, Wolfgang (SP); r-sig-meta-analysis at r-project.org
Subject: Re: [R-meta] Different outputs by comparing random-effects model with a MLMA without intercept

Dear Rafael

I think this may be related to the issue outlined by Wolfgang in this
section of the web-site

http://www.metafor-project.org/doku.php/tips:comp_two_independent_estimates

Michael
On 07/03/2019 16:46, Rafael Rios wrote: