WORKED EXAMPLE · REPLICATING A PAPER IN EXCEL
A paper’s supplementary data summarised and checked against its table
A graduate student replicating a 2025 PLOS ONE paper on PM2.5 pollution in 337 Chinese cities uploaded the paper and its supplementary Excel file. They asked for a summary sheet of the model coefficients in that workbook, checked against the means printed in the paper’s Table 6, with a chart.
wrote the summary as live formulas, read Table 6 from the PDF and matched all six means. Asked to add the second supplementary file, it copied the sheet in, extended the summary to twelve factors and redrew the chart as a sorted bar chart in two colours. The six new Table 6 means took one follow-up.
1The upload: 337 cities of model coefficients, and the paper
- 12 / 12factor rows that match our own recalculation
- ≤ 0.0005difference from Table 6, every factor
- 3requests, the last one a follow-up
- 0.52credits in all
Open the real files
The paper and its supplementary files are linked at PLOS ONE. The three workbooks are the ones from the run. Download them and open them in Excel.
Where the files come from: PLOS ONE, “Identifying the spatiotemporal patterns and natural and socioeconomic influencing factors of PM2.5 and O3 pollution in China” (2025), with its S1 and S2 supplementary files. Published under CC BY 4.0. The authors have not reviewed or endorsed this example.
01 · THE STARTING FILE
337 cities, 24 columns of coefficients, and a table in a PDF
The S1 file has one sheet: one row per city, and for each of six socioeconomic factors its local coefficient (beta_), standard error, t value and p value. The S2 file has the same layout for six natural factors. The paper reports the mean of each coefficient in Table 6, on page 13 of the PDF.
City| A | B | C | D | E | F | G | T | |
|---|---|---|---|---|---|---|---|---|
| 1 | City | beta_Popden | beta_PGDP | beta_Prosec | beta_Energy | beta_Roadden | beta_NDVI | p_Popden |
| 2 | Da Hinggan Ling Mountains | 0.569 | -0.096 | 0.080 | 0.025 | -0.087 | -0.067 | 0.000 |
| 3 | Heihe | 0.570 | -0.099 | 0.108 | 0.025 | -0.091 | -0.069 | 0.000 |
| 4 | Yichun | 0.569 | -0.102 | 0.117 | 0.025 | -0.093 | -0.072 | 0.000 |
| 5 | Hulunbuir | 0.566 | -0.105 | 0.088 | 0.025 | -0.089 | -0.063 | 0.000 |
| 6 | Qiqihar | 0.567 | -0.106 | 0.111 | 0.024 | -0.092 | -0.066 | 0.000 |
| … | ||||||||
| 338 | Shihezi | 0.404 | -0.207 | -0.073 | 0.037 | -0.080 | -0.130 | 0.000 |
02 · REQUEST 1
"Add a Summary sheet, checked against Table 6"
What the student typed
I'm replicating the PM2.5 paper attached (PLOS ONE 2025). S1_File_data_for_Fig5.xlsx has the local MGWR results for 337 cities on sheet 'PM2.5_socioeconomic' (beta_, se_, t_ and p_ columns for Popden, PGDP, Prosec, Energy, Roadden, NDVI). In this workbook, add a sheet 'Summary' with one row per factor and these columns: 1. Mean, SD (sample), Min, Median, Max of the beta_ coefficient 2. Number of cities with p < 0.05 (use the p_ column), split into positive and negative beta 3. The mean reported in the paper's Table 6 (PDF page 13), and the difference from our mean Use formulas pointing at the data sheet where you can. Then add a native Excel bar chart of the six mean coefficients on the Summary sheet. Leave the data sheet unchanged.
What did
- Added a “Summary” sheet with one row per factor: mean, sample SD, min, median and max of each beta_ column as formulas over all 337 rows.
- Counted the cities with p < 0.05, split by the sign of beta, with COUNTIFS on the p_ and beta_ columns.
- Read Table 6 from page 13 of the PDF, typed in its six means and added a difference column as a formula.
- Added a native Excel bar chart of the six means and left the data sheet unchanged.
Factor| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Factor | Mean (beta) | SD sample (beta) | Min (beta) | Median (beta) | Max (beta) | Significant p<0.05, beta>0 (n) | Significant p<0.05, beta<0 (n) | Paper Table 6 mean | Difference (our mean minus paper) |
| 2 | Popden | 0.4396 | 0.2030 | -0.0088 | 0.3887 | 1.0897 | 263 | 0 | 0.4400 | -0.0004 |
| 3 | PGDP | -0.0406 | 0.1479 | -0.4360 | -0.0565 | 0.3066 | 26 | 48 | -0.0410 | 0.0004 |
| 4 | Prosec | 0.0842 | 0.0493 | -0.0823 | 0.1032 | 0.1208 | 166 | 16 | 0.0840 | 0.0002 |
| 5 | Energy | 0.0207 | 0.0051 | 0.0141 | 0.0196 | 0.0439 | 0 | 0 | 0.0210 | -0.0003 |
| 6 | Roadden | -0.1018 | 0.0057 | -0.1092 | -0.1029 | -0.0745 | 0 | 0 | -0.1020 | 0.0002 |
| 7 | NDVI | -0.0311 | 0.0358 | -0.1439 | -0.0238 | 0.0157 | 0 | 8 | -0.0310 | -0.0001 |
Mean MGWR coefficient (beta) by factor
We checked it against the data: we recomputed every statistic from the 337 rows: all six rows match to three decimals, the counts included (Popden 263 positive, PGDP 26 and 48, Prosec 166 and 16, NDVI 8 negative), and every mean matches Table 6 to three decimals; the difference column shows only the rounding, at most 0.0004.
03 · REQUEST 2
"Now add the natural factors from the second file"
What the student typed
Now add the natural factors. In the same workbook: 1. Copy sheet 'PM2.5_natural' from S2_File_data_for_Fig6.xlsx (attached) in as a second data sheet, unchanged. 2. Extend the Summary to all 12 factors (Tem, Pre, Ws, Rh, Ap, Sd below the six socioeconomic ones), same columns, including the Table 6 means. 3. Change the chart to a horizontal bar chart of all 12 means, sorted from largest to smallest, with socioeconomic and natural factors in two different colours and a legend saying which is which. Don't change the existing six Summary rows.
What did
- Copied the “PM2.5_natural” sheet from the S2 file into the workbook with all 337 rows.
- Added six rows for Tem, Pre, Ws, Rh, Ap and Sd with the same formulas, and left the first six rows unchanged.
- Built a helper table in L1:N13: the twelve means sorted from largest to smallest, one column per group.
- Replaced the chart with a horizontal bar chart of that table: twelve bars, socioeconomic and natural factors in two colours, with a legend.
- Left the Table 6 means of the new factors empty: the paper was not among the files it read for this request. Its finish message said so and offered to fill them in if the paper was attached.
Factor| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Factor | Mean (beta) | SD sample (beta) | Min (beta) | Median (beta) | Max (beta) | Significant p<0.05, beta>0 (n) | Significant p<0.05, beta<0 (n) | Paper Table 6 mean | Difference (our mean minus paper) |
| 2 | Popden | 0.4396 | 0.2030 | -0.0088 | 0.3887 | 1.0897 | 263 | 0 | 0.4400 | -0.0004 |
| 3 | PGDP | -0.0406 | 0.1479 | -0.4360 | -0.0565 | 0.3066 | 26 | 48 | -0.0410 | 0.0004 |
| 4 | Prosec | 0.0842 | 0.0493 | -0.0823 | 0.1032 | 0.1208 | 166 | 16 | 0.0840 | 0.0002 |
| 5 | Energy | 0.0207 | 0.0051 | 0.0141 | 0.0196 | 0.0439 | 0 | 0 | 0.0210 | -0.0003 |
| 6 | Roadden | -0.1018 | 0.0057 | -0.1092 | -0.1029 | -0.0745 | 0 | 0 | -0.1020 | 0.0002 |
| 7 | NDVI | -0.0311 | 0.0358 | -0.1439 | -0.0238 | 0.0157 | 0 | 8 | -0.0310 | -0.0001 |
| 8 | Tem | -0.5283 | 0.3172 | -0.9254 | -0.5554 | 0.0828 | 0 | 282 | ||
| 9 | Pre | -0.2908 | 0.2039 | -0.8050 | -0.2426 | 0.0568 | 0 | 164 | ||
| 10 | Ws | 0.0424 | 0.2451 | -0.7504 | 0.0560 | 0.5892 | 77 | 24 | ||
| 11 | Rh | 0.0365 | 0.1642 | -0.2536 | 0.0000 | 0.3140 | 52 | 5 | ||
| 12 | Ap | 0.6354 | 0.0089 | 0.6144 | 0.6354 | 0.6486 | 337 | 0 | ||
| 13 | Sd | -0.2127 | 0.0132 | -0.2385 | -0.2124 | -0.1757 | 0 | 337 |
Mean MGWR coefficient (beta) by factor
- Socioeconomic
- Natural
Factor| L | M | N | |
|---|---|---|---|
| 1 | Factor | Socioeconomic | Natural |
| 2 | Ap | 0 | 0.635383529 |
| 3 | Popden | 0.4395928664 | 0 |
| 4 | Prosec | 0.08424064731 | 0 |
| 5 | Ws | 0 | 0.04236848852 |
| 6 | Rh | 0 | 0.0364906784 |
| 7 | Energy | 0.02065123283 | 0 |
| 8 | NDVI | -0.03114898101 | 0 |
| 9 | PGDP | -0.04059583997 | 0 |
| 10 | Roadden | -0.1018138745 | 0 |
| 11 | Sd | 0 | -0.2126999148 |
| 12 | Pre | 0 | -0.2908334881 |
| 13 | Tem | 0 | -0.5282885883 |
We checked it against the data: the six new rows match our recalculation from the S2 data, the copied sheet holds the same numbers as the S2 file, the first six rows are unchanged, and the chart has two series of twelve values in the sorted order.
04 · FOLLOW-UP
"The Table 6 means are still missing"
What the student typed, with the paper attached again
The Table 6 means for Tem, Pre, Ws, Rh, Ap and Sd are still missing in the Summary. They are in Table 6 on page 13 of the paper attached. Please fill them in, with the difference from our mean, like the six socioeconomic rows.
What did
- Read the six natural-factor means from Table 6 on page 13 and typed them in.
- Wrote their differences with the same formula as the first six rows.
Factor| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Factor | Mean (beta) | SD sample (beta) | Min (beta) | Median (beta) | Max (beta) | Significant p<0.05, beta>0 (n) | Significant p<0.05, beta<0 (n) | Paper Table 6 mean | Difference (our mean minus paper) |
| 2 | Popden | 0.4396 | 0.2030 | -0.0088 | 0.3887 | 1.0897 | 263 | 0 | 0.4400 | -0.0004 |
| 3 | PGDP | -0.0406 | 0.1479 | -0.4360 | -0.0565 | 0.3066 | 26 | 48 | -0.0410 | 0.0004 |
| 4 | Prosec | 0.0842 | 0.0493 | -0.0823 | 0.1032 | 0.1208 | 166 | 16 | 0.0840 | 0.0002 |
| 5 | Energy | 0.0207 | 0.0051 | 0.0141 | 0.0196 | 0.0439 | 0 | 0 | 0.0210 | -0.0003 |
| 6 | Roadden | -0.1018 | 0.0057 | -0.1092 | -0.1029 | -0.0745 | 0 | 0 | -0.1020 | 0.0002 |
| 7 | NDVI | -0.0311 | 0.0358 | -0.1439 | -0.0238 | 0.0157 | 0 | 8 | -0.0310 | -0.0001 |
| 8 | Tem | -0.5283 | 0.3172 | -0.9254 | -0.5554 | 0.0828 | 0 | 282 | -0.5280 | -0.0003 |
| 9 | Pre | -0.2908 | 0.2039 | -0.8050 | -0.2426 | 0.0568 | 0 | 164 | -0.2910 | 0.0002 |
| 10 | Ws | 0.0424 | 0.2451 | -0.7504 | 0.0560 | 0.5892 | 77 | 24 | 0.0420 | 0.0004 |
| 11 | Rh | 0.0365 | 0.1642 | -0.2536 | 0.0000 | 0.3140 | 52 | 5 | 0.0360 | 0.0005 |
| 12 | Ap | 0.6354 | 0.0089 | 0.6144 | 0.6354 | 0.6486 | 337 | 0 | 0.6350 | 0.0004 |
| 13 | Sd | -0.2127 | 0.0132 | -0.2385 | -0.2124 | -0.1757 | 0 | 337 | -0.2130 | 0.0003 |
We checked it against the data: all twelve rows match our recalculation from the two data sheets, and all twelve Table 6 means are right (Tem −0.528, Pre −0.291, Ws 0.042, Rh 0.036, Ap 0.635, Sd −0.213); the S1 data sheet is unchanged and the copied S2 sheet holds the same numbers.
Replication work, in the authors’ own files
reads the paper and the supplementary data together, writes the statistics as formulas you can audit, and puts the published figures beside them so any gap shows.
KEEP READING


