# option for html output
knitr::opts_chunk$set(echo = TRUE)
## A meta-analysis combines the results of several scientic studies addressing the same question. Though, individual study measurements that are reported may have some degree of error. It is simply analysis of analyses that correspond to a shared topic. There are two different approaches in Meta-analysis viz. meta-analysis using aggregate data (AD) or individual participant data (IPD). Using an AD approach, summary data for the same outcome e.g. prevalence rate of a disease, proportions from each study, are pooled for the statistical analysis (Suvarnapathaki,2021).
rm(list=ls(all=TRUE)) #Deletes all memory content
# Call of the packages
library(readxl)
data_neumo1 <- read_excel("C:/Users/USER/Desktop/RSMA/data_neumo1.xlsx")
View(data_neumo1)
#install.packages(c("metafor", "meta"))
#install.packages("tidyverse")
library(metafor)
library(meta)
library(metadat)
library(tidyverse)
head(data_neumo1,114)
## # A tibble: 114 × 19
## Sequence code author year_…¹ contint age prev sample posit type_…² stage
## <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 RSMA01 RS001 Abdul… 2008 1 4 0.0467 107 5 2 1
## 2 RSMA02 RS001 Abdul… 2008 1 2 0.0564 195 11 2 1
## 3 RSMA03 RS001 Abdul… 2008 1 1 0.0640 406 26 2 1
## 4 RSMA04 RS002 Adeti… 2012 1 4 0.0685 482 33 1 2
## 5 RSMA05 RS002 Adeti… 2012 1 2 0.108 530 57 1 2
## 6 RSMA06 RS002 Adeti… 2012 1 1 0.260 361 94 1 2
## 7 RSMA07 RS004 Adler 2019 5 1 0.0654 795 52 1 2
## 8 RSMA08 RS010 Almei… 2014 5 4 0.0229 3361 77 1 2
## 9 RSMA09 RS015 Ansal… 2013 5 4 0.02 283 56 2 2
## 10 RSMA10 RS017 Becke… 2015 2 4 0.0190 210 4 1 2
## # … with 104 more rows, 8 more variables: comorb <dbl>, type_morb <dbl>,
## # meth_iden <dbl>, type_samp <dbl>, setting <dbl>, type_setting <dbl>,
## # type_study <dbl>, quality <dbl>, and abbreviated variable names ¹year_pub,
## # ²type_prev
glimpse(data_neumo1)
## Rows: 114
## Columns: 19
## $ Sequence <chr> "RSMA01", "RSMA02", "RSMA03", "RSMA04", "RSMA05", "RSMA06…
## $ code <chr> "RS001", "RS001", "RS001", "RS002", "RS002", "RS002", "RS…
## $ author <chr> "Abdullahi", "Abdullahi", "Abdullahi", "Adetifa", "Adetif…
## $ year_pub <dbl> 2008, 2008, 2008, 2012, 2012, 2012, 2019, 2014, 2013, 201…
## $ contint <dbl> 1, 1, 1, 1, 1, 1, 5, 5, 5, 2, 1, 2, 2, 6, 3, 3, 5, 5, 4, …
## $ age <dbl> 4, 2, 1, 4, 2, 1, 1, 4, 4, 4, 1, 4, 4, 1, 4, 4, 2, 4, 1, …
## $ prev <dbl> 0.046728972, 0.056410256, 0.064039409, 0.068464730, 0.107…
## $ sample <dbl> 107, 195, 406, 482, 530, 361, 795, 3361, 283, 210, 600, 1…
## $ posit <dbl> 5, 11, 26, 33, 57, 94, 52, 77, 56, 4, 108, 14, 41, 0, 17,…
## $ type_prev <dbl> 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, …
## $ stage <dbl> 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, …
## $ comorb <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, …
## $ type_morb <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, …
## $ meth_iden <dbl> 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 2, 1, 3, 3, 1, 1, 1, …
## $ type_samp <dbl> 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 3, 3, 1, 1, 1, 1, 1, 4, …
## $ setting <dbl> 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 4, 1, 1, 1, 1, 2, …
## $ type_setting <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 10, 1, 1, 1, 1, 7,…
## $ type_study <dbl> 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 2, 2, 4, 4, 3, …
## $ quality <dbl> 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, …
names(data_neumo1) <- c("Sequence", "code", "author", "year_pub", "contint", "age", "prev","sample", "posit", "type_prev", "stage", "comorb","type_morb","meth_iden","type_samp","setting","type_setting","type_study","quality")
glimpse(data_neumo1)
## Rows: 114
## Columns: 19
## $ Sequence <chr> "RSMA01", "RSMA02", "RSMA03", "RSMA04", "RSMA05", "RSMA06…
## $ code <chr> "RS001", "RS001", "RS001", "RS002", "RS002", "RS002", "RS…
## $ author <chr> "Abdullahi", "Abdullahi", "Abdullahi", "Adetifa", "Adetif…
## $ year_pub <dbl> 2008, 2008, 2008, 2012, 2012, 2012, 2019, 2014, 2013, 201…
## $ contint <dbl> 1, 1, 1, 1, 1, 1, 5, 5, 5, 2, 1, 2, 2, 6, 3, 3, 5, 5, 4, …
## $ age <dbl> 4, 2, 1, 4, 2, 1, 1, 4, 4, 4, 1, 4, 4, 1, 4, 4, 2, 4, 1, …
## $ prev <dbl> 0.046728972, 0.056410256, 0.064039409, 0.068464730, 0.107…
## $ sample <dbl> 107, 195, 406, 482, 530, 361, 795, 3361, 283, 210, 600, 1…
## $ posit <dbl> 5, 11, 26, 33, 57, 94, 52, 77, 56, 4, 108, 14, 41, 0, 17,…
## $ type_prev <dbl> 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, …
## $ stage <dbl> 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, …
## $ comorb <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, …
## $ type_morb <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, …
## $ meth_iden <dbl> 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 2, 1, 3, 3, 1, 1, 1, …
## $ type_samp <dbl> 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 3, 3, 1, 1, 1, 1, 1, 4, …
## $ setting <dbl> 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 4, 1, 1, 1, 1, 2, …
## $ type_setting <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 10, 1, 1, 1, 1, 7,…
## $ type_study <dbl> 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 2, 2, 4, 4, 3, …
## $ quality <dbl> 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, …
str(data_neumo1)
## tibble [114 × 19] (S3: tbl_df/tbl/data.frame)
## $ Sequence : chr [1:114] "RSMA01" "RSMA02" "RSMA03" "RSMA04" ...
## $ code : chr [1:114] "RS001" "RS001" "RS001" "RS002" ...
## $ author : chr [1:114] "Abdullahi" "Abdullahi" "Abdullahi" "Adetifa" ...
## $ year_pub : num [1:114] 2008 2008 2008 2012 2012 ...
## $ contint : num [1:114] 1 1 1 1 1 1 5 5 5 2 ...
## $ age : num [1:114] 4 2 1 4 2 1 1 4 4 4 ...
## $ prev : num [1:114] 0.0467 0.0564 0.064 0.0685 0.1075 ...
## $ sample : num [1:114] 107 195 406 482 530 ...
## $ posit : num [1:114] 5 11 26 33 57 94 52 77 56 4 ...
## $ type_prev : num [1:114] 2 2 2 1 1 1 1 1 2 1 ...
## $ stage : num [1:114] 1 1 1 2 2 2 2 2 2 2 ...
## $ comorb : num [1:114] 2 2 2 2 2 2 2 2 2 2 ...
## $ type_morb : num [1:114] 1 1 1 1 1 1 1 1 1 1 ...
## $ meth_iden : num [1:114] 1 1 1 1 1 1 1 3 2 1 ...
## $ type_samp : num [1:114] 1 1 1 1 1 1 2 3 1 1 ...
## $ setting : num [1:114] 2 2 2 2 2 2 1 2 1 2 ...
## $ type_setting: num [1:114] 1 1 1 1 1 1 1 1 1 2 ...
## $ type_study : num [1:114] 4 4 4 4 4 4 4 4 4 4 ...
## $ quality : num [1:114] 3 3 3 4 4 4 4 4 4 4 ...
summary(data_neumo1)
## Sequence code author year_pub
## Length:114 Length:114 Length:114 Min. :1997
## Class :character Class :character Class :character 1st Qu.:2010
## Mode :character Mode :character Mode :character Median :2014
## Mean :2014
## 3rd Qu.:2018
## Max. :2021
## contint age prev sample
## Min. :1.000 Min. :1.000 Min. :0.00000 Min. : 8.0
## 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:0.04428 1st Qu.: 200.0
## Median :2.000 Median :1.500 Median :0.08091 Median : 383.0
## Mean :3.053 Mean :2.149 Mean :0.10634 Mean : 704.5
## 3rd Qu.:5.000 3rd Qu.:4.000 3rd Qu.:0.11851 3rd Qu.: 642.8
## Max. :6.000 Max. :4.000 Max. :0.47544 Max. :8336.0
## posit type_prev stage comorb
## Min. : 0.00 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.: 11.00 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:2.000
## Median : 29.00 Median :1.000 Median :2.000 Median :2.000
## Mean : 85.39 Mean :1.421 Mean :1.798 Mean :1.807
## 3rd Qu.: 69.75 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000
## Max. :1868.00 Max. :3.000 Max. :3.000 Max. :2.000
## type_morb meth_iden type_samp setting
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000
## Median :1.000 Median :1.000 Median :1.000 Median :2.000
## Mean :1.684 Mean :1.281 Mean :1.737 Mean :1.711
## 3rd Qu.:1.000 3rd Qu.:1.000 3rd Qu.:3.000 3rd Qu.:2.000
## Max. :7.000 Max. :3.000 Max. :5.000 Max. :4.000
## type_setting type_study quality
## Min. : 1.000 Min. :1.000 Min. :2.000
## 1st Qu.: 1.000 1st Qu.:2.000 1st Qu.:3.000
## Median : 1.000 Median :4.000 Median :3.000
## Mean : 2.877 Mean :3.342 Mean :3.342
## 3rd Qu.: 4.000 3rd Qu.:4.000 3rd Qu.:4.000
## Max. :10.000 Max. :4.000 Max. :4.000
convert <- which(data_neumo1$prev =="age")
data_neumo1$prev[convert] <- "age"
summary(data_neumo1$prev)
## Length Class Mode
## 114 character character
par(mfrow = c(2,4))
barplot(Age <- table(data_neumo1$prev))
barplot(Age <- table(data_neumo1$sample))
barplot(Age <- table(data_neumo1$type_samp))
barplot(Age <- table(data_neumo1$comorb))
barplot(Age <- table(data_neumo1$type_morb))
barplot(Age <- table(data_neumo1$meth_iden))
par(mfrow = c(2,4))
barplot(prev <- table(data_neumo1$age))
barplot(prev <- table(data_neumo1$sample))
barplot(prev <- table(data_neumo1$type_samp))
barplot(prev <- table(data_neumo1$comorb))
barplot(prev <- table(data_neumo1$type_morb))
barplot(prev <- table(data_neumo1$meth_iden))
par(mfrow = c(1,3))
hist(data_neumo1$age)
Prev_adults <- subset(data_neumo1, prev=="1" & age=="2")
dim(Prev_adults)
## [1] 0 19
print(Prev_adults)
## # A tibble: 0 × 19
## # … with 19 variables: Sequence <chr>, code <chr>, author <chr>,
## # year_pub <dbl>, contint <dbl>, age <dbl>, prev <chr>, sample <dbl>,
## # posit <dbl>, type_prev <dbl>, stage <dbl>, comorb <dbl>, type_morb <dbl>,
## # meth_iden <dbl>, type_samp <dbl>, setting <dbl>, type_setting <dbl>,
## # type_study <dbl>, quality <dbl>
#####################################################################################################
#### Forest Plot (Effect size and grouping of the interest variable)
####
#####################################################################################################
# II. Forest Plot (pooled estimate of the parameter)
rm(list=ls(all=TRUE)) #Deletes all memory content
# Call of the packages
library(readxl)
data_neumo1 <- read_excel("C:/Users/USER/Desktop/RSMA/data_neumo1.xlsx")
View(data_neumo1)
# Forest PLot without transformation
pes.summary=metaprop(posit,sample,author,data=data_neumo1, sm="PRAW")
forest(pes.summary)
# Forest PLot with transformation loggit
pes.summary=metaprop(posit,sample,author, data=data_neumo1, sm="PLO")
forest(pes.summary)
# Forest PLot with transformation loggit
ms2s <- update(pes.summary, byvar= age, print.byvar=FALSE)
forest(ms2s)
ms2s <- update(pes.summary, byvar= sample, print.byvar=FALSE)
forest(ms2s)
ms2s <- update(pes.summary, byvar= meth_iden, print.byvar=FALSE)
forest(ms2s)
ms2s <- update(pes.summary, byvar= type_samp, print.byvar=FALSE)
forest(ms2s)
# Forest Plot d- fit
pes.summary=metaprop(posit,sample,author, data=data_neumo1, sm="PLO",
method.tau="DL", method.ci="NAsm")
forest(pes.summary,
xlim=c(0,4),
pscale=2500,
rightcols=FALSE,
leftcols=c("author", "posit", "sample", "prev", "ci"),
leftlabs=c("author", "posit", "sample", "prev", "95% C.I."),
xlab="Prevalence of CC", smlab="",
weight.study="random", squaresize=0.5, col.square="navy",
col.square.lines="navy",
col.diamond="maroon", col.diamond.lines="maroon",
pooled.totals=FALSE,
comb.fixed=FALSE,
fs.hetstat=10,
print.tau2=TRUE,
print.Q=TRUE,
print.pval.Q=TRUE,
print.I2=TRUE,
digits=2)
######################################################################################################## Heterogeneity Analysis ### #####################################################################################################
# III. Heterogeneity (variation between studies)
rm(list=ls(all=TRUE)) #Deletes all memory content
# Call of the packages
library(readxl)
data_neumo1 <- read_excel("C:/Users/USER/Desktop/RSMA/data_neumo1.xlsx")
View(data_neumo1)
# Calculation of effect size without transformation
ies=escalc(xi=posit, ni=sample, data=data_neumo1, measure="PR")
pes=rma(yi, vi, data=ies)
print(pes)
##
## Random-Effects Model (k = 114; tau^2 estimator: REML)
##
## tau^2 (estimated amount of total heterogeneity): 0.0089 (SE = 0.0012)
## tau (square root of estimated tau^2 value): 0.0943
## I^2 (total heterogeneity / total variability): 99.54%
## H^2 (total variability / sampling variability): 216.40
##
## Test for Heterogeneity:
## Q(df = 113) = 10041.1588, p-val < .0001
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## 0.1078 0.0090 11.9182 <.0001 0.0900 0.1255 ***
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Calculation of effect size - second option
ies=escalc(xi=posit, ni=sample, data=data_neumo1, measure="PLO")
pes=rma(yi, vi, data=ies)
print(pes)
##
## Random-Effects Model (k = 114; tau^2 estimator: REML)
##
## tau^2 (estimated amount of total heterogeneity): 0.8940 (SE = 0.1300)
## tau (square root of estimated tau^2 value): 0.9455
## I^2 (total heterogeneity / total variability): 98.29%
## H^2 (total variability / sampling variability): 58.32
##
## Test for Heterogeneity:
## Q(df = 113) = 6139.8997, p-val < .0001
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## -2.3800 0.0933 -25.5193 <.0001 -2.5627 -2.1972 ***
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Calculation of effect size with transformation logit
ies.logit=escalc(xi=posit, ni=sample, data=data_neumo1, measure="PLO")
pes.logit=rma(yi, vi, data=ies.logit)
pes=predict(pes.logit, transf=transf.ilogit)
print(pes)
##
## pred ci.lb ci.ub pi.lb pi.ub
## 0.0847 0.0716 0.1000 0.0142 0.3734
# Calculation of effect size with transformation logit - second option
pes.logit=rma(yi, vi, data=ies, method="DL")
pes=predict(pes.logit, transf=transf.ilogit)
transf=transf.ilogit
print(pes)
##
## pred ci.lb ci.ub pi.lb pi.ub
## 0.0851 0.0723 0.0999 0.0152 0.3592
# Calculation of effect size without transformation
#(adjustments to proportions close to 0)
ies.logit=escalc(xi=posit, ni=sample, measure="PLO", data=data_neumo1)
pes.logit=rma(yi, vi, data=ies.logit, method="DL", level=95)
pes=predict(pes.logit, transf=transf.ilogit)
print(pes, digits=6)
##
## pred ci.lb ci.ub pi.lb pi.ub
## 0.085092 0.072301 0.099903 0.015196 0.359216
# Heterogeneity calculation
print(pes.logit, digits=4)
##
## Random-Effects Model (k = 114; tau^2 estimator: DL)
##
## tau^2 (estimated amount of total heterogeneity): 0.8318 (SE = 0.2624)
## tau (square root of estimated tau^2 value): 0.9121
## I^2 (total heterogeneity / total variability): 98.16%
## H^2 (total variability / sampling variability): 54.34
##
## Test for Heterogeneity:
## Q(df = 113) = 6139.8997, p-val < .0001
##
## Model Results:
##
## estimate se zval pval ci.lb ci.ub
## -2.3751 0.0902 -26.3312 <.0001 -2.5519 -2.1983 ***
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
confint(pes.logit, digits=2)
##
## estimate ci.lb ci.ub
## tau^2 0.83 0.77 1.49
## tau 0.91 0.88 1.22
## I^2(%) 98.16 98.03 98.97
## H^2 54.34 50.64 96.68
# IV. Sensitivity Analysis (variation between studies)
rm(list=ls(all=TRUE)) #Deletes all memory content
# Call of the packages
library(readxl)
data_neumo1 <- read_excel("C:/Users/USER/Desktop/RSMA/data_neumo1.xlsx")
View(data_neumo1)
# transformation data
ies.logit=escalc(xi=posit, ni=sample, data=data_neumo1, measure="PLO")
pes.logit=rma(yi, vi, data=ies.logit)
pes=predict(pes.logit, transf=transf.ilogit)
print(pes)
##
## pred ci.lb ci.ub pi.lb pi.ub
## 0.0847 0.0716 0.1000 0.0142 0.3734
# Accuracy of studies
precision=sqrt(ies.logit$vi)
1/sqrt(ies.logit$vi)
## [1] 2.1831984 3.2217212 4.9330493 5.5444264 7.1323076 8.3380781
## [7] 6.9712798 8.6738654 6.7021435 1.9808608 9.4106323 3.4698703
## [13] 4.9183331 0.7058246 4.0776926 3.8229211 2.2259178 2.8031163
## [19] 6.0777968 8.5127864 11.6055385 5.4784187 2.0000000 0.9701425
## [25] 3.1495465 4.2426407 2.3299295 2.1612618 0.6871843 3.1901208
## [31] 0.7068421 6.3228802 6.0801994 4.9901088 3.7994855 5.9803600
## [37] 8.7302309 31.8608701 9.6303222 4.9790470 17.2146922 2.8618176
## [43] 3.4292272 3.6115756 3.6115756 7.8408211 7.9983086 4.1699392
## [49] 5.2669743 2.4354792 13.4239708 9.0404077 10.1768744 6.5206332
## [55] 6.7631010 3.6030290 17.9881944 10.3692527 11.0705058 9.5767338
## [61] 14.4016579 7.3476497 5.0584278 7.3048641 11.2570533 5.6655701
## [67] 2.4071323 2.7610740 2.9195084 5.4195190 5.2541777 6.8668098
## [73] 4.1623311 9.6778661 33.8658477 0.9984114 0.7065471 3.8094528
## [79] 4.9646752 6.7019317 2.7519690 1.6916082 1.6903085 1.7190113
## [85] 2.4124676 4.4249294 16.1063465 14.8776905 5.5646994 2.6261287
## [91] 8.7316908 8.6075207 6.5553201 6.4462434 7.9524619 11.2668996
## [97] 20.6392747 3.3792536 7.4311355 4.8068764 3.1080322 6.5186266
## [103] 5.1164296 2.2186934 5.6690816 0.7067566 4.5869034 7.7907062
## [109] 8.0617879 3.3752637 4.5496071 3.4248100 3.0410722 4.2209113
sortvar=precision
pes.summary=metaprop(posit, sample, author, data=data_neumo1, sm="PLO")
forest(pes.summary)
# Outliers
stud.res=rstudent(pes.logit)
abs.z=abs(stud.res$z)
stud.res[order(-abs.z)]
##
## resid se z
## 31 -4.8329 1.6968 -2.8483
## 106 -4.5519 1.6978 -2.6810
## 96 2.3001 0.9282 2.4780
## 76 -3.3868 1.3705 -2.4712
## 77 -4.0808 1.6995 -2.4011
## 21 2.1225 0.9329 2.2752
## 17 -2.3364 1.0327 -2.2623
## 97 2.0055 0.9329 2.1496
## 13 2.0324 0.9549 2.1285
## 75 1.9324 0.9339 2.0691
## 50 -2.1017 1.0197 -2.0610
## 56 1.9134 0.9773 1.9579
## 14 -3.2473 1.7029 -1.9069
## 99 1.7076 0.9488 1.7998
## 104 -1.7883 1.0424 -1.7154
## 62 -1.6139 0.9481 -1.7023
## 55 1.5795 0.9534 1.6568
## 84 -1.8186 1.1072 -1.6425
## 18 -1.6450 1.0060 -1.6352
## 43 -1.5249 0.9858 -1.5468
## 114 1.4844 0.9735 1.5248
## 15 -1.4329 0.9742 -1.4710
## 10 -1.5744 1.0705 -1.4708
## 8 -1.3874 0.9496 -1.4611
## 22 1.3874 0.9628 1.4409
## 53 1.3475 0.9507 1.4174
## 6 1.3483 0.9532 1.4144
## 52 1.3306 0.9524 1.3971
## 16 -1.2680 0.9811 -1.2924
## 32 1.1017 0.9624 1.1448
## 85 -1.1054 1.0353 -1.0677
## 78 -1.0217 0.9845 -1.0378
## 9 0.9898 0.9623 1.0286
## 54 0.9891 0.9629 1.0271
## 20 0.9703 0.9580 1.0128
## 101 -0.9750 1.0027 -0.9724
## 23 1.0015 1.0748 0.9318
## 67 -0.9661 1.0369 -0.9317
## 11 0.8722 0.9577 0.9107
## 72 -0.8681 0.9615 -0.9029
## 73 -0.8732 0.9804 -0.8906
## 35 -0.8704 0.9864 -0.8825
## 94 0.7945 0.9651 0.8232
## 80 0.7895 0.9642 0.8188
## 64 0.7751 0.9625 0.8053
## 49 -0.7191 0.9708 -0.7408
## 93 0.7095 0.9654 0.7349
## 107 -0.7133 0.9767 -0.7303
## 102 0.6532 0.9660 0.6762
## 95 0.6151 0.9622 0.6392
## 68 -0.6332 1.0192 -0.6213
## 38 0.5867 0.9547 0.6146
## 1 -0.6403 1.0570 -0.6057
## 98 -0.6039 0.9979 -0.6052
## 61 0.5656 0.9568 0.5911
## 82 -0.6528 1.1210 -0.5824
## 12 0.5703 0.9967 0.5722
## 110 -0.5557 0.9983 -0.5567
## 83 -0.6198 1.1214 -0.5527
## 79 -0.5276 0.9746 -0.5413
## 90 0.5526 1.0272 0.5379
## 70 -0.5166 0.9714 -0.5318
## 69 -0.5081 1.0132 -0.5015
## 44 0.4878 0.9939 0.4908
## 45 0.4878 0.9939 0.4908
## 81 -0.5002 1.0204 -0.4902
## 105 -0.4726 0.9701 -0.4872
## 66 -0.4500 0.9703 -0.4638
## 2 -0.4404 1.0032 -0.4390
## 109 -0.4094 0.9624 -0.4254
## 36 -0.3958 0.9690 -0.4084
## 111 -0.3899 0.9794 -0.3981
## 58 0.3793 0.9601 0.3951
## 41 0.3730 0.9571 0.3897
## 37 0.3309 0.9622 0.3439
## 88 0.3037 0.9579 0.3171
## 3 -0.3043 0.9761 -0.3117
## 34 0.2996 0.9762 0.3069
## 60 0.2884 0.9612 0.3000
## 86 0.2926 0.9817 0.2981
## 7 -0.2815 0.9657 -0.2915
## 87 0.2777 0.9576 0.2900
## 51 0.2710 0.9585 0.2828
## 24 -0.3941 1.4034 -0.2808
## 5 0.2672 0.9658 0.2767
## 108 0.2659 0.9642 0.2758
## 29 -0.4544 1.7387 -0.2613
## 28 -0.2749 1.0605 -0.2592
## 4 -0.2320 0.9720 -0.2387
## 91 0.2188 0.9625 0.2274
## 59 -0.1843 0.9597 -0.1920
## 26 0.1852 0.9841 0.1882
## 19 0.1744 0.9697 0.1798
## 39 -0.1688 0.9611 -0.1756
## 33 0.1663 0.9697 0.1715
## 25 0.1649 1.0067 0.1638
## 112 0.1596 0.9990 0.1597
## 103 0.1548 0.9754 0.1587
## 92 0.1451 0.9628 0.1507
## 65 -0.1325 0.9597 -0.1380
## 30 -0.1353 1.0052 -0.1346
## 113 -0.1301 1.0101 -0.1288
## 100 -0.1219 0.9778 -0.1246
## 27 0.1304 1.0469 0.1245
## 57 0.1117 0.9575 0.1167
## 74 0.0760 0.9614 0.0790
## 71 -0.0651 0.9744 -0.0668
## 42 0.0676 1.0171 0.0665
## 89 0.0583 0.9725 0.0600
## 40 -0.0375 0.9765 -0.0384
## 46 -0.0296 0.9642 -0.0307
## 63 0.0194 0.9759 0.0199
## 47 0.0187 0.9639 0.0194
## 48 0.0022 0.9852 0.0022
# Influence of outliers
L1O=leave1out(pes.logit, transf=transf.ilogit); print(L1O)
##
## estimate zval pval ci.lb ci.ub Q Qp tau2 I2
## 1 0.0851 -25.3063 0.0000 0.0718 0.1005 6131.4779 0.0000 0.8987 98.3078
## 2 0.0850 -25.2763 0.0000 0.0717 0.1004 6126.6199 0.0000 0.9012 98.3111
## 3 0.0849 -25.2608 0.0000 0.0716 0.1004 6115.7120 0.0000 0.9029 98.3108
## 4 0.0848 -25.2590 0.0000 0.0716 0.1003 6113.5583 0.0000 0.9035 98.3104
## 5 0.0845 -25.2987 0.0000 0.0712 0.0999 6130.4595 0.0000 0.9042 98.3069
## 6 0.0838 -25.6397 0.0000 0.0708 0.0989 6110.9155 0.0000 0.8856 98.2673
## 7 0.0849 -25.2553 0.0000 0.0716 0.1003 6093.6187 0.0000 0.9032 98.3056
## 8 0.0858 -25.4302 0.0000 0.0726 0.1013 5815.4783 0.0000 0.8798 98.2548
## 9 0.0840 -25.4864 0.0000 0.0709 0.0992 6136.1755 0.0000 0.8949 98.2910
## 10 0.0857 -25.4394 0.0000 0.0725 0.1011 6119.9387 0.0000 0.8824 98.2773
## 11 0.0840 -25.4461 0.0000 0.0709 0.0993 6137.2999 0.0000 0.8972 98.2846
## 12 0.0843 -25.3667 0.0000 0.0711 0.0996 6139.7003 0.0000 0.9015 98.3112
## 13 0.0834 -26.0122 0.0000 0.0706 0.0983 6097.4426 0.0000 0.8619 98.2320
## 14 0.0855 -25.5039 0.0000 0.0723 0.1009 6132.2044 0.0000 0.8838 98.2809
## 15 0.0858 -25.4345 0.0000 0.0726 0.1012 6065.5634 0.0000 0.8802 98.2699
## 16 0.0857 -25.3876 0.0000 0.0724 0.1011 6084.2701 0.0000 0.8854 98.2804
## 17 0.0864 -25.6978 0.0000 0.0732 0.1017 6095.0306 0.0000 0.8563 98.2255
## 18 0.0859 -25.4833 0.0000 0.0727 0.1013 6097.4579 0.0000 0.8762 98.2643
## 19 0.0845 -25.2872 0.0000 0.0713 0.1000 6129.8120 0.0000 0.9044 98.3107
## 20 0.0840 -25.4803 0.0000 0.0709 0.0993 6134.6604 0.0000 0.8952 98.2849
## 21 0.0834 -26.1239 0.0000 0.0706 0.0982 5866.6536 0.0000 0.8545 98.1887
## 22 0.0838 -25.6500 0.0000 0.0708 0.0989 6125.8946 0.0000 0.8850 98.2760
## 23 0.0841 -25.4736 0.0000 0.0710 0.0994 6139.5385 0.0000 0.8964 98.3037
## 24 0.0848 -25.3905 0.0000 0.0716 0.1002 6138.7897 0.0000 0.8983 98.3079
## 25 0.0845 -25.3028 0.0000 0.0713 0.1000 6137.1040 0.0000 0.9037 98.3158
## 26 0.0845 -25.2953 0.0000 0.0713 0.0999 6135.1971 0.0000 0.9041 98.3146
## 27 0.0846 -25.3157 0.0000 0.0714 0.1000 6138.1680 0.0000 0.9030 98.3156
## 28 0.0848 -25.2994 0.0000 0.0716 0.1003 6135.5332 0.0000 0.9018 98.3136
## 29 0.0848 -25.4336 0.0000 0.0716 0.1002 6139.2789 0.0000 0.8968 98.3053
## 30 0.0848 -25.2786 0.0000 0.0715 0.1002 6132.9122 0.0000 0.9034 98.3152
## 31 0.0860 -25.6417 0.0000 0.0728 0.1013 6124.7300 0.0000 0.8691 98.2523
## 32 0.0839 -25.5285 0.0000 0.0708 0.0991 6133.5285 0.0000 0.8924 98.2876
## 33 0.0845 -25.2861 0.0000 0.0713 0.1000 6129.4913 0.0000 0.9045 98.3107
## 34 0.0844 -25.3083 0.0000 0.0712 0.0998 6135.9582 0.0000 0.9038 98.3125
## 35 0.0853 -25.3088 0.0000 0.0720 0.1008 6104.8864 0.0000 0.8949 98.2984
## 36 0.0850 -25.2588 0.0000 0.0717 0.1004 6097.5290 0.0000 0.9021 98.3066
## 37 0.0844 -25.3079 0.0000 0.0712 0.0998 6129.5739 0.0000 0.9039 98.3002
## 38 0.0842 -25.3611 0.0000 0.0711 0.0996 6125.0128 0.0000 0.9016 98.0731
## 39 0.0848 -25.2546 0.0000 0.0715 0.1002 6070.2736 0.0000 0.9041 98.2966
## 40 0.0847 -25.2696 0.0000 0.0714 0.1001 6126.6019 0.0000 0.9043 98.3133
## 41 0.0844 -25.3136 0.0000 0.0712 0.0998 6107.4113 0.0000 0.9037 98.2466
## 42 0.0846 -25.2975 0.0000 0.0714 0.1000 6136.6771 0.0000 0.9036 98.3160
## 43 0.0859 -25.4572 0.0000 0.0726 0.1013 6082.7180 0.0000 0.8782 98.2673
## 44 0.0843 -25.3487 0.0000 0.0711 0.0997 6139.3211 0.0000 0.9023 98.3124
## 45 0.0843 -25.3487 0.0000 0.0711 0.0997 6139.3211 0.0000 0.9023 98.3124
## 46 0.0847 -25.2637 0.0000 0.0714 0.1001 6107.4724 0.0000 0.9046 98.3050
## 47 0.0846 -25.2674 0.0000 0.0714 0.1001 6110.4621 0.0000 0.9047 98.3046
## 48 0.0847 -25.2769 0.0000 0.0714 0.1001 6131.5570 0.0000 0.9042 98.3149
## 49 0.0852 -25.2840 0.0000 0.0719 0.1007 6084.8674 0.0000 0.8975 98.3001
## 50 0.0862 -25.6253 0.0000 0.0730 0.1016 6094.1751 0.0000 0.8627 98.2382
## 51 0.0845 -25.2961 0.0000 0.0712 0.0999 6106.4687 0.0000 0.9043 98.2759
## 52 0.0838 -25.6321 0.0000 0.0708 0.0989 6107.6173 0.0000 0.8860 98.2652
## 53 0.0838 -25.6414 0.0000 0.0708 0.0989 6096.6428 0.0000 0.8854 98.2586
## 54 0.0840 -25.4860 0.0000 0.0709 0.0992 6136.3939 0.0000 0.8949 98.2917
## 55 0.0836 -25.7545 0.0000 0.0707 0.0987 6104.8789 0.0000 0.8784 98.2592
## 56 0.0835 -25.8994 0.0000 0.0707 0.0985 6121.0223 0.0000 0.8695 98.2499
## 57 0.0846 -25.2734 0.0000 0.0713 0.1000 6024.8936 0.0000 0.9048 98.2421
## 58 0.0844 -25.3160 0.0000 0.0712 0.0998 6128.8492 0.0000 0.9036 98.2922
## 59 0.0848 -25.2534 0.0000 0.0715 0.1003 6044.2123 0.0000 0.9040 98.2893
## 60 0.0844 -25.3001 0.0000 0.0712 0.0999 6124.4170 0.0000 0.9042 98.2970
## 61 0.0842 -25.3562 0.0000 0.0711 0.0996 6136.0889 0.0000 0.9019 98.2647
## 62 0.0860 -25.5105 0.0000 0.0728 0.1014 5854.7467 0.0000 0.8718 98.2442
## 63 0.0846 -25.2736 0.0000 0.0714 0.1001 6128.2079 0.0000 0.9044 98.3133
## 64 0.0841 -25.4151 0.0000 0.0710 0.0994 6139.6044 0.0000 0.8989 98.2964
## 65 0.0848 -25.2552 0.0000 0.0715 0.1002 6052.1519 0.0000 0.9043 98.2888
## 66 0.0850 -25.2615 0.0000 0.0717 0.1005 6098.0397 0.0000 0.9015 98.3064
## 67 0.0853 -25.3322 0.0000 0.0721 0.1008 6124.0851 0.0000 0.8938 98.2986
## 68 0.0851 -25.2929 0.0000 0.0718 0.1006 6126.5737 0.0000 0.8989 98.3075
## 69 0.0850 -25.2832 0.0000 0.0717 0.1005 6127.6635 0.0000 0.9004 98.3101
## 70 0.0851 -25.2657 0.0000 0.0718 0.1005 6097.0543 0.0000 0.9006 98.3055
## 71 0.0847 -25.2667 0.0000 0.0714 0.1002 6123.9576 0.0000 0.9043 98.3126
## 72 0.0854 -25.3028 0.0000 0.0721 0.1008 6025.4433 0.0000 0.8945 98.2898
## 73 0.0853 -25.3078 0.0000 0.0720 0.1008 6097.7231 0.0000 0.8947 98.2974
## 74 0.0846 -25.2715 0.0000 0.0713 0.1000 6103.5913 0.0000 0.9048 98.2976
## 75 0.0834 -25.9940 0.0000 0.0706 0.0983 4123.3113 0.0000 0.8628 97.9583
## 76 0.0861 -25.6409 0.0000 0.0729 0.1014 6123.4444 0.0000 0.8667 98.2474
## 77 0.0858 -25.5680 0.0000 0.0726 0.1011 6128.5852 0.0000 0.8767 98.2672
## 78 0.0854 -25.3338 0.0000 0.0722 0.1009 6097.6044 0.0000 0.8916 98.2923
## 79 0.0851 -25.2678 0.0000 0.0718 0.1005 6103.3109 0.0000 0.9005 98.3063
## 80 0.0841 -25.4195 0.0000 0.0710 0.0994 6139.5464 0.0000 0.8987 98.2981
## 81 0.0850 -25.2858 0.0000 0.0717 0.1005 6129.1700 0.0000 0.9004 98.3104
## 82 0.0850 -25.3266 0.0000 0.0718 0.1005 6134.7455 0.0000 0.8984 98.3077
## 83 0.0850 -25.3254 0.0000 0.0718 0.1005 6135.0019 0.0000 0.8987 98.3082
## 84 0.0858 -25.4810 0.0000 0.0726 0.1012 6121.4548 0.0000 0.8789 98.2708
## 85 0.0854 -25.3527 0.0000 0.0722 0.1009 6121.2500 0.0000 0.8912 98.2936
## 86 0.0844 -25.3095 0.0000 0.0712 0.0999 6136.6950 0.0000 0.9038 98.3136
## 87 0.0844 -25.2967 0.0000 0.0712 0.0999 6092.7519 0.0000 0.9043 98.2567
## 88 0.0844 -25.3013 0.0000 0.0712 0.0998 6104.6502 0.0000 0.9042 98.2656
## 89 0.0846 -25.2754 0.0000 0.0714 0.1001 6127.3125 0.0000 0.9045 98.3122
## 90 0.0843 -25.3700 0.0000 0.0711 0.0997 6139.7528 0.0000 0.9014 98.3123
## 91 0.0845 -25.2899 0.0000 0.0713 0.0999 6122.3553 0.0000 0.9045 98.3012
## 92 0.0845 -25.2801 0.0000 0.0713 0.1000 6117.2375 0.0000 0.9047 98.3021
## 93 0.0842 -25.3960 0.0000 0.0710 0.0995 6139.8962 0.0000 0.8999 98.3009
## 94 0.0841 -25.4210 0.0000 0.0710 0.0994 6139.5353 0.0000 0.8986 98.2987
## 95 0.0842 -25.3700 0.0000 0.0710 0.0996 6139.4434 0.0000 0.9012 98.2984
## 96 0.0833 -26.2647 0.0000 0.0706 0.0980 5814.2283 0.0000 0.8453 98.1715
## 97 0.0834 -26.0442 0.0000 0.0706 0.0983 5383.0439 0.0000 0.8596 98.1253
## 98 0.0851 -25.2828 0.0000 0.0718 0.1006 6120.8024 0.0000 0.8993 98.3074
## 99 0.0836 -25.8305 0.0000 0.0707 0.0986 6084.3226 0.0000 0.8735 98.2473
## 100 0.0847 -25.2654 0.0000 0.0715 0.1002 6124.5153 0.0000 0.9040 98.3131
## 101 0.0854 -25.3280 0.0000 0.0721 0.1008 6113.2571 0.0000 0.8931 98.2962
## 102 0.0842 -25.3807 0.0000 0.0710 0.0995 6139.8064 0.0000 0.9007 98.3024
## 103 0.0845 -25.2874 0.0000 0.0713 0.1000 6132.2195 0.0000 0.9044 98.3131
## 104 0.0859 -25.5046 0.0000 0.0727 0.1013 6109.9472 0.0000 0.8750 98.2627
## 105 0.0850 -25.2625 0.0000 0.0717 0.1005 6096.3240 0.0000 0.9012 98.3059
## 106 0.0859 -25.6124 0.0000 0.0727 0.1012 6126.2358 0.0000 0.8721 98.2581
## 107 0.0852 -25.2854 0.0000 0.0719 0.1007 6098.5359 0.0000 0.8976 98.3019
## 108 0.0845 -25.2978 0.0000 0.0712 0.0999 6128.5545 0.0000 0.9042 98.3046
## 109 0.0850 -25.2560 0.0000 0.0717 0.1005 6060.6732 0.0000 0.9020 98.2995
## 110 0.0851 -25.2797 0.0000 0.0718 0.1005 6122.2290 0.0000 0.8999 98.3086
## 111 0.0849 -25.2637 0.0000 0.0717 0.1004 6115.6821 0.0000 0.9020 98.3101
## 112 0.0845 -25.2988 0.0000 0.0713 0.1000 6136.5266 0.0000 0.9039 98.3157
## 113 0.0847 -25.2811 0.0000 0.0715 0.1002 6133.6295 0.0000 0.9033 98.3153
## 114 0.0837 -25.6857 0.0000 0.0707 0.0988 6129.0787 0.0000 0.8829 98.2750
## H2
## 1 59.0950
## 2 59.2118
## 3 59.1995
## 4 59.1854
## 5 59.0621
## 6 57.7128
## 7 59.0186
## 8 57.2989
## 9 58.5143
## 10 58.0491
## 11 58.2970
## 12 59.2143
## 13 56.5626
## 14 58.1708
## 15 57.8017
## 16 58.1542
## 17 56.3544
## 18 57.6135
## 19 59.1951
## 20 58.3060
## 21 55.2089
## 22 58.0037
## 23 58.9512
## 24 59.0994
## 25 59.3766
## 26 59.3341
## 27 59.3699
## 28 59.2965
## 29 59.0063
## 30 59.3530
## 31 57.2175
## 32 58.3969
## 33 59.1960
## 34 59.2580
## 35 58.7667
## 36 59.0542
## 37 58.8321
## 38 51.8981
## 39 58.7052
## 40 59.2878
## 41 57.0336
## 42 59.3831
## 43 57.7150
## 44 59.2573
## 45 59.2573
## 46 58.9974
## 47 58.9823
## 48 59.3434
## 49 58.8266
## 50 56.7613
## 51 58.0007
## 52 57.6422
## 53 57.4264
## 54 58.5362
## 55 57.4460
## 56 57.1383
## 57 56.8874
## 58 58.5533
## 59 58.4543
## 60 58.7197
## 61 57.6262
## 62 56.9540
## 63 59.2884
## 64 58.7009
## 65 58.4378
## 66 59.0449
## 67 58.7739
## 68 59.0828
## 69 59.1749
## 70 59.0137
## 71 59.2621
## 72 58.4713
## 73 58.7333
## 74 58.7399
## 75 48.9791
## 76 57.0593
## 77 57.7090
## 78 58.5588
## 79 59.0425
## 80 58.7569
## 81 59.1846
## 82 59.0904
## 83 59.1098
## 84 57.8288
## 85 58.6030
## 86 59.2987
## 87 57.3622
## 88 57.6578
## 89 59.2496
## 90 59.2508
## 91 58.8665
## 92 58.8967
## 93 58.8535
## 94 58.7800
## 95 58.7678
## 96 54.6909
## 97 53.3430
## 98 59.0799
## 99 57.0550
## 100 59.2820
## 101 58.6911
## 102 58.9082
## 103 59.2809
## 104 57.5599
## 105 59.0271
## 106 57.4091
## 107 58.8910
## 108 58.9821
## 109 58.8050
## 110 59.1209
## 111 59.1762
## 112 59.3715
## 113 59.3564
## 114 57.9693
# Weight of influence of outliers
inf=influence(pes.logit)
print(inf); plot(inf)
##
## rstudent dffits cook.d cov.r tau2.del QE.del hat weight dfbs inf
## 1 -0.6057 -0.0502 0.0025 1.0129 0.8987 6131.4779 0.0079 0.7880 -0.0502
## 2 -0.4390 -0.0355 0.0013 1.0165 0.9012 6126.6199 0.0088 0.8783 -0.0355
## 3 -0.3117 -0.0231 0.0005 1.0187 0.9029 6115.7120 0.0093 0.9302 -0.0231
## 4 -0.2387 -0.0156 0.0002 1.0195 0.9035 6113.5583 0.0094 0.9388 -0.0156
## 5 0.2767 0.0353 0.0013 1.0203 0.9042 6130.4595 0.0095 0.9520 0.0353
## 6 1.4144 0.1323 0.0173 1.0009 0.8856 6110.9155 0.0096 0.9575 0.1323
## 7 -0.2915 -0.0212 0.0005 1.0193 0.9032 6093.6187 0.0095 0.9510 -0.0212
## 8 -1.4611 -0.1555 0.0238 0.9949 0.8798 5815.4783 0.0096 0.9587 -0.1554
## 9 1.0286 0.1015 0.0103 1.0106 0.8949 6136.1755 0.0095 0.9493 0.1015
## 10 -1.4708 -0.1376 0.0188 0.9955 0.8824 6119.9387 0.0076 0.7571 -0.1378
## 11 0.9107 0.0923 0.0085 1.0131 0.8972 6137.2999 0.0096 0.9608 0.0923
## 12 0.5722 0.0603 0.0037 1.0169 0.9015 6139.7003 0.0089 0.8902 0.0602
## 13 2.1285 0.1796 0.0312 0.9758 0.8619 6097.4426 0.0093 0.9299 0.1795
## 14 -1.9069 -0.1121 0.0125 0.9924 0.8838 6132.2044 0.0030 0.2998 -0.1125
## 15 -1.4710 -0.1524 0.0229 0.9948 0.8802 6065.5634 0.0091 0.9116 -0.1524
## 16 -1.2924 -0.1304 0.0169 1.0001 0.8854 6084.2701 0.0090 0.9038 -0.1304
## 17 -2.2623 -0.2330 0.0524 0.9685 0.8563 6095.0306 0.0079 0.7937 -0.2336
## 18 -1.6352 -0.1660 0.0271 0.9899 0.8762 6097.4579 0.0085 0.8517 -0.1661
## 19 0.1798 0.0259 0.0007 1.0205 0.9044 6129.8120 0.0094 0.9443 0.0259
## 20 1.0128 0.1006 0.0101 1.0110 0.8952 6134.6604 0.0096 0.9581 0.1006
## 21 2.2752 0.1918 0.0352 0.9683 0.8545 5866.6536 0.0096 0.9649 0.1915
## 22 1.4409 0.1330 0.0175 1.0001 0.8850 6125.8946 0.0094 0.9380 0.1330
## 23 0.9318 0.0835 0.0070 1.0102 0.8964 6139.5385 0.0076 0.7603 0.0835
## 24 -0.2808 -0.0154 0.0002 1.0090 0.8983 6138.7897 0.0044 0.4446 -0.0153
## 25 0.1638 0.0232 0.0005 1.0190 0.9037 6137.1040 0.0087 0.8743 0.0232
## 26 0.1882 0.0262 0.0007 1.0199 0.9041 6135.1971 0.0092 0.9160 0.0262
## 27 0.1245 0.0185 0.0003 1.0176 0.9030 6138.1680 0.0081 0.8067 0.0185
## 28 -0.2592 -0.0168 0.0003 1.0161 0.9018 6135.5332 0.0078 0.7850 -0.0168
## 29 -0.2613 -0.0118 0.0001 1.0058 0.8968 6139.2789 0.0029 0.2888 -0.0118
## 30 -0.1346 -0.0051 0.0000 1.0187 0.9034 6132.9122 0.0088 0.8766 -0.0051
## 31 -2.8483 -0.1741 0.0300 0.9771 0.8691 6124.7300 0.0030 0.3004 -0.1756
## 32 1.1448 0.1107 0.0122 1.0080 0.8924 6133.5285 0.0095 0.9465 0.1107
## 33 0.1715 0.0251 0.0006 1.0205 0.9045 6129.4913 0.0094 0.9444 0.0251
## 34 0.3069 0.0376 0.0014 1.0198 0.9038 6135.9582 0.0093 0.9311 0.0376
## 35 -0.8825 -0.0835 0.0070 1.0101 0.8949 6104.8864 0.0090 0.9030 -0.0835
## 36 -0.4084 -0.0333 0.0011 1.0181 0.9021 6097.5290 0.0094 0.9434 -0.0333
## 37 0.3439 0.0418 0.0018 1.0201 0.9039 6129.5739 0.0096 0.9589 0.0418
## 38 0.6146 0.0670 0.0045 1.0179 0.9016 6125.0128 0.0097 0.9719 0.0670
## 39 -0.1756 -0.0092 0.0001 1.0203 0.9041 6070.2736 0.0096 0.9613 -0.0092
## 40 -0.0384 0.0045 0.0000 1.0202 0.9043 6126.6019 0.0093 0.9309 0.0045
## 41 0.3897 0.0463 0.0022 1.0200 0.9037 6107.4113 0.0097 0.9693 0.0463
## 42 0.0665 0.0139 0.0002 1.0187 0.9036 6136.6771 0.0086 0.8560 0.0139
## 43 -1.5468 -0.1593 0.0250 0.9925 0.8782 6082.7180 0.0089 0.8884 -0.1593
## 44 0.4908 0.0533 0.0029 1.0178 0.9023 6139.3211 0.0090 0.8961 0.0533
## 45 0.4908 0.0533 0.0029 1.0178 0.9023 6139.3211 0.0090 0.8961 0.0533
## 46 -0.0307 0.0055 0.0000 1.0208 0.9046 6107.4724 0.0096 0.9555 0.0055
## 47 0.0194 0.0104 0.0001 1.0209 0.9047 6110.4621 0.0096 0.9562 0.0104
## 48 0.0022 0.0084 0.0001 1.0199 0.9042 6131.5570 0.0091 0.9141 0.0084
## 49 -0.7408 -0.0691 0.0048 1.0132 0.8975 6084.8674 0.0094 0.9352 -0.0691
## 50 -2.0610 -0.2127 0.0439 0.9755 0.8627 6094.1751 0.0082 0.8186 -0.2131
## 51 0.2828 0.0362 0.0013 1.0206 0.9043 6106.4687 0.0097 0.9669 0.0362
## 52 1.3971 0.1312 0.0171 1.0014 0.8860 6107.6173 0.0096 0.9598 0.1311
## 53 1.4174 0.1329 0.0175 1.0008 0.8854 6096.6428 0.0096 0.9625 0.1328
## 54 1.0271 0.1013 0.0103 1.0106 0.8949 6136.3939 0.0095 0.9480 0.1013
## 55 1.6568 0.1496 0.0220 0.9933 0.8784 6104.8789 0.0095 0.9497 0.1495
## 56 1.9579 0.1658 0.0268 0.9834 0.8695 6121.0223 0.0090 0.8957 0.1658
## 57 0.1167 0.0202 0.0004 1.0212 0.9048 6024.8936 0.0097 0.9696 0.0202
## 58 0.3951 0.0466 0.0022 1.0199 0.9036 6128.8492 0.0096 0.9629 0.0467
## 59 -0.1920 -0.0109 0.0001 1.0203 0.9040 6044.2123 0.0096 0.9641 -0.0109
## 60 0.3000 0.0377 0.0014 1.0204 0.9042 6124.4170 0.0096 0.9612 0.0377
## 61 0.5911 0.0647 0.0042 1.0181 0.9019 6136.0889 0.0097 0.9677 0.0647
## 62 -1.7023 -0.1856 0.0336 0.9864 0.8718 5854.7467 0.0095 0.9532 -0.1855
## 63 0.0199 0.0103 0.0001 1.0204 0.9044 6128.2079 0.0093 0.9322 0.0103
## 64 0.8053 0.0829 0.0069 1.0148 0.8989 6139.6044 0.0095 0.9530 0.0829
## 65 -0.1380 -0.0054 0.0000 1.0206 0.9043 6052.1519 0.0096 0.9644 -0.0054
## 66 -0.4638 -0.0392 0.0015 1.0174 0.9015 6098.0397 0.0094 0.9402 -0.0392
## 67 -0.9317 -0.0846 0.0072 1.0081 0.8938 6124.0851 0.0082 0.8155 -0.0846
## 68 -0.6213 -0.0535 0.0029 1.0137 0.8989 6126.5737 0.0085 0.8484 -0.0535
## 69 -0.5015 -0.0416 0.0017 1.0154 0.9004 6127.6635 0.0086 0.8601 -0.0416
## 70 -0.5318 -0.0464 0.0022 1.0165 0.9006 6097.0543 0.0094 0.9372 -0.0464
## 71 -0.0668 0.0017 0.0000 1.0202 0.9043 6123.9576 0.0094 0.9350 0.0017
## 72 -0.9029 -0.0880 0.0077 1.0102 0.8945 6025.4433 0.0095 0.9504 -0.0880
## 73 -0.8906 -0.0849 0.0072 1.0100 0.8947 6097.7231 0.0091 0.9139 -0.0849
## 74 0.0790 0.0164 0.0003 1.0210 0.9048 6103.5913 0.0096 0.9614 0.0164
## 75 2.0691 0.1794 0.0311 0.9772 0.8628 4123.3113 0.0097 0.9720 0.1792
## 76 -2.4712 -0.1878 0.0348 0.9761 0.8667 6123.4444 0.0046 0.4585 -0.1892
## 77 -2.4011 -0.1443 0.0207 0.9850 0.8767 6128.5852 0.0030 0.3002 -0.1452
## 78 -1.0378 -0.1009 0.0102 1.0067 0.8916 6097.6044 0.0090 0.9033 -0.1009
## 79 -0.5413 -0.0472 0.0022 1.0162 0.9005 6103.3109 0.0093 0.9307 -0.0473
## 80 0.8188 0.0839 0.0071 1.0145 0.8987 6139.5464 0.0095 0.9493 0.0839
## 81 -0.4902 -0.0402 0.0016 1.0153 0.9004 6129.1700 0.0085 0.8477 -0.0401
## 82 -0.5824 -0.0454 0.0021 1.0117 0.8984 6134.7455 0.0070 0.6995 -0.0454
## 83 -0.5527 -0.0427 0.0018 1.0120 0.8987 6135.0019 0.0070 0.6992 -0.0426
## 84 -1.6425 -0.1504 0.0223 0.9913 0.8789 6121.4548 0.0071 0.7058 -0.1506
## 85 -1.0677 -0.0990 0.0098 1.0054 0.8912 6121.2500 0.0082 0.8161 -0.0991
## 86 0.2981 0.0366 0.0014 1.0196 0.9038 6136.6950 0.0092 0.9204 0.0366
## 87 0.2900 0.0369 0.0014 1.0206 0.9043 6092.7519 0.0097 0.9688 0.0369
## 88 0.3171 0.0395 0.0016 1.0205 0.9042 6104.6502 0.0097 0.9680 0.0395
## 89 0.0600 0.0142 0.0002 1.0205 0.9045 6127.3125 0.0094 0.9390 0.0142
## 90 0.5379 0.0554 0.0031 1.0162 0.9014 6139.7528 0.0084 0.8371 0.0554
## 91 0.2274 0.0307 0.0010 1.0207 0.9045 6122.3553 0.0096 0.9589 0.0307
## 92 0.1507 0.0233 0.0006 1.0209 0.9047 6117.2375 0.0096 0.9585 0.0233
## 93 0.7349 0.0767 0.0059 1.0158 0.8999 6139.8962 0.0095 0.9482 0.0767
## 94 0.8232 0.0842 0.0071 1.0144 0.8986 6139.5353 0.0095 0.9474 0.0842
## 95 0.6392 0.0686 0.0047 1.0173 0.9012 6139.4434 0.0096 0.9560 0.0686
## 96 2.4780 0.2038 0.0393 0.9588 0.8453 5814.2283 0.0096 0.9644 0.2035
## 97 2.1496 0.1845 0.0327 0.9738 0.8596 5383.0439 0.0097 0.9704 0.1842
## 98 -0.6052 -0.0529 0.0028 1.0146 0.8993 6120.8024 0.0089 0.8861 -0.0529
## 99 1.7998 0.1599 0.0250 0.9882 0.8735 6084.3226 0.0095 0.9536 0.1598
## 100 -0.1246 -0.0041 0.0000 1.0199 0.9040 6124.5153 0.0093 0.9280 -0.0041
## 101 -0.9724 -0.0919 0.0084 1.0079 0.8931 6113.2571 0.0087 0.8720 -0.0919
## 102 0.6762 0.0715 0.0052 1.0166 0.9007 6139.8064 0.0095 0.9480 0.0715
## 103 0.1587 0.0237 0.0006 1.0203 0.9044 6132.2195 0.0093 0.9331 0.0237
## 104 -1.7154 -0.1686 0.0279 0.9881 0.8750 6109.9472 0.0079 0.7928 -0.1688
## 105 -0.4872 -0.0416 0.0017 1.0171 0.9012 6096.3240 0.0094 0.9402 -0.0417
## 106 -2.6810 -0.1629 0.0263 0.9802 0.8721 6126.2358 0.0030 0.3003 -0.1641
## 107 -0.7303 -0.0675 0.0046 1.0132 0.8976 6098.5359 0.0092 0.9238 -0.0675
## 108 0.2758 0.0353 0.0013 1.0204 0.9042 6128.5545 0.0096 0.9553 0.0353
## 109 -0.4254 -0.0353 0.0013 1.0181 0.9020 6060.6732 0.0096 0.9565 -0.0353
## 110 -0.5567 -0.0478 0.0023 1.0152 0.8999 6122.2290 0.0089 0.8859 -0.0478
## 111 -0.3981 -0.0320 0.0010 1.0178 0.9020 6115.6821 0.0092 0.9230 -0.0320
## 112 0.1597 0.0230 0.0005 1.0194 0.9039 6136.5266 0.0089 0.8882 0.0230
## 113 -0.1288 -0.0046 0.0000 1.0186 0.9033 6133.6295 0.0087 0.8679 -0.0046
## 114 1.5248 0.1376 0.0187 0.9977 0.8829 6129.0787 0.0092 0.9155 0.1376
# Forest Plot - visualization of outliers
#l1o=leave1out(pes)
#yi=l1o$ estimate; vi=l1o$se^2
#forest(yi, vi,
#slab=paste(data_neumo1$author, sep=","),
#refline=pes$b,
#xlab=c(ies.logit)
#print(pes.logit)
#l1o=leave1out(pes.logit)
#yi=l1o$estimate; vi=l1o$se^2
#forest(yi, vi, transf=transf.ilogit,
#slab=paste(data_neumo1$author,sep=","),
#refline=pes$pred,
#xlab="Summary proportions leaving out each study")
rm(list=ls(all=TRUE)) #Deletes all memory content
library(readxl)
data_neumo1 <- read_excel("C:/Users/USER/Desktop/RSMA/data_neumo1.xlsx")
View(data_neumo1)
# Call of the packages
#install.packages(c("metafor", "meta"))
#install.packages("PerformanceAnalytics")
library(metafor)
library(meta)
library(tidyverse)
library(metadat)
# Metaregression data structure
glimpse(data_neumo1)
## Rows: 114
## Columns: 19
## $ Sequence <chr> "RSMA01", "RSMA02", "RSMA03", "RSMA04", "RSMA05", "RSMA06…
## $ code <chr> "RS001", "RS001", "RS001", "RS002", "RS002", "RS002", "RS…
## $ author <chr> "Abdullahi", "Abdullahi", "Abdullahi", "Adetifa", "Adetif…
## $ year_pub <dbl> 2008, 2008, 2008, 2012, 2012, 2012, 2019, 2014, 2013, 201…
## $ contint <dbl> 1, 1, 1, 1, 1, 1, 5, 5, 5, 2, 1, 2, 2, 6, 3, 3, 5, 5, 4, …
## $ age <dbl> 4, 2, 1, 4, 2, 1, 1, 4, 4, 4, 1, 4, 4, 1, 4, 4, 2, 4, 1, …
## $ prev <dbl> 0.046728972, 0.056410256, 0.064039409, 0.068464730, 0.107…
## $ sample <dbl> 107, 195, 406, 482, 530, 361, 795, 3361, 283, 210, 600, 1…
## $ posit <dbl> 5, 11, 26, 33, 57, 94, 52, 77, 56, 4, 108, 14, 41, 0, 17,…
## $ type_prev <dbl> 2, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, …
## $ stage <dbl> 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, …
## $ comorb <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, …
## $ type_morb <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, …
## $ meth_iden <dbl> 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 2, 1, 3, 3, 1, 1, 1, …
## $ type_samp <dbl> 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 3, 3, 1, 1, 1, 1, 1, 4, …
## $ setting <dbl> 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 2, 4, 1, 1, 1, 1, 2, …
## $ type_setting <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 10, 1, 1, 1, 1, 7,…
## $ type_study <dbl> 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 2, 2, 4, 4, 3, …
## $ quality <dbl> 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, …
# Multicollinearity Analysis
data_neumo1[,c("prev","year_pub","age","sample","stage","type_prev","comorb","type_morb", "meth_iden","type_samp","quality")] %>% cor()
## prev year_pub age sample stage
## prev 1.00000000 0.10310418 -0.14669601 0.0905834527 0.097926321
## year_pub 0.10310418 1.00000000 0.27337796 0.1062859841 0.385707374
## age -0.14669601 0.27337796 1.00000000 -0.1299246564 0.092943947
## sample 0.09058345 0.10628598 -0.12992466 1.0000000000 0.109530359
## stage 0.09792632 0.38570737 0.09294395 0.1095303594 1.000000000
## type_prev 0.23997288 -0.27648646 -0.19831317 0.1436559956 -0.045862759
## comorb -0.12026995 -0.12263831 0.10634396 0.1525897404 0.075080440
## type_morb 0.11542366 0.19332116 -0.03889823 -0.1500740916 -0.003367930
## meth_iden -0.01252151 0.02793861 0.23635694 -0.0008169272 0.074169742
## type_samp 0.03547548 0.20328959 0.15208371 -0.0655212712 -0.000827407
## quality 0.02031117 0.10873628 0.13815777 -0.1099059245 0.110509045
## type_prev comorb type_morb meth_iden type_samp
## prev 0.23997288 -0.12026995 0.11542366 -0.0125215147 0.035475481
## year_pub -0.27648646 -0.12263831 0.19332116 0.0279386090 0.203289586
## age -0.19831317 0.10634396 -0.03889823 0.2363569416 0.152083713
## sample 0.14365600 0.15258974 -0.15007409 -0.0008169272 -0.065521271
## stage -0.04586276 0.07508044 -0.00336793 0.0741697419 -0.000827407
## type_prev 1.00000000 0.13322770 -0.11781620 -0.0121452734 -0.018265743
## comorb 0.13322770 1.00000000 -0.94364112 0.1123207495 0.206434119
## type_morb -0.11781620 -0.94364112 1.00000000 -0.0931527017 -0.208166261
## meth_iden -0.01214527 0.11232075 -0.09315270 1.0000000000 0.409617845
## type_samp -0.01826574 0.20643412 -0.20816626 0.4096178449 1.000000000
## quality -0.21004191 -0.11163024 0.08786861 -0.0268484023 0.048143408
## quality
## prev 0.02031117
## year_pub 0.10873628
## age 0.13815777
## sample -0.10990592
## stage 0.11050905
## type_prev -0.21004191
## comorb -0.11163024
## type_morb 0.08786861
## meth_iden -0.02684840
## type_samp 0.04814341
## quality 1.00000000
# Correlation graph (authors: Peterson y Carl 2020)
library(PerformanceAnalytics)
data_neumo1[,c("prev","year_pub","age","sample","stage","type_prev","comorb","type_morb", "meth_iden","type_samp","quality")] %>% chart.Correlation()
warnings()
data_neumo1[,c("prev","age","comorb","type_morb", "meth_iden","type_samp")] %>% chart.Correlation()
warnings()
# Adjusted multiple metaregression model
m.qual <- rma(yi = prev,
sei = age,
data = data_neumo1,
method = "ML",
mods = ~ quality,
test = "knha")
m.qual
##
## Mixed-Effects Model (k = 114; tau^2 estimator: ML)
##
## tau^2 (estimated amount of residual heterogeneity): 0 (SE = 0.1853)
## tau (square root of estimated tau^2 value): 0
## I^2 (residual heterogeneity / unaccounted variability): 0.00%
## H^2 (unaccounted variability / sampling variability): 1.00
## R^2 (amount of heterogeneity accounted for): 0.00%
##
## Test for Residual Heterogeneity:
## QE(df = 112) = 0.5091, p-val = 1.0000
##
## Test of Moderators (coefficient 2):
## F(df1 = 1, df2 = 112) = 9.7507, p-val = 0.0023
##
## Model Results:
##
## estimate se tval df pval ci.lb ci.ub
## intrcpt -0.0652 0.0579 -1.1272 112 0.2621 -0.1799 0.0494
## quality 0.0545 0.0175 3.1226 112 0.0023 0.0199 0.0891 **
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# fitted model with several predictors
m.qual.rep <- rma(yi = prev,
sei = age,
data = data_neumo1,
method = "ML",
mods = ~ year_pub +stage + comorb + type_prev + meth_iden + type_samp + quality,
test = "knha")
m.qual.rep
##
## Mixed-Effects Model (k = 114; tau^2 estimator: ML)
##
## tau^2 (estimated amount of residual heterogeneity): 0 (SE = 0.1853)
## tau (square root of estimated tau^2 value): 0
## I^2 (residual heterogeneity / unaccounted variability): 0.00%
## H^2 (unaccounted variability / sampling variability): 1.00
## R^2 (amount of heterogeneity accounted for): 0.00%
##
## Test for Residual Heterogeneity:
## QE(df = 106) = 0.4420, p-val = 1.0000
##
## Test of Moderators (coefficients 2:8):
## F(df1 = 7, df2 = 106) = 3.8180, p-val = 0.0010
##
## Model Results:
##
## estimate se tval df pval ci.lb ci.ub
## intrcpt -7.6557 3.4527 -2.2173 106 0.0287 -14.5010 -0.8104 *
## year_pub 0.0037 0.0017 2.1886 106 0.0308 0.0004 0.0071 *
## stage -0.0050 0.0168 -0.2981 106 0.7662 -0.0383 0.0283
## comorb -0.0159 0.0205 -0.7761 106 0.4394 -0.0565 0.0247
## type_prev 0.0357 0.0150 2.3863 106 0.0188 0.0060 0.0654 *
## meth_iden 0.0264 0.0185 1.4251 106 0.1571 -0.0103 0.0631
## type_samp 0.0136 0.0089 1.5213 106 0.1312 -0.0041 0.0312
## quality 0.0490 0.0184 2.6575 106 0.0091 0.0125 0.0856 **
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Comparison by ANNOVA of the two adjusted models
anova(m.qual, m.qual.rep)
##
## df AIC BIC AICc logLik LRT pval QE tau^2
## Full 9 358.9783 383.6041 360.7091 -170.4892 0.4420 0.0000
## Reduced 3 347.0454 355.2540 347.2636 -170.5227 0.0671 1.0000 0.5091 0.0000
## R^2
## Full
## Reduced 0.0000%
# Analysis of model interactions
# Add factor labels to 'continent'# 1 = SI # 2 = NO
levels(data_neumo1$comorb) = c("SI", "NO")
# Fit the meta-regression model
m.qual.rep.int <- rma(yi = prev,
sei = age,
data = data_neumo1,
method = "REML",
mods = ~ age * comorb,
test = "knha")
m.qual.rep.int
##
## Mixed-Effects Model (k = 114; tau^2 estimator: REML)
##
## tau^2 (estimated amount of residual heterogeneity): 0 (SE = 0.1886)
## tau (square root of estimated tau^2 value): 0
## I^2 (residual heterogeneity / unaccounted variability): 0.00%
## H^2 (unaccounted variability / sampling variability): 1.00
## R^2 (amount of heterogeneity accounted for): 0.00%
##
## Test for Residual Heterogeneity:
## QE(df = 110) = 0.5488, p-val = 1.0000
##
## Test of Moderators (coefficients 2:4):
## F(df1 = 3, df2 = 110) = 0.3075, p-val = 0.8199
##
## Model Results:
##
## estimate se tval df pval ci.lb ci.ub
## intrcpt 0.1015 0.0948 1.0717 110 0.2862 -0.0862 0.2893
## age 0.0342 0.0759 0.4508 110 0.6531 -0.1162 0.1845
## comorb 0.0092 0.0509 0.1816 110 0.8563 -0.0916 0.1100
## age:comorb -0.0212 0.0403 -0.5263 110 0.5997 -0.1011 0.0587
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
### Test de permutación
permutest(m.qual)
## Running 1000 iterations for an approximate permutation test.
##
## Test of Moderators (coefficient 2):¹
## F(df1 = 1, df2 = 112) = 9.7507, p-val = 0.0110
##
## Model Results:
##
## estimate se tval df pval¹ ci.lb ci.ub
## intrcpt -0.0652 0.0579 -1.1272 112 0.7640 -0.1799 0.0494
## quality 0.0545 0.0175 3.1226 112 0.0110 0.0199 0.0891 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## 1) p-values based on permutation testing
permutest(m.qual.rep)
## Running 1000 iterations for an approximate permutation test.
##
## Test of Moderators (coefficients 2:8):¹
## F(df1 = 7, df2 = 106) = 3.8180, p-val = 0.0340
##
## Model Results:
##
## estimate se tval df pval¹ ci.lb ci.ub
## intrcpt -7.6557 3.4527 -2.2173 106 0.0960 -14.5010 -0.8104 .
## year_pub 0.0037 0.0017 2.1886 106 0.0960 0.0004 0.0071 .
## stage -0.0050 0.0168 -0.2981 106 0.8170 -0.0383 0.0283
## comorb -0.0159 0.0205 -0.7761 106 0.5270 -0.0565 0.0247
## type_prev 0.0357 0.0150 2.3863 106 0.0540 0.0060 0.0654 .
## meth_iden 0.0264 0.0185 1.4251 106 0.2450 -0.0103 0.0631
## type_samp 0.0136 0.0089 1.5213 106 0.2310 -0.0041 0.0312
## quality 0.0490 0.0184 2.6575 106 0.0480 0.0125 0.0856 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## 1) p-values based on permutation testing
# Fit the meta-regression model
levels(data_neumo1$age) = c("SI", "NO")
# Fit the meta-regression model
m.qual.rep.int <- rma(yi = prev,
sei = meth_iden,
data = data_neumo1,
method = "REML",
mods = ~ meth_iden * sample,
test = "knha")
m.qual.rep.int
##
## Mixed-Effects Model (k = 114; tau^2 estimator: REML)
##
## tau^2 (estimated amount of residual heterogeneity): 0 (SE = 0.1477)
## tau (square root of estimated tau^2 value): 0
## I^2 (residual heterogeneity / unaccounted variability): 0.00%
## H^2 (unaccounted variability / sampling variability): 1.00
## R^2 (amount of heterogeneity accounted for): 0.00%
##
## Test for Residual Heterogeneity:
## QE(df = 110) = 0.8212, p-val = 1.0000
##
## Test of Moderators (coefficients 2:4):
## F(df1 = 3, df2 = 110) = 1.4318, p-val = 0.2374
##
## Model Results:
##
## estimate se tval df pval ci.lb ci.ub
## intrcpt 0.0590 0.0433 1.3614 110 0.1762 -0.0269 0.1448
## meth_iden 0.0342 0.0401 0.8539 110 0.3950 -0.0452 0.1136
## sample 0.0000 0.0000 1.3276 110 0.1871 -0.0000 0.0001
## meth_iden:sample -0.0000 0.0000 -0.9509 110 0.3437 -0.0001 0.0000
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
### Permutation test
permutest(m.qual)
## Running 1000 iterations for an approximate permutation test.
##
## Test of Moderators (coefficient 2):¹
## F(df1 = 1, df2 = 112) = 9.7507, p-val = 0.0110
##
## Model Results:
##
## estimate se tval df pval¹ ci.lb ci.ub
## intrcpt -0.0652 0.0579 -1.1272 112 0.7380 -0.1799 0.0494
## quality 0.0545 0.0175 3.1226 112 0.0110 0.0199 0.0891 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## 1) p-values based on permutation testing
permutest(m.qual.rep)
## Running 1000 iterations for an approximate permutation test.
##
## Test of Moderators (coefficients 2:8):¹
## F(df1 = 7, df2 = 106) = 3.8180, p-val = 0.0310
##
## Model Results:
##
## estimate se tval df pval¹ ci.lb ci.ub
## intrcpt -7.6557 3.4527 -2.2173 106 0.0830 -14.5010 -0.8104 .
## year_pub 0.0037 0.0017 2.1886 106 0.0850 0.0004 0.0071 .
## stage -0.0050 0.0168 -0.2981 106 0.8060 -0.0383 0.0283
## comorb -0.0159 0.0205 -0.7761 106 0.5330 -0.0565 0.0247
## type_prev 0.0357 0.0150 2.3863 106 0.0630 0.0060 0.0654 .
## meth_iden 0.0264 0.0185 1.4251 106 0.2560 -0.0103 0.0631
## type_samp 0.0136 0.0089 1.5213 106 0.2270 -0.0041 0.0312
## quality 0.0490 0.0184 2.6575 106 0.0310 0.0125 0.0856 *
##
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## 1) p-values based on permutation testing
## Multiple model inference
if (!require("devtools")) {
install.packages("devtools")
}
devtools::install_github("MathiasHarrer/dmetar")
#install.packages("metafor")
#install.packages("ggplot2")
#install.packages("MuMIn")
library(metafor)
library(ggplot2)
library(MuMIn)
library(dmetar)
multimodel.inference(TE = "prev",
seTE = "age",
data = data_neumo1,
predictors = c("year_pub", "stage", "comorb","type_prev", "meth_iden", "type_samp","quality"),
interaction = FALSE)
##
|
| | 0%
|
|= | 1%
|
|= | 2%
|
|== | 2%
|
|== | 3%
|
|=== | 4%
|
|=== | 5%
|
|==== | 5%
|
|==== | 6%
|
|===== | 7%
|
|===== | 8%
|
|====== | 9%
|
|======= | 9%
|
|======= | 10%
|
|======== | 11%
|
|======== | 12%
|
|========= | 12%
|
|========= | 13%
|
|========== | 14%
|
|========== | 15%
|
|=========== | 16%
|
|============ | 17%
|
|============= | 18%
|
|============= | 19%
|
|============== | 20%
|
|=============== | 21%
|
|=============== | 22%
|
|================ | 23%
|
|================= | 24%
|
|================== | 25%
|
|================== | 26%
|
|=================== | 27%
|
|==================== | 28%
|
|==================== | 29%
|
|===================== | 30%
|
|====================== | 31%
|
|====================== | 32%
|
|======================= | 33%
|
|======================== | 34%
|
|========================= | 35%
|
|========================= | 36%
|
|========================== | 37%
|
|========================== | 38%
|
|=========================== | 38%
|
|=========================== | 39%
|
|============================ | 40%
|
|============================ | 41%
|
|============================= | 41%
|
|============================== | 42%
|
|============================== | 43%
|
|=============================== | 44%
|
|=============================== | 45%
|
|================================ | 45%
|
|================================ | 46%
|
|================================= | 47%
|
|================================= | 48%
|
|================================== | 48%
|
|================================== | 49%
|
|=================================== | 50%
|
|==================================== | 51%
|
|==================================== | 52%
|
|===================================== | 52%
|
|===================================== | 53%
|
|====================================== | 54%
|
|====================================== | 55%
|
|======================================= | 55%
|
|======================================= | 56%
|
|======================================== | 57%
|
|======================================== | 58%
|
|========================================= | 59%
|
|========================================== | 59%
|
|========================================== | 60%
|
|=========================================== | 61%
|
|=========================================== | 62%
|
|============================================ | 62%
|
|============================================ | 63%
|
|============================================= | 64%
|
|============================================= | 65%
|
|============================================== | 66%
|
|=============================================== | 67%
|
|================================================ | 68%
|
|================================================ | 69%
|
|================================================= | 70%
|
|================================================== | 71%
|
|================================================== | 72%
|
|=================================================== | 73%
|
|==================================================== | 74%
|
|==================================================== | 75%
|
|===================================================== | 76%
|
|====================================================== | 77%
|
|======================================================= | 78%
|
|======================================================= | 79%
|
|======================================================== | 80%
|
|========================================================= | 81%
|
|========================================================= | 82%
|
|========================================================== | 83%
|
|=========================================================== | 84%
|
|============================================================ | 85%
|
|============================================================ | 86%
|
|============================================================= | 87%
|
|============================================================= | 88%
|
|============================================================== | 88%
|
|============================================================== | 89%
|
|=============================================================== | 90%
|
|=============================================================== | 91%
|
|================================================================ | 91%
|
|================================================================= | 92%
|
|================================================================= | 93%
|
|================================================================== | 94%
|
|================================================================== | 95%
|
|=================================================================== | 95%
|
|=================================================================== | 96%
|
|==================================================================== | 97%
|
|==================================================================== | 98%
|
|===================================================================== | 98%
|
|===================================================================== | 99%
##
##
## Multimodel Inference: Final Results
## --------------------------
##
## - Number of fitted models: 128
## - Full formula: ~ year_pub + stage + comorb + type_prev + meth_iden + type_samp + quality
## - Coefficient significance test: knha
## - Interactions modeled: no
## - Evaluation criterion: AICc
##
##
## Best 5 Models
## --------------------------
##
##
## Global model call: metafor::rma(yi = TE, sei = seTE, mods = form, data = glm.data,
## method = method, test = test)
## ---
## Model selection table
## (Int) cmr mth_idn qlt typ_prv typ_smp yer_pub df logLik AICc
## 56 + -0.01838 0.01226 0.04699 0.02769 0.01863 7 -162.931 340.9
## 55 + 0.01313 0.05000 0.02649 0.01724 6 -164.083 341.0
## 119 + 0.02646 0.05122 0.03446 0.01240 0.003595 7 -162.957 341.0
## 40 + -0.01495 0.01416 0.04272 0.01981 6 -164.097 341.0
## 120 + -0.01718 0.02552 0.04840 0.03550 0.01376 0.003558 8 -161.815 341.0
## delta weight
## 56 0.00 0.205
## 55 0.03 0.201
## 119 0.05 0.199
## 40 0.06 0.198
## 120 0.08 0.196
## Models ranked by AICc(x)
##
##
## Multimodel Inference Coefficients
## --------------------------
##
##
## Estimate Std. Error z value Pr(>|z|)
## intrcpt -3.223649014 4.091822547 0.7878272 0.4307978
## comorb -0.009023724 0.017776636 0.5076171 0.6117219
## meth_iden 0.011384944 0.018147954 0.6273403 0.5304362
## quality 0.026939868 0.028619950 0.9412968 0.3465528
## type_prev 0.015347016 0.018793692 0.8166046 0.4141544
## type_samp 0.011587034 0.012462604 0.9297443 0.3525035
## year_pub 0.001593749 0.002030993 0.7847144 0.4326210
## stage 0.001697317 0.012543606 0.1353133 0.8923641
##
##
## Predictor Importance
## --------------------------
##
##
## model importance
## 1 meth_iden 0.5844712
## 2 type_samp 0.5606120
## 3 quality 0.5388151
## 4 type_prev 0.5122403
## 5 comorb 0.5082750
## 6 year_pub 0.4930939
## 7 stage 0.4868201
#####################################################################################################
### Analysis of publication bias ###
#####################################################################################################
rm(list=ls(all=TRUE)) #Deletes all memory content
library(readxl)
data_neumo1 <- read_excel("C:/Users/USER/Desktop/RSMA/data_neumo1.xlsx")
View(data_neumo1)
# Call of the packages
#install.packages("metafor")
#install.packages("meta")
library(metafor)
library(meta)
library(ggplot2)
library(MuMIn)
library(dmetar)
# Effect size with transformation logit
ies.logit=escalc(xi=posit, ni=sample, data=data_neumo1, measure="PLO")
pes.logit=rma(yi, vi, data=ies.logit)
pes=predict(pes.logit, transf=transf.ilogit)
print(pes)
##
## pred ci.lb ci.ub pi.lb pi.ub
## 0.0847 0.0716 0.1000 0.0142 0.3734
# Publication bias analysis
# funnel.meta(pes.logit) # revisar código
funnel(pes.logit, yaxis="sei")
# rank (pes.logit) #revisar el codigo
regtest(pes.logit, model="rma", predictor="sei") ## Bias estimator - Egger test.
##
## Regression Test for Funnel Plot Asymmetry
##
## Model: mixed-effects meta-regression model
## Predictor: standard error
##
## Test for Funnel Plot Asymmetry: z = -7.8078, p < .0001
## Limit Estimate (as sei -> 0): b = -1.6211 (CI: -1.8604, -1.3818)
In the reproducible research framework, an important step is to save all the versions of the packages used to perform analysis. They must be provided when submitting a paper.
sessionInfo()
R version 4.2.2 (2022-10-31 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale: [1] LC_COLLATE=English_United Kingdom.utf8 [2]
LC_CTYPE=English_United Kingdom.utf8
[3] LC_MONETARY=English_United Kingdom.utf8 [4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.utf8
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] dmetar_0.0.9000 MuMIn_1.47.1
[3] devtools_2.4.5 usethis_2.1.6
[5] PerformanceAnalytics_2.0.4 xts_0.12.2
[7] zoo_1.8-11 forcats_0.5.2
[9] stringr_1.4.1 dplyr_1.0.10
[11] purrr_0.3.5 readr_2.1.3
[13] tidyr_1.2.1 tibble_3.1.8
[15] ggplot2_3.4.0 tidyverse_1.3.2
[17] meta_6.0-0 metafor_3.8-1
[19] metadat_1.2-0 Matrix_1.5-1
[21] readxl_1.4.1
loaded via a namespace (and not attached): [1] googledrive_2.0.0
minqa_1.2.5 colorspace_2.0-3
[4] class_7.3-20 modeltools_0.2-23 ellipsis_0.3.2
[7] mclust_6.0.0 fs_1.5.2 rstudioapi_0.14
[10] farver_2.1.1 remotes_2.4.2 flexmix_2.3-18
[13] ggrepel_0.9.2 fansi_1.0.3 lubridate_1.9.0
[16] mathjaxr_1.6-0 xml2_1.3.3 splines_4.2.2
[19] robustbase_0.95-0 cachem_1.0.6 knitr_1.41
[22] pkgload_1.3.2 jsonlite_1.8.3 nloptr_2.0.3
[25] broom_1.0.1 kernlab_0.9-31 cluster_2.1.4
[28] dbplyr_2.2.1 shiny_1.7.3 compiler_4.2.2
[31] httr_1.4.4 backports_1.4.1 assertthat_0.2.1
[34] fastmap_1.1.0 gargle_1.2.1 cli_3.4.1
[37] later_1.3.0 htmltools_0.5.3 prettyunits_1.1.1
[40] tools_4.2.2 gtable_0.3.1 glue_1.6.2
[43] Rcpp_1.0.9 cellranger_1.1.0 jquerylib_0.1.4
[46] vctrs_0.5.1 nlme_3.1-160 fpc_2.2-9
[49] xfun_0.35 ps_1.7.2 lme4_1.1-31
[52] rvest_1.0.3 timechange_0.1.1 mime_0.12
[55] miniUI_0.1.1.1 CompQuadForm_1.4.3 lifecycle_1.0.3
[58] googlesheets4_1.0.1 DEoptimR_1.0-11 MASS_7.3-58.1
[61] scales_1.2.1 hms_1.1.2 promises_1.2.0.1
[64] parallel_4.2.2 curl_4.3.3 yaml_2.3.6
[67] gridExtra_2.3 memoise_2.0.1 pbapply_1.6-0
[70] sass_0.4.4 stringi_1.7.8 highr_0.9
[73] poibin_1.5 boot_1.3-28 pkgbuild_1.4.0
[76] prabclus_2.3-2 rlang_1.0.6 pkgconfig_2.0.3
[79] evaluate_0.18 lattice_0.20-45 labeling_0.4.2
[82] htmlwidgets_1.5.4 tidyselect_1.2.0 processx_3.8.0
[85] magrittr_2.0.3 R6_2.5.1 generics_0.1.3
[88] profvis_0.3.7 DBI_1.1.3 pillar_1.8.1
[91] haven_2.5.1 withr_2.5.0 nnet_7.3-18
[94] abind_1.4-5 modelr_0.1.10 crayon_1.5.2
[97] utf8_1.2.2 tzdb_0.3.0 rmarkdown_2.18
[100] urlchecker_1.0.1 grid_4.2.2 netmeta_2.6-0
[103] callr_3.7.3 diptest_0.76-0 reprex_2.0.2
[106] digest_0.6.30 xtable_1.8-4 httpuv_1.6.6
[109] stats4_4.2.2 munsell_0.5.0 bslib_0.4.1
[112] magic_1.6-1 sessioninfo_1.2.2 quadprog_1.5-8