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: IKC => 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: RKC => RKS ! all processor kinds are supported.
21 real(RKC), allocatable :: ecdf(:), lcdf(:), ucdf(:)
22 integer(IK), allocatable :: iweight(:)
23 real(RKC), 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: RKC => RKS
76 use pm_distNorm, only: setNormRand
77 character(:, SK), allocatable :: fileName
78 real(RKC), 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_RKC)
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.00000000, +0.00000000, +0.192638516, +0.392638505
7ecdf
8+0.200000003, +0.400000006, +0.600000024, +0.800000012, +1.00000000
9ucdf
10+0.807361484, +1.00000000, +1.00000000, +1.00000000, +1.00000000
11call setECDF(ecdf)
12ecdf
13+0.200000003, +0.400000006, +0.600000024, +0.800000012, +1.00000000
14
15iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
16iweight
17+9, +9, +3, +4, +1
18call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
19lcdf
20+0.798082352E-1, +0.425962090, +0.541346729, +0.695192873, +0.733654380
21ecdf
22+0.346153855, +0.692307711, +0.807692349, +0.961538494, +1.00000000
23ucdf
24+0.612499475, +0.958653331, +1.00000000, +1.00000000, +1.00000000
25
26rweight = iweight
27rweight
28+9.00000000, +9.00000000, +3.00000000, +4.00000000, +1.00000000
29call setECDF(ecdf, rweight, sum(rweight))
30ecdf
31+0.346153855, +0.692307711, +0.807692349, +0.961538494, +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.192638516, +0.392638505
39ecdf
40+0.200000003, +0.400000006, +0.600000024, +0.800000012, +1.00000000
41ucdf
42+0.807361484, +1.00000000, +1.00000000, +1.00000000, +1.00000000
43call setECDF(ecdf)
44ecdf
45+0.200000003, +0.400000006, +0.600000024, +0.800000012, +1.00000000
46
47iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
48iweight
49+2, +2, +5, +8, +10
50call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
51lcdf
52+0.00000000, +0.00000000, +0.719665885E-1, +0.368262857, +0.738633275
53ecdf
54+0.740740746E-1, +0.148148149, +0.333333343, +0.629629612, +1.00000000
55ucdf
56+0.335440814, +0.409514904, +0.594700098, +0.890996337, +1.00000000
57
58rweight = iweight
59rweight
60+2.00000000, +2.00000000, +5.00000000, +8.00000000, +10.0000000
61call setECDF(ecdf, rweight, sum(rweight))
62ecdf
63+0.740740746E-1, +0.148148149, +0.333333343, +0.629629612, +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+3, +9, +6, +2, +3, +10, +7, +5
82call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
83lcdf
84+0.00000000, +0.642128587E-1, +0.197546214, +0.241990656, +0.308657318, +0.530879498, +0.686435103, +0.797546148
85ecdf
86+0.666666701E-1, +0.266666681, +0.400000036, +0.444444478, +0.511111140, +0.733333349, +0.888888896, +1.00000000
87ucdf
88+0.269120485, +0.469120502, +0.602453828, +0.646898270, +0.713564992, +0.935787201, +1.00000000, +1.00000000
89
90rweight = iweight
91rweight
92+3.00000000, +9.00000000, +6.00000000, +2.00000000, +3.00000000, +10.0000000, +7.00000000, +5.00000000
93call setECDF(ecdf, rweight, sum(rweight))
94ecdf
95+0.666666701E-1, +0.266666681, +0.400000036, +0.444444478, +0.511111140, +0.733333349, +0.888888896, +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.396772027E-1
103ecdf
104+0.500000000, +1.00000000
105ucdf
106+1.00000000, +1.00000000
107call setECDF(ecdf)
108ecdf
109+0.500000000, +1.00000000
110
111iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
112iweight
113+4, +9
114call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
115lcdf
116+0.00000000, +0.623330355
117ecdf
118+0.307692319, +1.00000000
119ucdf
120+0.684361935, +1.00000000
121
122rweight = iweight
123rweight
124+4.00000000, +9.00000000
125call setECDF(ecdf, rweight, sum(rweight))
126ecdf
127+0.307692319, +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.192638516, +0.392638505
135ecdf
136+0.200000003, +0.400000006, +0.600000024, +0.800000012, +1.00000000
137ucdf
138+0.807361484, +1.00000000, +1.00000000, +1.00000000, +1.00000000
139call setECDF(ecdf)
140ecdf
141+0.200000003, +0.400000006, +0.600000024, +0.800000012, +1.00000000
142
143iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
144iweight
145+9, +2, +8, +4, +5
146call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
147lcdf
148+0.647715330E-1, +0.136200100, +0.421914399, +0.564771533, +0.743342936
149ecdf
150+0.321428597, +0.392857164, +0.678571463, +0.821428597, +1.00000000
151ucdf
152+0.578085661, +0.649514198, +0.935228527, +1.00000000, +1.00000000
153
154rweight = iweight
155rweight
156+9.00000000, +2.00000000, +8.00000000, +4.00000000, +5.00000000
157call setECDF(ecdf, rweight, sum(rweight))
158ecdf
159+0.321428597, +0.392857164, +0.678571463, +0.821428597, +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.581144691E-1, +0.200971603, +0.343828738, +0.486685872
167ecdf
168+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
169ucdf
170+0.656171262, +0.799028397, +0.941885591, +1.00000000, +1.00000000, +1.00000000, +1.00000000
171call setECDF(ecdf)
172ecdf
173+0.142857149, +0.285714298, +0.428571463, +0.571428597, +0.714285731, +0.857142866, +1.00000000
174
175iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
176iweight
177+1, +6, +9, +1, +9, +5, +6
178call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
179lcdf
180+0.00000000, +0.00000000, +0.209161922, +0.236188963, +0.479432225, +0.614567399, +0.776729465
181ecdf
182+0.270270277E-1, +0.189189196, +0.432432443, +0.459459484, +0.702702761, +0.837837934, +1.00000000
183ucdf
184+0.250297546, +0.412459731, +0.655702949, +0.682730019, +0.925973296, +1.00000000, +1.00000000
185
186rweight = iweight
187rweight
188+1.00000000, +6.00000000, +9.00000000, +1.00000000, +9.00000000, +5.00000000, +6.00000000
189call setECDF(ecdf, rweight, sum(rweight))
190ecdf
191+0.270270277E-1, +0.189189196, +0.432432443, +0.459459484, +0.702702761, +0.837837934, +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.198386014E-1, +0.144838601, +0.269838601, +0.394838601, +0.519838572
199ecdf
200+0.125000000, +0.250000000, +0.375000000, +0.500000000, +0.625000000, +0.750000000, +0.875000000, +1.00000000
201ucdf
202+0.605161428, +0.730161428, +0.855161428, +0.980161428, +1.00000000, +1.00000000, +1.00000000, +1.00000000
203call setECDF(ecdf)
204ecdf
205+0.125000000, +0.250000000, +0.375000000, +0.500000000, +0.625000000, +0.750000000, +0.875000000, +1.00000000
206
207iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
208iweight
209+2, +3, +8, +6, +5, +2, +2, +9
210call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
211lcdf
212+0.00000000, +0.00000000, +0.128080860, +0.290243030, +0.425378203, +0.479432285, +0.533486366, +0.776729465
213ecdf
214+0.540540554E-1, +0.135135144, +0.351351380, +0.513513565, +0.648648739, +0.702702820, +0.756756902, +1.00000000
215ucdf
216+0.277324587, +0.358405650, +0.574621916, +0.736784101, +0.871919274, +0.925973356, +0.980027437, +1.00000000
217
218rweight = iweight
219rweight
220+2.00000000, +3.00000000, +8.00000000, +6.00000000, +5.00000000, +2.00000000, +2.00000000, +9.00000000
221call setECDF(ecdf, rweight, sum(rweight))
222ecdf
223+0.540540554E-1, +0.135135144, +0.351351380, +0.513513565, +0.648648739, +0.702702820, +0.756756902, +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.192638516, +0.392638505
231ecdf
232+0.200000003, +0.400000006, +0.600000024, +0.800000012, +1.00000000
233ucdf
234+0.807361484, +1.00000000, +1.00000000, +1.00000000, +1.00000000
235call setECDF(ecdf)
236ecdf
237+0.200000003, +0.400000006, +0.600000024, +0.800000012, +1.00000000
238
239iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
240iweight
241+9, +1, +4, +1, +8
242call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
243lcdf
244+0.108120590, +0.151598841, +0.325511873, +0.368990123, +0.716816247
245ecdf
246+0.391304344, +0.434782594, +0.608695626, +0.652173877, +1.00000000
247ucdf
248+0.674488068, +0.717966318, +0.891879380, +0.935357630, +1.00000000
249
250rweight = iweight
251rweight
252+9.00000000, +1.00000000, +4.00000000, +1.00000000, +8.00000000
253call setECDF(ecdf, rweight, sum(rweight))
254ecdf
255+0.391304344, +0.434782594, +0.608695626, +0.652173877, +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.396772027E-1
263ecdf
264+0.500000000, +1.00000000
265ucdf
266+1.00000000, +1.00000000
267call setECDF(ecdf)
268ecdf
269+0.500000000, +1.00000000
270
271iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
272iweight
273+3, +2
274call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
275lcdf
276+0.00000000, +0.392638505
277ecdf
278+0.600000024, +1.00000000
279ucdf
280+1.00000000, +1.00000000
281
282rweight = iweight
283rweight
284+3.00000000, +2.00000000
285call setECDF(ecdf, rweight, sum(rweight))
286ecdf
287+0.600000024, +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.00000000, +0.102855057, +0.213966161, +0.325077266, +0.436188370, +0.547299504
295ecdf
296+0.111111112, +0.222222224, +0.333333343, +0.444444448, +0.555555582, +0.666666687, +0.777777791, +0.888888896, +1.00000000
297ucdf
298+0.563811660, +0.674922764, +0.786033869, +0.897144973, +1.00000000, +1.00000000, +1.00000000, +1.00000000, +1.00000000
299call setECDF(ecdf)
300ecdf
301+0.111111112, +0.222222224, +0.333333343, +0.444444448, +0.555555582, +0.666666687, +0.777777791, +0.888888896, +1.00000000
302
303iweight = getUnifRand(1, 10, size(ecdf, 1, IK))
304iweight
305+3, +6, +6, +3, +3, +9, +8, +6, +2
306call setECDF(ecdf, iweight, sum(iweight), lcdf, ucdf)
307lcdf
308+0.00000000, +0.00000000, +0.125845790, +0.191063166, +0.256280541, +0.451932728, +0.625845790, +0.756280601, +0.799758852
309ecdf
310+0.652173907E-1, +0.195652172, +0.326086938, +0.391304314, +0.456521690, +0.652173877, +0.826086938, +0.956521749, +1.00000000
311ucdf
312+0.265458524, +0.395893335, +0.526328087, +0.591545463, +0.656762838, +0.852415025, +1.00000000, +1.00000000, +1.00000000
313
314rweight = iweight
315rweight
316+3.00000000, +6.00000000, +6.00000000, +3.00000000, +3.00000000, +9.00000000, +8.00000000, +6.00000000, +2.00000000
317call setECDF(ecdf, rweight, sum(rweight))
318ecdf
319+0.652173907E-1, +0.195652172, +0.326086938, +0.391304314, +0.456521690, +0.652173877, +0.826086938, +0.956521749, +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 at Austin

Definition at line 151 of file pm_sampleECDF.F90.


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