Variable: StatsResult
- Updated2024-09-12
- 2 minute(s) read
Variable: StatsResult
Variable: StatsResult
Specifies the values of the custom properties for the statistical values calculated by the commands ChnStatisticsBlockCalc and ChnStatisticsChannelCalc.
| Definition | StatsResult(i), Floating-point number i = 1 ... 2147483647 |
Access: Read/Write |
Index i can have the following constants:
| 2^0 | eStatsIndex | Index number |
| 2^1 | eStatsSum | Sum of measured values |
| 2^2 | eStatsSumOfSquares | Square sum |
| 2^3 | eStatsMinimum | Minimum value |
| 2^4 | eStatsMaximum | Maximum value |
| 2^5 | eStatsArithmeticMean | Arithmetic mean |
| 2^6 | eStatsSquareMean | Root mean square |
| 2^7 | eStatsGeometricMean | Geometric mean |
| 2^8 | eStatsHarmonicMean | Harmonic mean |
| 2^9 | eStatsLowerQuartile | 0.25 quantile (lower quartile) |
| 2^10 | eStatsMedian | 0.50 quantile (median) |
| 2^11 | eStatsUpperQuartile | 0.75 quantile (upper quartile) |
| 2^12 | eStatsRange | Range |
| 2^13 | eStatsStandardDeviation | Standard deviation |
| 2^14 | eStatsVariance | Variance |
| 2^15 | eStatsVariationCoefficient | Variation coefficient |
| 2^16 | eStatsQuartileDistance | Quartile distance |
| 2^17 | eStatsRelativeVariationCoefficient | Relative variation coefficient |
| 2^18 | eStatsAverageAbsoluteDeviationFromMean | Average absolute deviation from mean |
| 2^19 | eStatsAverageAbsoluteDeviationFromMedian | Average absolute deviation from median |
| 2^20 | eStatsSkewness | Skewness |
| 2^21 | eStatsKurtosis | Kurtosis |
| 2^22 | eStatsStandardError | Standard error |
| 2^23 | eStatsExcessKurtosis | Excess |
| 2^24 | eStatsThreeSigma | Three sigma |
| 2^25 | eStatsSixSigma | Six sigma |
| 2^26 | eStatsNormDistB | Anderson-Darling test |
| 2^27 | eStats0025Quantile | 0.025 quantile |
| 2^28 | eStats0975Quantile | 0.975 quantile |
| (2^31)-1 | eStatsAll | Not supported |
The following example calculates the statistical characteristic values minimum, maximum, and geometric mean for the first channel of the first channel group and displays the values. DIAdem saves the results as custom properties of the input channel.
| VBScript | Python |
Set ChnResult = ChnStatisticsChannelCalc("[1]/[1]", eStatsMinimum + eStatsMaximum + eStatsGeometricMean) Call MsgBox(StatsPropertyName(eStatsMinimum) & " : " & StatsResult(eStatsMinimum) & VBCrLf & _ StatsPropertyName(eStatsMaximum) & " : " & StatsResult(eStatsMaximum) & VBCrLf & _ StatsPropertyName(eStatsGeometricMean) & " : " & StatsResult(eStatsGeometricMean))
Used by
Command: ChnStatisticsBlockCalc | Command: ChnStatisticsChannelCalc | Descriptive Statistics | Program Variables in Commands