Fmedian: Median of a fuzzy sample

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Given a list XX of polygonal fuzzy numbers the functions first checks (1) if each element of the lists is in the correct form (tested by checking) and (2) if the alpha-levels of all elements coincide. If all conditions are fulfilled the function calculates the (levelwise) median (which, by definition, is a fuzzy number too) using a large number of levels, by default nl=101.

Usage

1
Fmedian(XX, nl = 101, pic = 1)

Arguments

XX

...list of polygonal fuzzy numbers with the same alpha levels (the functions implicitly checks the conditions)

nl

...number of equidistant alpha-level, by default nl=101

pic

...numeric, if pic=1 the sample, its mean and its median are plotted.

Details

See examples.

Value

Given correct input XX the function returns the median of the sample.

Note

In case you find (almost surely existing) bugs or have recommendations for improving the functions comments are welcome to the above mentioned mail addresses.

Author(s)

Wolfgang Trutschnig <wolfgang@trutschnig.net>, Asun Lubiano <lubiano@uniovi.es>

References

[1] Sinova, B., Gil, M.A., Colubi, A., Van Aelst, S.: The median of a random fuzzy number. The 1-norm distance approach, Fuzzy Sets and Systems, 200, pp. 99-115 (2012)

See Also

See Also as Mmean

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#Example 1:
data(XX)
V<-translator(XX[[3]],100)
YY<-vector("list",length=50)
  for(i in 1:50){
   YY[[i]]<-generator(V,,,)
   }
Me<-Fmedian(YY)

#Example 2:
data(Trees)
Species1_Median<-Fmedian(Trees[[1]],nl=11)
Species1_Median
Species2_Median<-Fmedian(Trees[[2]])
Species3_Median<-Fmedian(Trees[[3]])

Example output

      x alpha
1  2.20   0.0
2  2.25   0.1
3  2.30   0.2
4  2.35   0.3
5  2.40   0.4
6  2.45   0.5
7  2.50   0.6
8  2.55   0.7
9  2.60   0.8
10 2.65   0.9
11 2.70   1.0
12 3.30   1.0
13 3.35   0.9
14 3.40   0.8
15 3.45   0.7
16 3.50   0.6
17 3.55   0.5
18 3.60   0.4
19 3.65   0.3
20 3.70   0.2
21 3.75   0.1
22 3.80   0.0

SAFD documentation built on July 3, 2019, 5:02 p.m.