Algorithm of weighted mean and standard deviation calculation.

First, different average types are converted to mean according to the following formulas:

  1. If average type is Mean then

Mean=Species value in unified units

  1. If average type is Median then

(a) for patient number <= 25:

Mean=(RangeMinValue+2* Species value in unified units +RangeMaxValue)/4

If Dispersion type is not range then

Mean= Species value in unified units

(b) for patient number > 25:

Mean= Species value in unified units

  1. If average type is Average then

Mean=Species value in unified units

  1. If average type is Geometric mean we do not take into account this value.
  2. If average type is NA= Not available we do not take into account this value.
  3. If average type is Geometric average we do not take into account this value.
  4. If average type is Not specified we do not take into account this value.
  5. If average type is Single value we do not take into account this value.

Second, different dispersion types are converted to standard deviation (SD) according to the following formulas:

  1. If dispersion type is SD then

SD=Species dispersion left

  1. If dispersion type is SEM then

SD=Species Dispersion left*Patient number^1/2

  1. If dispersion type is IQR [Q1, Q3] then

SD=(Species Dispersion right-Species Dispersion left)/1.35

  1. If dispersion type is range then (for less than 15 patients in the group) SD=sqrt(1/12*(((Range Min Value-2*Median+Range Max Value)^2)/4+(Range Max Value-Range Min Value)^2))

If patient number is more than 15 then

SD=(Range Max Value-Range Min Value)/4

  1. If dispersion type is 95%CI then

SD=(Species Dispersion right-Species Dispersion left)/3.92

  1. If dispersion type is not specified we do not take into account this value.
  2. If dispersion type is SE then

SD=Species Dispersion left*Patient number^1/2

  1. If dispersion typeis IPR[5%,95%] we do not take into account this value.
  2. If dispersion type is Geom SD we do not take into account this value.
  3. If dispersion type is IQR[Q3-Q1] then

 SD=Species Dispersion left/1.35

  1. If dispersion type is IPR[10%-90%] we do not take into account this value.
  2. If dispersion type is IPR[2.5%,97.5%] then

SD=(Species Dispersion right-Species Dispersion left)/3.92

  1. If dispersion type is 2SD then

SD=Species dispersion left /2

  1. If dispersion type is 90%CI then we do not take into account this value.

 

Third, we calculate weighted mean:

Weighted mean=(Patient number1*Mean1+Patient number2*Mean2+…)/(Patient number1+Patient number2+…)

 

Fourth, we calculate weighted SD:

Weighted SD=(((Pt number1-1)*SD1^2+(Pt number2-1)*SD2^2+…)-(Pt number1+Pt number2+…)*weighted mean^2+(Pt number1*Mean1+Pt number2*Mean2+…)/((Pt number1-1)+(Pt number2-1)+…)^0.5

 

Weighted mean and SD are presented in the last row of the results table.