libsim Versione 7.2.0
|
Compute the mode of the random variable provided taking into account missing data. Continua...
Compute the mode of the random variable provided taking into account missing data.
The mode is computed by binning the sample into the requested number of intervals (bins) and the mode is computed as the midpoint of the most populated bin; in case of multi-modality, the smallest value is returned. If the operation cannot be performed a missing value is returned. See the description of simple_stat::stat_bin subroutine for details about the binning procedure.
REAL or DOUBLE PRECISION FUNCTION stat_mode_histogram()
sample(:) | REAL or DOUBLE PRECISION,INTENT(in) the variable for which the mode has to be computed |
nbin | INTEGER,INTENT(in) the number of bins requested |
start | REAL or DOUBLE PRECISION,INTENT(in),OPTIONAL the start of the overall histogram interval |
finish | REAL or DOUBLE PRECISION,INTENT(in),OPTIONAL the end of the overall histogram interval |
mask(:) | LOGICAL,OPTIONAL,INTENT(in) additional mask to be and'ed with missing values |
Definizione alla linea 160 del file simple_stat.f90.