ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_sampleECDF::setECDF Interface Reference

Compute and return the Empirical Cumulative Distribution Function (ECDF) of a univariate (optionally weighted) sample of size size(ecdf). More...

Detailed Description

Compute and return the Empirical Cumulative Distribution Function (ECDF) of a univariate (optionally weighted) sample of size size(ecdf).

Parameters
[out]ecdf: The output contiguous array of rank 1 of
  1. type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
of the same size nsam as the number of observations in the target sample whose ECDF must be computed.
On output, it contains the Empirical Cumulative Distribution Function (ECDF) of the input sample.
[in]weight: The input contiguous vector of length nsam of,
  1. type integer of default kind IK, or
  2. type real of the same kind as the kind of ecdf,
containing the corresponding weights of individual nsam observations in the target sample.
(optional. default = getFilled(1, nsam).)
[in]weisum: The input scalar of the same type and kind as weight containing the quantity sum(weight).
(optional. It must be present if and only if the input argument weight is also present.)
[out]lcdf: The output contiguous array of the same type, kind, rank, and size as the output ecdf containing the lower confidence bound on the ECDF as the specified \(1 - \alpha\) probability.
(optional, if missing, it is not computed. It can be present if and only if the input argument weight is missing or is of type integer of default kind IK.)
[out]ucdf: The output contiguous array of the same type, kind, rank, and size as the output ecdf containing the upper confidence bound on the ECDF as the specified \(1 - \alpha\) probability.
(optional, if missing, it is not computed. It can be present if and only if the input argument weight is missing or is of type integer of default kind IK.)
[in]alpha: The input scalar of type real of the same kind as the kind of ecdf such that \(1 - \alpha\) represents the probability of the parent CDF being bounded by the output upper and lower confidence bounds of the output ecdf.
For example, if \(\alpha = 0.05\), then the output lcdf and ucdf confidence bounds contain the CDF of the true parent distribution of the sample with \( 95\% \) probability.
In other words,
  1. the lower bound marks the \(\alpha / 2\) probability contour.
  2. the upper bound marks the \(1 - \alpha / 2\) probability contour.
(optional, default = 0.05. It can be present if and only if the input argument weight is missing or is of type integer of default kind IK.)


Possible calling interfaces

call setECDF(ecdf(1 : nsam) , lcdf = lcdf(1 : nsam), ucdf = ucdf(1 : nsam), alpha = alpha)
call setECDF(ecdf(1 : nsam), weight(1 : nsam), lcdf = lcdf(1 : nsam), ucdf = ucdf(1 : nsam), alpha = alpha) ! integer (frequency) weight
call setECDF(ecdf(1 : nsam), weight(1 : nsam)) ! real (reliability) weight
!
Compute and return the Empirical Cumulative Distribution Function (ECDF) of a univariate (optionally ...
This module contains classes and procedures for computing the Empirical Cumulative Distribution Funct...
Warning
The pure procedure(s) documented herein become impure when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1.
By default, these procedures are pure in release build and impure in debug and testing builds.
See also
getCumSum
setCumSum
getCumPropExp
setCumPropExp


Example usage

1program example
2
3 use pm_kind, only: SK, IK, LK
4 use pm_kind, only: IKG => IKS ! all processor kinds are supported.
5 use pm_sampleECDF, only: setECDF
6 use pm_arrayRange, only: getRange
9 use pm_distUnif, only: getUnifRand
10 use pm_arraySort, only: setSorted
11 use pm_io, only: display_type
12
13 implicit none
14
15 type(display_type) :: disp
16 integer(IK) :: itry, ntry = 10
17 disp = display_type(file = "main.out.F90")
18
19 block
20 use pm_kind, only: RKG => RKS ! all processor kinds are supported.
21 real(RKG), allocatable :: ecdf(:), lcdf(:), ucdf(:)
22 integer(IK), allocatable :: iweight(:)
23 real(RKG), allocatable :: rweight(:)
24 do itry = 1, ntry
25 call disp%show("call setResized(ecdf, getUnifRand(1_IK, 10_IK))")
26 call setResized(ecdf, getUnifRand(1_IK, 10_IK))
27 call disp%show("call setResized(lcdf, size(ecdf, 1, IK))")
28 call setResized(lcdf, size(ecdf, 1, IK))
29 call disp%show("call setResized(ucdf, size(ecdf, 1, IK))")
30 call setResized(ucdf, size(ecdf, 1, IK))
31 call disp%show("call setECDF(ecdf, lcdf, ucdf)")
32 call setECDF(ecdf, lcdf, ucdf)
33 call disp%show("lcdf")
34 call disp%show( lcdf )
35 call disp%show("ecdf")
36 call disp%show( ecdf )
37 call disp%show("ucdf")
38 call disp%show( ucdf )
39 call disp%show("call setECDF(ecdf)")
40 call setECDF(ecdf)
41 call disp%show("ecdf")
42 call disp%show( ecdf )
43 call disp%skip()
44 call disp%show("iweight = getUnifRand(1, 10, size(ecdf, 1, IK))")
45 iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
46 call disp%show("iweight")
47 call disp%show( iweight )
48 call disp%show("call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)")
49 call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
50 call disp%show("lcdf")
51 call disp%show( lcdf )
52 call disp%show("ecdf")
53 call disp%show( ecdf )
54 call disp%show("ucdf")
55 call disp%show( ucdf )
56 call disp%skip()
57 call disp%show("rweight = iweight")
58 rweight = iweight
59 call disp%show("rweight")
60 call disp%show( rweight )
61 call disp%show("call setECDF(ecdf, rweight, sum(rweight))")
62 call setECDF(ecdf, rweight, sum(rweight))
63 call disp%show("ecdf")
64 call disp%show( ecdf )
65 call disp%skip()
66 end do
67 end block
68
69 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70 ! Compute the ecdf for varying sizes of a Normal sample.
71 ! %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72
73 block
74 use pm_val2str, only: getStr
75 use pm_kind, only: RKG => RKS
76 use pm_distNorm, only: setNormRand
77 character(:, SK), allocatable :: fileName
78 real(RKG), allocatable :: sample(:), ecdf(:), lcdf(:), ucdf(:)
79 integer(IK) :: i, isam, nsam
80 integer(IK) :: fileUnit
81 do i = 1, 4
82 nsam = 10 ** i
83 call setResized(lcdf, nsam)
84 call setResized(ecdf, nsam)
85 call setResized(ucdf, nsam)
86 call setResized(sample, nsam)
87 call setNormRand(sample)
88 call setSorted(sample)
89 call setECDF(ecdf, lcdf, ucdf, alpha = 0.98_RKG)
90 fileName = "main.norm." // getStr(nsam) // ".out"
91 open(newunit = fileUnit, file = fileName, status = "replace")
92 write(fileUnit, "(*(g0,:,','))") "sample,ecdf,lcdf,ucdf"
93 do isam = 1, nsam
94 write(fileUnit,"(*(g0,:,','))") sample(isam), ecdf(isam), lcdf(isam), ucdf(isam)
95 end do
96 close(fileUnit)
97 end do
98 end block
99
100end program example
Generate minimally-spaced character, integer, real sequences or sequences at fixed intervals of size ...
Allocate or resize (shrink or expand) an input allocatable scalar string or array of rank 1....
Perform an unbiased random shuffling of the input array, known as the Knuth or Fisher-Yates shuffle,...
Sort the input scalar string or contiguous vector in ascending order, or return the sorted indices of...
Return a scalar or array of arbitrary rank of random values from the standard univariate Normal distr...
Generate and return a scalar or a contiguous array of rank 1 of length s1 of randomly uniformly distr...
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11726
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
Generate and return the conversion of the input value to an output Fortran string,...
Definition: pm_val2str.F90:167
This module contains procedures and generic interfaces for generating ranges of discrete character,...
This module contains procedures and generic interfaces for resizing allocatable arrays of various typ...
This module contains procedures and generic interfaces for shuffling arrays of various types.
This module contains procedures and generic interfaces for various sorting tasks.
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
Definition: pm_io.F90:252
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
Definition: pm_io.F90:11393
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter IKS
The single-precision integer kind in Fortran mode. On most platforms, this is a 32-bit integer kind.
Definition: pm_kind.F90:563
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
integer, parameter RKS
The single-precision real kind in Fortran mode. On most platforms, this is an 32-bit real kind.
Definition: pm_kind.F90:567
This module contains the generic procedures for converting values of different types and kinds to For...
Definition: pm_val2str.F90:58
Generate and return an object of type display_type.
Definition: pm_io.F90:10282

Example Unix compile command via Intel ifort compiler
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example output
1call setResized(ecdf, getUnifRand(1_IK, 10_IK))
2call setResized(lcdf, size(ecdf, 1, IK))
3call setResized(ucdf, size(ecdf, 1, IK))
4call setECDF(ecdf, lcdf, ucdf)
5lcdf
6+0.00000000, +0.396772027E-1
7ecdf
8+0.500000000, +1.00000000
9ucdf
10+1.00000000, +1.00000000
11call setECDF(ecdf)
12ecdf
13+0.500000000, +1.00000000
14
15iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
16iweight
17+7, +4
18call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
19lcdf
20+0.226880610, +0.590516984
21ecdf
22+0.636363626, +1.00000000
23ucdf
24+1.00000000, +1.00000000
25
26rweight = iweight
27rweight
28+7.00000000, +4.00000000
29call setECDF(ecdf, rweight, sum(rweight))
30ecdf
31+0.636363626, +1.00000000
32
33call setResized(ecdf, getUnifRand(1_IK, 10_IK))
34call setResized(lcdf, size(ecdf, 1, IK))
35call setResized(ucdf, size(ecdf, 1, IK))
36call setECDF(ecdf, lcdf, ucdf)
37lcdf
38+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.102855057, +0.213966161, +0.325077266, +0.436188370, +0.547299504
39ecdf
40+0.111111112, +0.222222224, +0.333333343, +0.444444448, +0.555555582, +0.666666687, +0.777777791, +0.888888896, +1.00000000
41ucdf
42+0.563811660, +0.674922764, +0.786033869, +0.897144973, +1.00000000, +1.00000000, +1.00000000, +1.00000000, +1.00000000
43call setECDF(ecdf)
44ecdf
45+0.111111112, +0.222222224, +0.333333343, +0.444444448, +0.555555582, +0.666666687, +0.777777791, +0.888888896, +1.00000000
46
47iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
48iweight
49+9, +5, +7, +3, +9, +6, +4, +6, +3
50call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
51lcdf
52+0.00000000, +0.808959752E-1, +0.215511367, +0.273203671, +0.446280599, +0.561665237, +0.638588309, +0.753972948, +0.811665177
53ecdf
54+0.173076928, +0.269230783, +0.403846174, +0.461538494, +0.634615421, +0.750000060, +0.826923132, +0.942307770, +1.00000000
55ucdf
56+0.361411750, +0.457565606, +0.592180967, +0.649873316, +0.822950244, +0.938334882, +1.00000000, +1.00000000, +1.00000000
57
58rweight = iweight
59rweight
60+9.00000000, +5.00000000, +7.00000000, +3.00000000, +9.00000000, +6.00000000, +4.00000000, +6.00000000, +3.00000000
61call setECDF(ecdf, rweight, sum(rweight))
62ecdf
63+0.173076928, +0.269230783, +0.403846174, +0.461538494, +0.634615421, +0.750000060, +0.826923132, +0.942307770, +1.00000000
64
65call setResized(ecdf, getUnifRand(1_IK, 10_IK))
66call setResized(lcdf, size(ecdf, 1, IK))
67call setResized(ucdf, size(ecdf, 1, IK))
68call setECDF(ecdf, lcdf, ucdf)
69lcdf
70+0.00000000, +0.00000000, +0.00000000, +0.198386014E-1, +0.144838601, +0.269838601, +0.394838601, +0.519838572
71ecdf
72+0.125000000, +0.250000000, +0.375000000, +0.500000000, +0.625000000, +0.750000000, +0.875000000, +1.00000000
73ucdf
74+0.605161428, +0.730161428, +0.855161428, +0.980161428, +1.00000000, +1.00000000, +1.00000000, +1.00000000
75call setECDF(ecdf)
76ecdf
77+0.125000000, +0.250000000, +0.375000000, +0.500000000, +0.625000000, +0.750000000, +0.875000000, +1.00000000
78
79iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
80iweight
81+4, +9, +2, +6, +2, +9, +3, +6
82call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
83lcdf
84+0.00000000, +0.104973346, +0.153753847, +0.300095290, +0.348875791, +0.568387985, +0.641558647, +0.787900209
85ecdf
86+0.975609720E-1, +0.317073166, +0.365853667, +0.512195110, +0.560975611, +0.780487776, +0.853658497, +1.00000000
87ucdf
88+0.309660792, +0.529173017, +0.577953458, +0.724294901, +0.773075461, +0.992587566, +1.00000000, +1.00000000
89
90rweight = iweight
91rweight
92+4.00000000, +9.00000000, +2.00000000, +6.00000000, +2.00000000, +9.00000000, +3.00000000, +6.00000000
93call setECDF(ecdf, rweight, sum(rweight))
94ecdf
95+0.975609720E-1, +0.317073166, +0.365853667, +0.512195110, +0.560975611, +0.780487776, +0.853658497, +1.00000000
96
97call setResized(ecdf, getUnifRand(1_IK, 10_IK))
98call setResized(lcdf, size(ecdf, 1, IK))
99call setResized(ucdf, size(ecdf, 1, IK))
100call setECDF(ecdf, lcdf, ucdf)
101lcdf
102+0.00000000, +0.00000000, +0.709492564E-1, +0.320949256
103ecdf
104+0.250000000, +0.500000000, +0.750000000, +1.00000000
105ucdf
106+0.929050744, +1.00000000, +1.00000000, +1.00000000
107call setECDF(ecdf)
108ecdf
109+0.250000000, +0.500000000, +0.750000000, +1.00000000
110
111iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
112iweight
113+7, +9, +7, +1
114call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
115lcdf
116+0.144453645E-1, +0.389445364, +0.681112051, +0.722778678
117ecdf
118+0.291666687, +0.666666687, +0.958333373, +1.00000000
119ucdf
120+0.568888009, +0.943888009, +1.00000000, +1.00000000
121
122rweight = iweight
123rweight
124+7.00000000, +9.00000000, +7.00000000, +1.00000000
125call setECDF(ecdf, rweight, sum(rweight))
126ecdf
127+0.291666687, +0.666666687, +0.958333373, +1.00000000
128
129call setResized(ecdf, getUnifRand(1_IK, 10_IK))
130call setResized(lcdf, size(ecdf, 1, IK))
131call setResized(ucdf, size(ecdf, 1, IK))
132call setECDF(ecdf, lcdf, ucdf)
133lcdf
134+0.00000000, +0.00000000, +0.00000000, +0.581144691E-1, +0.200971603, +0.343828738, +0.486685872
135ecdf
136+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
137ucdf
138+0.656171262, +0.799028397, +0.941885591, +1.00000000, +1.00000000, +1.00000000, +1.00000000
139call setECDF(ecdf)
140ecdf
141+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
142
143iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
144iweight
145+2, +4, +6, +7, +2, +5, +3
146call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
147lcdf
148+0.00000000, +0.00000000, +0.161599964, +0.402979285, +0.471944779, +0.644358635, +0.747806907
149ecdf
150+0.689655170E-1, +0.206896544, +0.413793087, +0.655172408, +0.724137902, +0.896551728, +1.00000000
151ucdf
152+0.321158648, +0.459089667, +0.665986180, +0.907365561, +0.976330996, +1.00000000, +1.00000000
153
154rweight = iweight
155rweight
156+2.00000000, +4.00000000, +6.00000000, +7.00000000, +2.00000000, +5.00000000, +3.00000000
157call setECDF(ecdf, rweight, sum(rweight))
158ecdf
159+0.689655170E-1, +0.206896544, +0.413793087, +0.655172408, +0.724137902, +0.896551728, +1.00000000
160
161call setResized(ecdf, getUnifRand(1_IK, 10_IK))
162call setResized(lcdf, size(ecdf, 1, IK))
163call setResized(ucdf, size(ecdf, 1, IK))
164call setECDF(ecdf, lcdf, ucdf)
165lcdf
166+0.00000000, +0.00000000, +0.00000000, +0.112224042, +0.278890729, +0.445557356
167ecdf
168+0.166666672, +0.333333343, +0.500000000, +0.666666687, +0.833333373, +1.00000000
169ucdf
170+0.721109331, +0.887776017, +1.00000000, +1.00000000, +1.00000000, +1.00000000
171call setECDF(ecdf)
172ecdf
173+0.166666672, +0.333333343, +0.500000000, +0.666666687, +0.833333373, +1.00000000
174
175iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
176iweight
177+5, +6, +2, +4, +3, +8
178call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
179lcdf
180+0.00000000, +0.136200100, +0.207628667, +0.350485802, +0.457628667, +0.743342936
181ecdf
182+0.178571433, +0.392857164, +0.464285731, +0.607142866, +0.714285731, +1.00000000
183ucdf
184+0.435228497, +0.649514198, +0.720942795, +0.863799930, +0.970942795, +1.00000000
185
186rweight = iweight
187rweight
188+5.00000000, +6.00000000, +2.00000000, +4.00000000, +3.00000000, +8.00000000
189call setECDF(ecdf, rweight, sum(rweight))
190ecdf
191+0.178571433, +0.392857164, +0.464285731, +0.607142866, +0.714285731, +1.00000000
192
193call setResized(ecdf, getUnifRand(1_IK, 10_IK))
194call setResized(lcdf, size(ecdf, 1, IK))
195call setResized(ucdf, size(ecdf, 1, IK))
196call setECDF(ecdf, lcdf, ucdf)
197lcdf
198+0.00000000, +0.00000000, +0.00000000, +0.581144691E-1, +0.200971603, +0.343828738, +0.486685872
199ecdf
200+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
201ucdf
202+0.656171262, +0.799028397, +0.941885591, +1.00000000, +1.00000000, +1.00000000, +1.00000000
203call setECDF(ecdf)
204ecdf
205+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
206
207iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
208iweight
209+3, +7, +8, +5, +9, +10, +7
210call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
211lcdf
212+0.00000000, +0.100671202E-1, +0.173332438, +0.275373280, +0.459046781, +0.663128436, +0.805985510
213ecdf
214+0.612244904E-1, +0.204081625, +0.367346942, +0.469387770, +0.653061271, +0.857142925, +1.00000000
215ucdf
216+0.255239010, +0.398096144, +0.561361432, +0.663402259, +0.847075760, +1.00000000, +1.00000000
217
218rweight = iweight
219rweight
220+3.00000000, +7.00000000, +8.00000000, +5.00000000, +9.00000000, +10.0000000, +7.00000000
221call setECDF(ecdf, rweight, sum(rweight))
222ecdf
223+0.612244904E-1, +0.204081625, +0.367346942, +0.469387770, +0.653061271, +0.857142925, +1.00000000
224
225call setResized(ecdf, getUnifRand(1_IK, 10_IK))
226call setResized(lcdf, size(ecdf, 1, IK))
227call setResized(ucdf, size(ecdf, 1, IK))
228call setECDF(ecdf, lcdf, ucdf)
229lcdf
230+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.102855057, +0.213966161, +0.325077266, +0.436188370, +0.547299504
231ecdf
232+0.111111112, +0.222222224, +0.333333343, +0.444444448, +0.555555582, +0.666666687, +0.777777791, +0.888888896, +1.00000000
233ucdf
234+0.563811660, +0.674922764, +0.786033869, +0.897144973, +1.00000000, +1.00000000, +1.00000000, +1.00000000, +1.00000000
235call setECDF(ecdf)
236ecdf
237+0.111111112, +0.222222224, +0.333333343, +0.444444448, +0.555555582, +0.666666687, +0.777777791, +0.888888896, +1.00000000
238
239iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
240iweight
241+4, +7, +3, +2, +6, +3, +4, +6, +6
242call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
243lcdf
244+0.00000000, +0.561928451E-1, +0.129363567, +0.178144068, +0.324485511, +0.397656232, +0.495217174, +0.641558647, +0.787900209
245ecdf
246+0.975609720E-1, +0.268292665, +0.341463387, +0.390243888, +0.536585331, +0.609756052, +0.707316995, +0.853658438, +1.00000000
247ucdf
248+0.309660792, +0.480392486, +0.553563237, +0.602343678, +0.748685122, +0.821855903, +0.919416785, +1.00000000, +1.00000000
249
250rweight = iweight
251rweight
252+4.00000000, +7.00000000, +3.00000000, +2.00000000, +6.00000000, +3.00000000, +4.00000000, +6.00000000, +6.00000000
253call setECDF(ecdf, rweight, sum(rweight))
254ecdf
255+0.975609720E-1, +0.268292665, +0.341463387, +0.390243888, +0.536585331, +0.609756052, +0.707316995, +0.853658438, +1.00000000
256
257call setResized(ecdf, getUnifRand(1_IK, 10_IK))
258call setResized(lcdf, size(ecdf, 1, IK))
259call setResized(ucdf, size(ecdf, 1, IK))
260call setECDF(ecdf, lcdf, ucdf)
261lcdf
262+0.00000000, +0.00000000, +0.00000000, +0.112224042, +0.278890729, +0.445557356
263ecdf
264+0.166666672, +0.333333343, +0.500000000, +0.666666687, +0.833333373, +1.00000000
265ucdf
266+0.721109331, +0.887776017, +1.00000000, +1.00000000, +1.00000000, +1.00000000
267call setECDF(ecdf)
268ecdf
269+0.166666672, +0.333333343, +0.500000000, +0.666666687, +0.833333373, +1.00000000
270
271iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
272iweight
273+3, +10, +9, +5, +10, +2
274call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
275lcdf
276+0.00000000, +0.115863055, +0.346632302, +0.474837422, +0.731247663, +0.782529712
277ecdf
278+0.769230798E-1, +0.333333343, +0.564102590, +0.692307711, +0.948717952, +1.00000000
279ucdf
280+0.294393361, +0.550803661, +0.781572878, +0.909777999, +1.00000000, +1.00000000
281
282rweight = iweight
283rweight
284+3.00000000, +10.0000000, +9.00000000, +5.00000000, +10.0000000, +2.00000000
285call setECDF(ecdf, rweight, sum(rweight))
286ecdf
287+0.769230798E-1, +0.333333343, +0.564102590, +0.692307711, +0.948717952, +1.00000000
288
289call setResized(ecdf, getUnifRand(1_IK, 10_IK))
290call setResized(lcdf, size(ecdf, 1, IK))
291call setResized(ucdf, size(ecdf, 1, IK))
292call setECDF(ecdf, lcdf, ucdf)
293lcdf
294+0.00000000, +0.00000000, +0.00000000, +0.192638516, +0.392638505
295ecdf
296+0.200000003, +0.400000006, +0.600000024, +0.800000012, +1.00000000
297ucdf
298+0.807361484, +1.00000000, +1.00000000, +1.00000000, +1.00000000
299call setECDF(ecdf)
300ecdf
301+0.200000003, +0.400000006, +0.600000024, +0.800000012, +1.00000000
302
303iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
304iweight
305+6, +4, +3, +3, +9
306call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
307lcdf
308+0.00000000, +0.128379673, +0.248379678, +0.368379682, +0.728379726
309ecdf
310+0.239999995, +0.399999976, +0.519999981, +0.639999986, +1.00000000
311ucdf
312+0.511620283, +0.671620250, +0.791620255, +0.911620259, +1.00000000
313
314rweight = iweight
315rweight
316+6.00000000, +4.00000000, +3.00000000, +3.00000000, +9.00000000
317call setECDF(ecdf, rweight, sum(rweight))
318ecdf
319+0.239999995, +0.399999976, +0.519999981, +0.639999986, +1.00000000
320
321

Visualization of the example output
Test:
test_pm_sampleECDF


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, April 21, 2017, 1:54 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin

Definition at line 151 of file pm_sampleECDF.F90.


The documentation for this interface was generated from the following file: