"stability" function. The change on the spherical equivalent with time

In laser refractive surgery procedures it is important to control the stability of the postoperative refraction with time. For this purpose, the standard proposes a stability graph that shows the variation of the postoperative spherical equivalent at different follow-up visits through the mean and standard deviation of the sample. 

This function calculates the standardized Graph E detailed in the Journal of Refractive Surgery(1) from a multiple column matrix. Columns should contain:

  • The preoperative spherical equivalent in the first column.
  • As many columns more as follow-up visits have been conducted. The standard suggests 2 weeks, 1 month, 3 months, 6 months and 12 months but the function can report the number of months specifically measured in your project.

Example:

  • stability(A,{'0.5','1','3','6','12'},11,'en',[2 5])

Below you have the help of the function. For more information about "refractiveAnalysis" Toolbox please Contact the author.

%   Computes the Stability of the procedure for the Spherical Equivalent.
%
%   DESCRIPTION
%
%   Computes the Figure E for the standard of the JRS (1)
%
%   PARAMETERS
%   
%   A           As much columns as much months evaluated
%               First column always the Preoperative SEQ
%               Second column the postoperative after x Month
%               Third column the postoperative after x Month
%
%   months      A cell array containing the specific months. Example: {'0.5','1','3','6','12'}
%      
%   month       Last month of the follow-up
%
%   language    Language for the labels 'es' for Spanish or 'en' for English
%
%   rangeChange The period for which you want to show the percentage of
%               eyes > +- 0.5 D variation.
%
%   EXAMPLE
%
%   stability(A,{'0.5','1','3','6','12'},11,'en',[2 5])
%
%   VERSION
%   
%   1.0.0
%
%   demo data "stability.mat"
%
%   1.- Reinstein DZ, Archer TJ, Randleman JB. JRS Standard for Reporting Astigmatism Outcomes of Refractive Surgery. J Refract Surg. 2014; 30: 654–9.