discr2(3f) - [M_datapac:STATISTICS] bin the elements of a vector (output vector contains class midpoints)
Synopsis
Description
Options
Examples
Author
Maintainer
License
SUBROUTINE DISCR2(X,N,Numcla,Y)
discr2(3f) discretizes the data of the REAL vector x into numcla classes.all values in the vector x within a given class will be mapped into the midpoint of that class.
the sample minimum and sample maximum are automatically computed internally and the class width (xdel) is computed as the (sample max - sample min)/numcla.
the first class interval is from the sample min to the sample min + xdel; the second class interval is from the sample min + xdel to the sample min + 2*xdel; ...;
the last class interval is from the sample max - xdel to the sample max. The use of discr2(3f) (and the discre and discr3 subroutines) gives the data analyst the capability of constructing a discrete variate from a continuous one.
the resulting discrete variate might then (for example) be analyzed in itself for gross structure, or for adherence to some theoretical discrete probability model, or the discrete variate might be used as a subset definition vector for some other variate.
X description of parameter Y description of parameter
Sample program:
program demo_discr2 use M_datapac, only : discr2 implicit none ! call discr2(x,y) end program demo_discr2Results:
The original DATAPAC library was written by James Filliben of the Statistical Engineering Division, National Institute of Standards and Technology.
John Urban, 2022.05.31
CC0-1.0
Nemo Release 3.1 | discr2 (3) | February 23, 2025 |