Equivalent insulin pump retrospective virtual basal rates for daily injections are constructed from planned insulin injections according to a virtual basal rate profile developed for a patient, and a database of historical insulin injections, i.e. basal injections actually administered by the patient, providing a unified framework for analysis, design, optimization, and adaptation of MDI (multiple daily injections) and CSII (continuous subcutaneous insulin infusion (i.e. insulin pump)) treatment parameters for patients with diabetes.