Learn R Programming

SAFD (version 2.1)

Fmedian: Median of a fuzzy sample

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

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.

Value

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

Details

See examples.

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

Run this code
# NOT RUN {
#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]])
# }

Run the code above in your browser using DataLab