Learn R Programming

SAFD (version 0.3)

Bcor: (Sample) correlation

Description

The sample correlation of two samples of polygonal fuzzy numbers with respect to the Bertoluzza distance is calculated. Given lists XX, YY of polygonal fuzzy numbers the functions first checks (1) if each element of the two lists is in the correct form (tested by checking), (2) if the alpha-levels of all elements in the two lists coincide and (3) if the lists have the same length. If all conditions are fulfilled the Bertoluzza correlation will be returned. If not the translator function can be used to transform the elements of the lists in the correct format. For details see [1] from below, and replace the kernel K with the expression induced by the Bertoluzza metric. The parameter theta has to fulfill theta>0, by default theta=1/3.

Usage

Bcor(XX, YY, theta = 1/3)

Arguments

XX
...list of polygonal fuzzy numbers (the functions implicitly checks the conditions) having the same length as YY
YY
...list of polygonal fuzzy numbers (the functions implicitly checks the conditions) having the same length as XX
theta
...numeric and >0, see bertoluzza

Value

  • Given input XX, YY in the correct format the function returns the Bertoluzza correlation of the samples XX, YY.

Details

See examples. The code makes use of Bcov and Bvar.

References

[1] Gonzalez-Rodriguez, G.; Blanco, A.; Colubi, A.; Lubiano, M.A.: Estimation of a simple linear regression model for fuzzy random variables Fuzzy Sets and Systems, 160(3), pp. 357-370 (2009)

See Also

See Also as checking, Bcov, Bvar, bertoluzza

Examples

Run this code
#Example 1:
data(XX)
V<-translator(XX[[3]],100)
XX<-vector("list",length=10)
YY<-XX
  for(i in 1:10){
   XX[[i]]<-generator(V,,,)
   YY[[i]]<-XX[[i]]
   YY[[i]]$x<-5*YY[[i]]$x+1
   }
b<-Bcor(XX,YY,1/3)
b

#Example 2:
data(XX)
V<-translator(XX[[3]],51)
XX<-vector("list",length=200)
YY<-XX
  for(i in 1:200){
   XX[[i]]<-generator(V,,,)
   YY[[i]]<-XX[[i]]
   YY[[i]]$x<-5*YY[[i]]$x+1
   }
b<-Bcor(XX,YY,1/3)
b

Run the code above in your browser using DataLab