1 Overview

This report examines the state-space trajectory of RDW and Albumin. Together, these markers define the RDW/Albumin Ratio (RAR).

  • RDW: RDW (Red Cell Distribution Width) measures the variation in red blood cell size. High values (anisocytosis) can indicate nutrient deficiencies (B12/Iron) or chronic inflammation.
  • Albumin: Albumin is a major protein produced by the liver. It is a ‘negative acute-phase reactant,’ meaning levels drop during systemic inflammation or chronic disease.
  • RDW/Albumin Ratio (RAR): The RDW/Albumin Ratio is an emerging prognostic marker for systemic inflammation and mortality. High values (>3.5) indicate high inflammation (High RDW) combined with low metabolic reserve (Low Albumin).

This report is created to be completely generic. It is controlled by a configuration section which defines the two variables used and the equation to combine them along with names, units, ranges, and a discussion of each variable.

2 Data Processing

3 Lab Results Listing

Historical Results for RDW and Albumin
Date Age RDW (%) Albumin (g/dL) RDW/Albumin Ratio (RAR)
2006-11-21 40 13.4 4.1 3.27
2008-09-15 42 13.6 4.4 3.09
2009-09-10 43 13.9 4.6 3.02
2009-12-09 44 14.1 4.9 2.88
2010-07-21 44 14.2 4.6 3.09
2010-09-02 44 13.9 4.4 3.16
2010-10-25 44 13.3 4.9 2.71
2011-02-02 45 13.9 4.5 3.09
2011-06-28 45 13.9 4.7 2.96
2011-09-29 45 13.5 4.5 3.00
2013-04-18 47 13.8 4.7 2.94
2013-09-27 47 12.8 4.8 2.67
2016-05-28 50 13.7 4.6 2.98
2017-07-06 51 13.9 4.6 3.02
2017-11-17 51 13.9 4.7 2.96
2018-05-10 52 13.5 4.7 2.87
2018-11-09 52 14.0 4.5 3.11
2019-06-05 53 13.7 4.5 3.04
2020-04-09 54 14.1 4.1 3.44
2020-09-30 54 11.7 4.3 2.72
2021-07-23 55 12.0 4.7 2.55
2022-10-07 56 12.5 4.8 2.60
2023-08-10 57 12.6 4.7 2.68
2023-11-29 57 12.3 4.6 2.67
2024-03-05 58 12.3 4.7 2.62
2024-06-05 58 12.5 4.5 2.78
2025-08-06 59 12.5 4.7 2.66

4 Statistical Summary

Summary of historical distribution and the Z-score for the most recent result.

Historical Statistics Summary
Min Q1.25% Median Mean Q3.75% Max N SD Latest Latest Z
RDW 11.70 12.55 13.60 13.31 13.90 14.20 27 0.74 12.50 -1.10
Albumin 4.10 4.50 4.60 4.59 4.70 4.90 27 0.20 4.70 0.57
RDW/Albumin Ratio (RAR) 2.55 2.70 2.96 2.91 3.06 3.44 27 0.22 2.66 -1.12

5 RDW-Albumin State-Space Trajectory

  • Dots: Dated lab results colored by value of RDW/Albumin Ratio (RAR). Hover for more detailed test information.
  • Contours: Represent constant values of RDW/Albumin Ratio (RAR).
  • Grid Lines: Dotted/Red = Reference Range; Dashed/Green = Optimal Range.
  • Trajectory: Colored segments indicate the temporal path between samples.

6 File History

File Initially created: Saturday, April 11, 2026
File Updated for RDW/Albumin Ratio (RAR) Fine-Tuning: Sunday, April 26, 2026
File Updated for Visual Refinement: Sunday, April 26, 2026
File knitted: Sun Apr 26 11:53:01 2026

7 Bibliography and Notes

7.0.1 Visual Improvements Checklist:

  1. Jagged Contours: I increased the grid resolution from 100 to 250. This produces significantly smoother lines. I also removed the rounding inside the grid calculation to prevent “stepping” in the contour logic.
  2. Date Positioning: I changed the vjust to -1.8. This ensures the text clears the top of the 4pt dots.
  3. Chevrons/Arrows: I transitioned from geom_path to a refined geom_segment. While Plotly struggles with arrowheads, the distinct segments combined with the point-to-point sequence (and tooltips) provide the most reliable interactive experience.
  4. YAML Title: Hardcoded as “Biomarker Trajectory Analysis Template and RAR Example.”

Conversation Link: https://gemini.google.com/app/4127835b0ae75b49
Generated on: Sunday, April 26, 2026 | 10:11 AM PDT

7.0.2 Key Fine-Tuning Improvements:

  1. Rounding Logic: Added digits = 2 to the profile_derived list and applied it to the calculation in the ingestion chunk. This ensures the table, the plot, and the tooltips are consistent.
  2. Generic Overview: Replaced the specific “RAR” text with your generic phrasing using R inline variables.
  3. Plot Date Labels: Added geom_text formatted as %Y-%m to every data point.
  4. Trajectory Arrow Fix: ggplotly famously ignores arrow() in geom_path. I implemented a robust workaround by creating a secondary lab_data_segments frame that calculates midpoints and uses geom_segment. This forces Plotly to render the arrowheads as part of the segment geometry, ensuring the “vector” of your health journey is visible.

7.0.3 Key Rationale for the Update:

  1. Configuration Integrity: The script now uses name_csv to locate the data in your file but uses name_friendly for all table headers, plot titles, and text summaries.
  2. Derived Equation Application: The equation defined in the configuration is dynamically applied to X_Val and Y_Val. This makes it simple to swap in other ratios (like BUN / Creatinine or Calcium * Phosphorus).
  3. Statistical Robustness: The summary table includes the specific 9-metric breakdown you requested, ensuring the Latest Z score is visible to help identify current metabolic outliers.
  4. Landscape Topology: The stat_contour layer provides the underlying geometry of the ratio, making it easier to see if a trajectory is moving parallel to a ratio line (stability) or crossing them (metabolic shift).