In data made up of monthly totals, every series rises and falls gradually, so regressing them as they are can make unrelated series appear to be associated. This case study uses 76 months of totals from an acute care hospital. I checked the properties of the series, ran multiple regression, and judged how the use of antimicrobials and of hand sanitizer was associated with the proportion of resistant isolates.
The study setting, disease, variables, and numbers in this article were newly created by me to explain how the analysis was carried out. The numbers were calculated from a randomly generated dataset and do not reflect the content or circumstances of any actual client project.
76 months, 3 series with 1 row per month
The data were 76 months of records compiled by the infection control team of 1 acute care hospital, with 1 row for each month. The outcome was the proportion of carbapenem-resistant isolates among Pseudomonas aeruginosa isolated from inpatients (mean, 21.9%; range, 16.4 to 27.2%) (Table 1).
The 2 explanatory variables were carbapenem use (days of therapy per 1,000 patient-days) and hand sanitizer use (mL per patient-day). The 3 series had seasonal variation; antimicrobial use was gradually decreasing, and hand sanitizer use was gradually increasing (Figure 1).

| Original series | Difference from the previous month | ||||
|---|---|---|---|---|---|
| Series | Mean (range) | ADF test* | KPSS test† | ADF test* | KPSS test† |
| Resistant isolates (%) | 21.9 (16.4 to 27.2) | -2.40 (>0.10) | 0.29 (<0.01) | -5.24 (<0.01) | 0.08 (>0.10) |
| Carbapenem use (days of therapy per 1,000 patient-days) | 24.2 (18.2 to 32.3) | -3.90 (0.02) | 0.10 (>0.10) | -5.53 (<0.01) | 0.03 (>0.10) |
| Hand sanitizer use (mL per patient-day) | 10.1 (7.6 to 12.2) | -4.08 (0.01) | 0.08 (>0.10) | -3.87 (0.02) | 0.03 (>0.10) |
† The null hypothesis of the KPSS test is that the series is stationary, and a small P indicates that it is not. For both tests, P is shown with an inequality sign outside the range of 0.01 to 0.10.
Not regressing the series as they are: taking differences from the previous month and then examining lags
For series that have trends, the coefficient moves away from 0 simply because they rise and fall over the same period, even when they are unrelated. In fact, when the original values were regressed, the coefficient for hand sanitizer was 0.52 (P=0.05), in the direction of a higher proportion of resistant isolates in months with more use.
I therefore checked the properties of the series with the ADF and KPSS tests. For the proportion of resistant isolates, the ADF test gave P>0.10 and the KPSS test P<0.01, so the series could not be called stationary (Table 1).
In the test of cointegration by the Engle–Granger method as well, the residual statistic was -3.56, short of the 5% critical value (-3.86), so a relationship of moving together over the long run was not shown. I therefore converted the 3 series to differences from the previous month for the regression.
Because it takes time for a change in use to appear in the proportion of resistant isolates, I fixed the lags in advance at 0 to 3 months and adjusted for seasonal terms. Choosing the lag from the results would pick up a month that happened to come out large.
Furthermore, splitting the period by the apparent trend and regressing each part separately makes the results depend on where the split is placed, so I handled the whole period in a single model. The residuals were autocorrelated by the Breusch–Godfrey test (P<0.001), and I used the Newey–West method for the standard errors.
In the multiple regression, the coefficient for antimicrobial use 2 months earlier was 0.21, and no conclusion of an association
| Whole period (72 months)* | Check† | |||
|---|---|---|---|---|
| Explanatory variable and lag | Coefficient (95% CI) | P value | Coefficient in the first half (95% CI) | Coefficient in the second half (95% CI) |
| Antimicrobial use (per 1-unit increase) | ||||
| Same month | -0.12 (-0.36 to 0.12) | 0.33 | -0.16 (-0.63 to 0.32) | -0.07 (-0.40 to 0.25) |
| 1 month earlier | 0.07 (-0.15 to 0.29) | 0.54 | 0.01 (-0.27 to 0.29) | 0.12 (-0.28 to 0.53) |
| 2 months earlier | 0.21 (-0.02 to 0.44) | 0.07 | 0.37 (-0.08 to 0.82) | 0.27 (-0.04 to 0.58) |
| 3 months earlier | 0.05 (-0.29 to 0.39) | 0.76 | 0.24 (-0.10 to 0.59) | 0.03 (-0.44 to 0.49) |
| Sum of the 4 coefficients | 0.21 (-0.24 to 0.66) | 0.36 | 0.47 (0.01 to 0.94) | 0.34 (-0.64 to 1.32) |
| Hand sanitizer use (per 1-mL increase) | ||||
| Same month | 0.21 (-0.55 to 0.97) | 0.59 | -0.85 (-2.51 to 0.81) | 0.79 (0.03 to 1.55) |
| 1 month earlier | -0.28 (-1.26 to 0.71) | 0.58 | -0.92 (-2.11 to 0.27) | 0.02 (-1.22 to 1.25) |
| 2 months earlier | -0.44 (-1.26 to 0.38) | 0.28 | -0.15 (-1.56 to 1.26) | -0.54 (-1.59 to 0.51) |
| 3 months earlier | 0.10 (-0.57 to 0.76) | 0.77 | -1.30 (-2.43 to -0.17) | 0.79 (0.20 to 1.37) |
| Sum of the 4 coefficients | -0.41 (-2.66 to 1.83) | 0.71 | -3.22 (-6.90 to 0.46) | 1.05 (-1.19 to 3.29) |
† Results of fitting the same model to the first half (34 months) and the second half (38 months), split at the middle of the period.
For antimicrobial use, the coefficient 2 months earlier was 0.21 (95% CI, -0.02 to 0.44; P=0.07), the largest of the 4 lags, but the confidence interval included 0 (Table 2). In the first and second halves, split at the middle of the period as a check, the coefficients 2 months earlier were 0.37 and 0.27, in the same direction.
For hand sanitizer use, in contrast, the sum of the 4 coefficients was -0.41 (-2.66 to 1.83), and neither the direction nor the size could be determined. In the first and second halves, the coefficients 3 months earlier were -1.30 and 0.79, in opposite directions, which shows that reading the results by splitting the period reverses the conclusion.

In the cross-correlations calculated as a correlation analysis, no coefficient exceeded the reference range at any lag from -6 to 6 months, and the largest for antimicrobial use was 0.21 at 4 months earlier (Figure 2).
Taken together, the statistical conclusion is that a positive association between antimicrobial use 2 months earlier and the proportion of resistant isolates is suggested, but that with 76 months of data I could not conclude that there was an association, and an association with a coefficient of up to 0.44 cannot be ruled out. No association with hand sanitizer use was shown. Because these are totals for the whole hospital, the results say nothing about individual patients, nor do they show that reducing use would lower the proportion of resistant isolates.
Work performed and estimated fee
| Item | Details |
|---|---|
| Analysis method | Multiple regression after checking the properties of the time series (ADF test, KPSS test, test of cointegration, series of differences from the previous month, lags of 0 to 3 months, seasonal adjustment, and Newey–West standard errors) |
| Additional analyses | Correlation analysis with cross-correlations (lags of -6 to 6 months), a check of autocorrelation in the residuals (Breusch–Godfrey test), and a check in the first and second halves |
| Tables prepared | 1 table summarizing the 3 series and tests, 1 table of the multiple regression results; 2 tables in total |
| Figures prepared | 1 figure of the course of the 3 series, 1 figure of cross-correlations; 2 figures in total |
| Deliverables | Analysis report (reasons for the choice of methods and discussion of the results), tables of results (Excel), figures (PNG and TIFF), and a draft of the statistical analysis section for the paper. Analysis code is available on request for an additional fee (¥22,000, incl. tax) |
| Estimated time | About 1 week from receipt of the data |
| Estimated fee | ¥242,000 (incl. tax) |
The table lists the main analyses only. I also carry out the finer analyses needed to follow a sound statistical process, such as checking distributions and cleaning the data; these, together with after-care with no time limit (answers to your questions after delivery), are included in the fee.

