DOI: 10.5281/zenodo.18380481
title: SimpLi: Simulation-Based Standardization of Serum Lithium Concentrations to 12 Hours

description: Overview

This repository provides the full simulation dataset and R code accompanying the study on standardization of serum lithium concentrations measured at non-12-hour time points to a 12-hour reference level.

The project introduces SimpLi, a simulation-based and model-driven framework that allows recalculation of serum lithium concentrations measured at arbitrary times after the last dose to a standardized 12-hour level, which is the conventional reference in clinical practice.

All data provided here are fully simulated and do not contain any real patient information.



Contents

Files





SimpLi.RMain R script containing:





generation of simulation datasets




primary (sqrt-normal) and sensitivity (lognormal) scenarios




dose generation with predefined correlation structure




model training and validation




multiplicative standardization formula




final web-ready SimpLi() function






dat_sqrt_with_discrete_dose_300.csvPrimary simulated dataset (n = 1000) with:





discrete lithium doses (300 mg step)




serum lithium concentrations




time since last dose (hours)




time bins matching published summary statistics







Simulation Design





Sample size: 1000 simulated observations




Time since last dose: 0–24 hours





Deterministic design ensuring interquartile range 11–14 hours




Pronounced peak at 12 hours






Serum lithium concentration (seLi, mEq/L):





Primary scenario: sqrt-normal distribution




Sensitivity scenario: lognormal distribution






Dose (dose_mg, mg/day):





Generated to match published mean and SD within time bins




Target correlation with serum lithium: r ≈ 0.40




Discretized to 300 mg steps with within-bin recalibration





Target summary statistics were derived from published aggregate data (Table 1 in the associated article).



Statistical Modeling





Outcome: serum lithium concentration (mEq/L)




Predictors:





time since last dose (hours)




daily lithium dose (mg/day)






Model:
seLi=β0+βt⋅t+βd⋅dose\sqrt{\text{seLi}} = \beta_0 + \beta_t \cdot t + \beta_d \cdot \text{dose}seLi=β0+βt⋅t+βd⋅dose



Validation strategy:





70/30 train–test split stratified by time bins




5-fold cross-validation on the training set




Performance metrics: RMSE, MAE, R²




Evaluation both overall and by time bin







Multiplicative Standardization to 12 Hours

Standardization from an observed concentration CmeasC_{\text{meas}}Cmeas at time tmeast_{\text{meas}}tmeas to a 12-hour level is performed as:

C12=C^12×CmeasC^measC_{12} = \hat{C}_{12} \times \frac{C_{\text{meas}}}{\hat{C}_{\text{meas}}}C12=C^12×C^measCmeas

where:





C^meas\hat{C}_{\text{meas}}C^meas is the model-predicted concentration at the observed time




C^12\hat{C}_{12}C^12 is the model-predicted concentration at 12 hours for the same dose



This approach preserves individual deviations while adjusting for time-dependent pharmacokinetics.



Example Usage (R)







 



source("SimpLi.R")

SimpLi(
  C_meas = 0.90,
  t_meas = 14.9,
  dose_mg = 450
)





Intended Use





Methodological research on lithium pharmacokinetics




Simulation studies and sensitivity analyses




Reproducibility of results reported in the accompanying article




Educational and methodological demonstration of standardization approaches



This code and dataset are not intended for direct clinical decision-making without external validation.



Data Availability

All data in this repository are synthetic (simulated) and were generated exclusively for methodological and reproducibility purposes.No real patient data were used.



Author

Evgeny KasyanovEmail: i@kasyan.ru