lrmodel {SAFD} | R Documentation |
The linear regression model Y=aX+eps for trapezoidal fuzzy numbers as described in [1] has been implemented, whereby the least-squares-minimization (with constraints) is done with respect to the Bertoluzza metric (with theta
=1/3). Given lists XX
, YY
of polygonal fuzzy numbers the functions first checks (1) if each element of the two list 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 function automatically converts the fuzzy numbers in XX
and YY
in trapezoidal ones and returns the estimations for the parameters a
and B
- in case of double solutions both solutions are returned.
lrmodel(XX, YY)
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
|
See examples
Given input XX
, YY
in the correct format the function returns a list containing the estimates for a
and B
(in case of double solutions both solutions are returned).
In case you find (almost surely existing) bugs or have recommendations for improving the functions comments are welcome to the above mentioned mail addresses.
Wolfgang Trutschnig <wolfgang.trutschnig@softcomputing.es>, Asun Lubiano <lubiano@uniovi.es>
[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)
[2] Gil, M.A., Lopez, M.T., Lubiano, M.A., Montenegro, M.: Regression and correlation analyses of a linear relation between random intervals, Test, 10(1), pp. 183-201 (2001)
See Also as checking
, Mmean
, hukuhara
, Bvar
, Bcov
, bertoluzza
#Example 1 (crisp case) XX<-list(length=2) XX[[1]]<-data.frame(cbind(x=c(1,1,1,1),alpha=c(0,1,1,0))) XX[[2]]<-data.frame(cbind(x=c(2,2,2,2),alpha=c(0,1,1,0))) YY<-list(length=2) YY[[1]]<-data.frame(cbind(x=c(1,1,1,1),alpha=c(0,1,1,0))) YY[[2]]<-data.frame(cbind(x=c(2,2,2,2),alpha=c(0,1,1,0))) lrmodel(XX,YY) #Example 2: data(XX) V<-translator(XX[[3]],100) XX<-list(length=50) YY<-XX for(i in 1:50){ XX[[i]]<-generator(V,,,) YY[[i]]<-XX[[i]] YY[[i]]$x<-5*YY[[i]]$x+1 } lrmodel(XX,YY)