Session 5: Solutions
Download the PDF · Back to Session 5
Foundations of Clinical Research · Level 1 · Neudata
Model answers for the Session 5 exercise sheet, shared after the session. Other answers are fine if they are specific and consistent.
Exercise numbers follow s5_exercises.md. All FLUID-ICU numbers come from the results packs in FLUID-ICU/results_packs/ (simulated data).
Exercise 1: Classify the variables
| # | Variable | Answer | Explanation |
|---|---|---|---|
| a | Age (years) | Continuous | Measured on a scale. Keep the exact number on the CRF (or collect date of birth). |
| b | Sex | Binary | Two categories. Coding 1/2 does not make it numerical. |
| c | Glasgow Coma Scale | Ordinal | Ordered scores (3–15) with unequal steps. Often analysed like a number, which is acceptable if stated, but it is ordinal by nature. |
| d | Source of sepsis | Nominal | Several categories, no natural order. |
| e | Number of vasopressors | Count | Whole numbers 0–3. “Ordinal” is also fine if well argued. It is not continuous. |
| f | Cumulative fluid balance (ml/kg) | Continuous | Can be negative or positive, with any value on the scale. The Paper 1 primary outcome. |
| g | Alive at day 28 | Binary | Yes/no. |
| h | Time to death, censored at day 28 | Time-to-event | Two pieces of information: how long, and whether the event happened. Analysed with Kaplan–Meier / Cox. |
| i | Pain none–severe | Ordinal | Ordered categories. |
| j | Blood group | Nominal | No order. |
Bonus: any continuous variable (age, fluid balance, lactate). You can always group later, but you cannot recover the exact value from a group.
Exercise 2: Fix the bad CRF items (model answers)
| # | Bad item | Problem | Model rewrite |
|---|---|---|---|
| a | Fluid given: ____ | No unit, no time window, no definition (crystalloid? blood? drug diluents?) | “Total IV fluid received from ICU admission to 24 h (ml), including crystalloids, colloids and drug diluents: [ ][ ][ ][ ][ ] ml ☐ not recorded” |
| b | Weight: ____ | No unit. Measured or estimated? When? | “Body weight at ICU admission (kg): [ ][ ][ ].[ ] ☐ measured ☐ estimated ☐ not available” |
| c | Comorbidities: ________ | Free text: impossible to analyse, spelling varies | Tick list: “Comorbidities present at admission (tick ALL that apply): ☐ diabetes ☐ chronic kidney disease ☐ heart failure ☐ COPD ☐ cirrhosis ☐ cancer ☐ none ☐ unknown” |
| d | Lactate high? Y / N | Opinion (“high” by whose cut-off?), loses the value, no time point | “Serum lactate at ICU admission (mmol/L): [ ][ ].[ ] ☐ not done” (define “high” later, in the analysis) |
Exercise 3: Choose the right summary
| # | Variable | Shape / type | Summary | Graph |
|---|---|---|---|---|
| a | Age, bell-shaped | Symmetric continuous | Mean (SD) | Histogram |
| b | ICU length of stay | Right-skewed | Median (IQR) | Histogram or boxplot |
| c | Died in hospital | Binary | n (%) | Bar chart |
| d | CRP | Right-skewed | Median (IQR) | Histogram / boxplot |
| e | Source of sepsis | Nominal | n (%) per category | Bar chart (not 3-D pie) |
| f | SBP by treatment group | Symmetric, two groups | Mean (SD) per group | Side-by-side boxplots |
Exercise 4: Judge a bad figure
- Each bar is the mean fluid balance per group. The error bar is the standard error (SE), shown in one direction only. Missing: the individual patients, the spread (SD or IQR), the shape (skew), the n per group on the figure, and what the error bar represents.
- Any two of: the data are skewed, one extreme patient (160 ml/kg) pulls the usual-care mean up, the groups overlap a lot, the median, the number of patients, negative values.
- Dots (one per patient) plus a boxplot per group (see the “dots + box” slide), y-axis labelled with units, n under each group. You gain: shape, spread, outliers and overlap become visible, and the reader can judge the comparison.
- The truncated axis makes a 2-percentage-point difference (31% vs 29%) look like a three-fold difference. Fix: start bars at 0 and label the values (or show the difference with its 95% CI).
- The author chose the two scales, so the lines can be made to cross or move together wherever wanted. (ii) Two trends over time moving together is correlation, not causation (other changes may have happened at the same time). Better: two panels sharing the time axis, and an appropriate design (e.g. interrupted time series, Session 3).
Exercise 5: [FLUID-ICU] Spot the problems in the raw FLUID-ICU data
(See FLUID-ICU/cleaning_log.md for the full log.)
| # | What is wrong | What the script does |
|---|---|---|
| a | One variable coded many ways (and a leading space) | Recode to Female / Male |
| b | Dates in different formats (03/04: March or April?) | Read each format explicitly and convert to one date format (YYYY-MM-DD) |
| c | ICU C reported lactate in mg/dL, not mmol/L (about 9 times larger, found by comparing medians by ICU) | Divide ICU C values by 9.01 (1 mmol/L = 9.01 mg/dL), and confirm with the site laboratory |
| d | 999 is a missing-value code, not a lactate |
Set to missing (NA) |
| e | Impossible age (outside the allowed range) | Set to missing, send a query to the site, and keep the patient |
| f | Duplicate record | Check the two rows are identical, keep one copy (623 rows become 620 patients) |
Bonus: editing by hand is invisible and not reproducible. A script plus a log lets anyone check and repeat every change. The log records the problem, how many records, what was done, and why (plus queries sent).
Exercise 6: [FLUID-ICU] Read the FLUID-ICU Table 1
All numbers come from Table 1 of the Q1 results pack (the same table is in the Q2 and Q3 packs).
- Negative balance n = 245, positive n = 373, overall 618 (column headings of Table 1). Two of the 620 enrolled patients have no day-3 fluid balance (weight or output missing after cleaning), so they cannot be placed in a group (participant flow, section 2).
- Model answers:
| Variable | Summary used | Why this summary? |
|---|---|---|
| Age | Mean (SD): 64.6 (15.0) vs 61.4 (15.2) years | Roughly symmetric |
| SOFA score | Median (Q1, Q3): 6 (4, 8) vs 8 (6, 10) | A skewed score |
| Vasopressor on admission | n (%): 61 (25%) vs 205 (55%) | Binary (yes/no) |
- No. The positive-balance group was sicker. The biggest difference is vasopressor on admission: 205 (55%) vs 61 (25%). SOFA (8 vs 6) and mechanical ventilation (216 (58%) vs 97 (40%)) point the same way.
- Lactate, with 91 missing.
- Model sentences: “Of 620 enrolled patients, 618 had a day-3 fluid balance, and 373 of them had a positive balance. Patients with a positive balance were more severely ill at admission (median SOFA 8 vs 6, vasopressor 55% vs 25%, mechanical ventilation 58% vs 40%).”
- Larger. The positive-balance group was sicker, and sicker patients die more, so the crude association mixes fluid with severity (confounding by indication).
Exercise 7: [FLUID-ICU] A FLUID-ICU question as a PECO sentence
Fill in the table for Q1 first. Fill it in again for your own question once you have chosen it (before Session 6).
The table for Q1
| Model answer | |
|---|---|
| The question (Q1 to Q5), copied from page 1 of its results pack | Q1: In adults with sepsis in the ICU, is a positive cumulative fluid balance by day 3 associated with higher 28-day mortality? |
| P: population | Adults with sepsis admitted to one of the four ICUs |
| E: exposure (variable name in the data dictionary) and its type | Positive fluid balance by day 3, positive_balance_d3 (binary). It is derived from cum_fluid_balance_d3_ml_kg (continuous) |
| C: comparator | A negative or zero fluid balance by day 3 |
| O: outcome (variable name) and its type | Death from any cause by day 28, died_28d (binary). Also time to death, time_to_event_28d (time-to-event) |
| One-sentence research question | “In adults with sepsis admitted to the ICU, is a positive cumulative fluid balance by day 3, compared with a negative balance, associated with higher 28-day mortality?” |
| Which test will compare the groups? Which model will adjust? | Chi-square test for the crude comparison. Logistic regression to adjust. Kaplan-Meier and Cox regression for time to death |
When you redo the table for your own question (Q2 to Q5)
| Q | E: exposure (type) | O: outcome (type) | Test, then model |
|---|---|---|---|
| Q2 | Cumulative balance, cum_fluid_balance_d3_ml_kg (continuous, per 10 ml/kg) |
AKI, KDIGO stage 1 or more, aki_any (binary) |
Chi-square by group, then logistic regression |
| Q3 | Cumulative balance (continuous) | Ventilator-free days to day 28, vent_free_days_28 (count 0 to 28, skewed, piled at 0 and 28) |
Wilcoxon rank-sum (Mann-Whitney U) test, then linear regression |
| Q4 | Lactate at admission, lactate_mmol_l, mmol/L (continuous, 15% missing) |
Death by day 28, died_28d (binary) |
Logistic regression, complete case and multiple imputation |
| Q5 | Positive balance, positive_balance_d3 (binary) |
ICU length of stay in survivors, icu_los_days (continuous, right-skewed) |
Wilcoxon rank-sum (Mann-Whitney U) test, then linear regression on the log scale |
Exercise 8: Proposal builder 5 (what a good answer looks like)
Model answer for the running example, a trial of a restrictive fluid strategy against usual care.
8.1 Variables table
| Role | Variable | How measured (unit, time point) | Type |
|---|---|---|---|
| Primary outcome | Death by day 28 | Hospital record or phone call at day 28 | Binary |
| Secondary outcome | Cumulative fluid balance at day 5 | Fluid charts, ml/kg of admission weight, day 5 | Continuous |
| Exposure / intervention | Restrictive vs usual fluid strategy | Randomised allocation | Binary |
| Confounder 1 | Age | Years, at ICU admission | Continuous |
| Confounder 2 | SOFA score | Points, first 24 hours | Ordinal score |
| Confounder 3 | Serum lactate | mmol/L, at ICU admission | Continuous |
| Descriptive | Sex, main source of infection | At ICU admission | Binary, nominal |
In a trial, age, SOFA and lactate are the key baseline variables for Table 1 (see the tip on the sheet).
8.2 Mini-CRF
| # | Question exactly as the data collector will read it | Answer format | “Unknown / not done” option? |
|---|---|---|---|
| 1 | Study ID | FLU-[ ][ ][ ] | No |
| 2 | Age at ICU admission (years) | [ ][ ][ ] | ☑ |
| 3 | Sex | ☐ male ☐ female | No |
| 4 | Main source of infection | ☐ lung ☐ urine ☐ abdomen ☐ other | ☑ |
| 5 | SOFA score in the first 24 hours (0 to 24) | [ ][ ] | ☑ |
| 6 | Serum lactate at ICU admission (mmol/L) | [ ][ ].[ ] | ☑ |
| 7 | Cumulative fluid balance from ICU admission to day 5 (ml) | ☐ + ☐ − [ ][ ][ ][ ][ ] ml | ☑ |
| 8 | Alive at day 28 | ☐ yes ☐ no | ☑ |
8.3 Data dictionary and data-quality plan
| Variable name | Label (meaning) | Type | Unit / codes | Allowed values |
|---|---|---|---|---|
| fb_d5 | Cumulative fluid balance, day 5 | Continuous | ml/kg | -100 to 300 |
| age | Age at ICU admission | Continuous | years | 18 to 110 |
| sex | Sex | Binary | 1 = male, 2 = female | 1, 2 |
| died28 | Died by day 28 | Binary | 0 = alive, 1 = died | 0, 1 |
Data-quality plan: the study nurse checks every form for missing items each week. Each month the data manager runs range checks (for example age 18 to 110) and one consistency check (date of death not before ICU admission).
8.4 Data-management plan
| Question | Model answer |
|---|---|
| Paper CRF with double data entry, or electronic data collection (EDC)? | Electronic data collection (REDCap), with range and logic checks at entry |
| Coded study IDs? Where is the linking log kept, and who can open it? | Yes. The linking log is a separate, locked file. Only the principal investigator and the data manager can open it. |
| Validation rules at entry (two examples from your data dictionary) | Age 18 to 110 years. fb_d5 between -100 and 300 ml/kg. |
| Audit trail / cleaning log: who records changes? | REDCap records every change. The data manager keeps the cleaning log. |
| Backups (3-2-1) and data-sharing statement in the consent form | Encrypted backups: three copies on two kinds of media, one off site. The consent form says that coded data may be shared with other researchers. |