Skip to content

Commit

Permalink
updata meta-analysis code and data
Browse files Browse the repository at this point in the history
  • Loading branch information
xinmingxu committed Feb 12, 2024
1 parent 0397298 commit 1b5a5e3
Show file tree
Hide file tree
Showing 10 changed files with 1,033 additions and 632 deletions.
3 changes: 2 additions & 1 deletion code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ This folder contains notebooks to replicate analyses and figures (`_rep` denotes
2. `results(_rep).ipynb` - code to run all non-statistical analyses and generate all data figures
3. `r_code(_rep).ipynb` - code to run statistical tests in R
4. `stats_results(_rep).ipynb` - code to generate all statistical results
5. `meta-analysis.ipynb` - code to carry out the meta analysis
5. `meta-analysis.ipynb` - code to carry out the large scale analysis
6. `metafor.ipynb` - code to carry out the meta-analysis in R
1,173 changes: 552 additions & 621 deletions code/meta-analysis.ipynb

Large diffs are not rendered by default.

Binary file removed code/meta-analysis.pdf
Binary file not shown.
430 changes: 430 additions & 0 deletions code/metafor.ipynb

Large diffs are not rendered by default.

25 changes: 22 additions & 3 deletions code/results_rep.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2021-11-05T18:10:25.867414Z",
Expand Down Expand Up @@ -31,7 +31,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {
"execution": {
"iopub.execute_input": "2021-11-05T18:10:35.374315Z",
Expand Down Expand Up @@ -100,7 +100,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {
"execution": {
"iopub.execute_input": "2021-11-05T18:10:35.388571Z",
Expand Down Expand Up @@ -2107,6 +2107,25 @@
"### read reference files"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"# references count\n",
"df_refer_full = pd.read_excel('../data/rep/TheChair.xlsx', sheet_name='references_full')"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"df_refer_full.groupby(['episode','direction'])['time'].count().reset_index().to_csv(\"../data/the_chair/the_chair_manual_reference_counts.csv\", index=False)"
]
},
{
"cell_type": "code",
"execution_count": 53,
Expand Down
Binary file modified data/metaanalysis-datasets.xlsx
Binary file not shown.
13 changes: 13 additions & 0 deletions data/ref_counts_summary.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
dataset,type,total,corrected_past,corrected_future,non_past,non_future
IMSDb,Scripted,3080674,657475,316525,2423199,2764149
Movies,Scripted,516163,127744,85937,388419,430226
Switchboard,Spontaneous,245461,41488,22079,203973,223382
SCOTUS,Constrained,3880259,1963578,1207377,1916681,2672882
Tennis,Constrained,599172,281669,134638,317503,464534
PfG,Constrained,37184,7408,9771,29776,27413
IQ2,Constrained,122925,46630,34811,76295,88114
GAP,Constrained,8009,1800,1338,6209,6671
Chair,Scripted,2900,660,460,2240,2440
Friends,Scripted,107082,22067,16356,85015,90726
Gutenberg,Scripted,29119393,10234952,8672030,18884441,20447363
Reddit,Constrained,217924,86513,66700,131411,151224
Binary file modified data/rep/TheChair.xlsx
Binary file not shown.
7 changes: 7 additions & 0 deletions data/the_chair/the_chair_auto_reference_counts.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Episode,Total,Past,Future
1,457,112,74
2,501,80,64
3,518,123,82
4,442,108,75
5,508,116,66
6,474,121,99
14 changes: 7 additions & 7 deletions data/the_chair/the_chair_manual_reference_counts.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Past,Future
60,18
30,14
43,33
31,21
36,11
27,12
Episode,Past,Future
1,60,19
2,29,14
3,43,33
4,30,20
5,37,10
6,27,12

0 comments on commit 1b5a5e3

Please sign in to comment.