Computes the trimmed mean of a data set.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real64), | intent(inout), | dimension(:) | :: | x |
An N-element array containing the data. On output, the array is sorted into ascending order. |
|
| real(kind=real64), | intent(in), | optional | :: | p |
An optional parameter specifying the percentage of values from either end of the distribution to remove. The default is 0.05 such that the bottom 5% and top 5% are removed. |
Trimmed mean; invalid p or empty/nonfinite data give NaN.
Computes the trimmed mean and sorts the column's values in ascending order. Uses a borrowed view without reallocating the underlying array.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(data_column), | intent(inout), | target | :: | x |
The input column; sorted on success, unchanged for invalid inputs. Unallocated storage is treated as empty. |
|
| real(kind=real64), | intent(in), | optional | :: | p |
Fraction to remove from each end, in [0, 0.5); defaults to 0.05. |
Trimmed mean; empty/nonfinite data or invalid/nonfinite p give NaN.