Skip to content
Back to formatted view

Raw Message

Message-ID: <YT3PR01MB9545B33E3B8A1C2103B7E450B7199@YT3PR01MB9545.CANPRD01.PROD.OUTLOOK.COM>
Date: 2022-03-24T12:50:43Z
From: Martineau, Roger
Subject: [R-meta] extract pval from robust function
In-Reply-To: <32f12957a9a74f05857329c953705bbd@UM-MAIL3214.unimaas.nl>

Hi Wolfgang,

Thanks for your answer, it works.

One more thing, using the dat.konstantopoulos2011 example, I asked for the fitstats of res. I need to extract the AICc value, i.e. 23.3; how can I do it ? Also, I assume that those fitstats data are valid using the robust function results; are they ?

> fitstats(res)
           REML
logLik:   -7.24
deviance: 14.48
AIC:      22.48
BIC:      30.44
AICc:     23.30

Thanks in advance, 

Roger ?

-----Original Message-----
From: Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> 
Sent: Thursday, March 24, 2022 8:17 AM
To: Martineau, Roger <roger.martineau at AGR.GC.CA>; r-sig-meta-analysis at r-project.org
Subject: RE: [R-meta] extract pval from robust function

Hi Roger,

robust(res, cluster=dat$district)$pval[2]

Use str() to find out about the structure of an object, so:

str(robust(res, cluster=dat$district))

Scanning through all that stuff will often lead to the answer.

Best,
Wolfgang

>-----Original Message-----
>From: R-sig-meta-analysis 
>[mailto:r-sig-meta-analysis-bounces at r-project.org] On Behalf Of 
>Martineau, Roger
>Sent: Thursday, 24 March, 2022 12:58
>To: r-sig-meta-analysis at r-project.org
>Subject: [R-meta] extract pval from robust function
>
>Dear list members,
>
>In this example, the p-value of year in the robust function is 0.5885; 
>what are the codes to extract that p-value ?
>
>dat <- dat.konstantopoulos2011
>res <- rma.mv(yi ~ year, vi, random = ~ 1 | district/school, data=dat) 
>robust(res, cluster=dat$district)
>
>Thanks in advance.
>
>Roger :)