-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPort 5 Helle.Rmd
102 lines (69 loc) · 4.05 KB
/
Port 5 Helle.Rmd
1
2
3
4
5
6
7
8
9
10
11
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
title: "Assignment 5 - Meta-analysis of pitch in schizophrenia"
author: "Riccardo Fusaroli"
date: "3/7/2019"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Building on the shoulders of giants: meta-analysis
## Questions to be answered
1. What is the current evidence for distinctive vocal patterns in schizophrenia? Report how many papers report quantitative estimates, comment on what percentage of the overall studies reviewed they represent (see PRISMA chart) your method to analyze them, the estimated effect size of the difference (mean effect size and standard error) and forest plots representing it. N.B. Only measures of pitch mean and pitch sd are required for the assignment (all the other measures have been removed from the dataset for the sake of simplicity).
```{r}
library(tidyverse)
library(metafor)
library(readxl)
df <- read_excel("Matrix_MetaAnalysis_Diagnosis_updated290719.xlsx")
#Creting new columns yi and vi for effect size and variance
# SMD = standardized mean difference, yi = observed effect size, vi = sampling variance
df_es = escalc(measure = 'SMD', n1i=SAMPLE_SIZE_HC, n2i= SAMPLE_SIZE_SZ, m1i= PITCH_F0_HC_M, m2i= PITCH_F0_SZ_M, sd1i= PITCH_F0_HC_SD, sd2i= PITCH_F0_SZ_SD, data = df)
#Making model
m2 <-rma (yi, vi, data = df_es, slab = StudyID)
forest(m2)
inf <- influence(m2)
plot(inf)
summary(m2)
```
2. Do the results match your own analysis from Assignment 3? If you add your results to the meta-analysis, do the estimated effect sizes change? Report the new estimates and the new forest plots.
```{r}
df_pitch <- df %>%
select(ArticleID, StudyID, Article, SAMPLE_SIZE_HC, SAMPLE_SIZE_SZ, PITCH_F0_HC_M, PITCH_F0_SZ_M, PITCH_F0_HC_SD, PITCH_F0_SZ_SD)
#adding our own data
port3 <- read_csv("real_clean_data_yes-kopi.csv")
port3HC <- port3 %>% subset(Diagnosis == 0)
port3SZ <- port3 %>% subset(Diagnosis == 1)
port3HC <- aggregate(cbind(mean, sd) ~ID, data = port3HC, mean)
port3SZ <- aggregate(cbind(mean, sd) ~ID, data = port3SZ, mean)
df_pitch <- df_pitch %>%
add_row(ArticleID = 49, StudyID = 51, Article = "port3_data",
SAMPLE_SIZE_HC = nrow(port3HC), SAMPLE_SIZE_SZ = nrow(port3SZ),
PITCH_F0_HC_M = mean(port3HC$mean), PITCH_F0_SZ_M = mean(port3SZ$mean),
PITCH_F0_HC_SD = mean(port3HC$sd), PITCH_F0_SZ_SD = mean(port3SZ$sd))
#doing it all again
df_pitch_es = escalc(measure = 'SMD', n1i= SAMPLE_SIZE_HC, n2i= SAMPLE_SIZE_SZ, m1i= PITCH_F0_HC_M, m2i= PITCH_F0_SZ_M ,
sd1i= PITCH_F0_HC_SD, sd2i= PITCH_F0_SZ_SD, data = df_pitch)
df_pitch1<- df_pitch_es %>% subset(StudyID !=11)
m3 <- rma (yi, vi, data = df_pitch1, slab = StudyID)
summary(m3)
forest(m3)
inf3 <- influence(m3)
plot(inf3)
#other stuff
regtest(m3)
ranktest(m3)
funnel(m3)
```
3. Assess the quality of the literature: report and comment on heterogeneity of the studies (tau, I2), on publication bias (funnel plot), and on influential studies.
## Tips on the process to follow:
- Download the data on all published articles analyzing voice in schizophrenia and the prisma chart as reference of all articles found and reviewed
Data: https://www.dropbox.com/s/0l9ur0gaabr80a8/Matrix_MetaAnalysis_Diagnosis_updated290719.xlsx?dl=0
Prisma chart: https://www.dropbox.com/s/vbjf6ff73dv9tru/PRISMA%202009%20flow%20diagram_PP.pptx?dl=0
- Look through the dataset to find out which columns to use, and if there is any additional information written as comments (real world data is always messy!).
* Hint: PITCH_F0M and PITCH_F0SD group of variables are what you need
- Following the procedure in the slides calculate effect size and standard error of the effect size per each study. N.B. we focus on pitch mean and pitch standard deviation.
. first try using lmer (to connect to what you know of mixed effects models)
. then use rma() (to get some juicy additional statistics)
- Build a forest plot of the results (forest(model))
- Go back to Assignment 3, add your own study to the data table, and re-run meta-analysis. Do the results change?
- Now look at the output of rma() and check tau and I2