quantile Interface

public interface quantile

Module Procedures

private pure function quantile_array(x, q) result(rst)

Computes the specified quantile of a data set using the SAS Method 4.

See Also

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x(:)

An N-element array containing the data.

real(kind=real64), intent(in) :: q

The quantile to compute (e.g. 0.25 computes the 25% quantile).

Return Value real(kind=real64)

Quantile; empty/nonfinite data or q outside [0, 1] give NaN.

private pure function quantile_column(x, q) result(rst)

Computes a quantile using the array implementation on a copy.

Arguments

Type IntentOptional Attributes Name
class(data_column), intent(in) :: x

The input column, unchanged; unallocated storage is treated as empty.

real(kind=real64), intent(in) :: q

The quantile probability in [0, 1], using the array routine's interpolation.

Return Value real(kind=real64)

Quantile; empty/nonfinite data or invalid/nonfinite q give NaN.