Title: | Fuzzy Statistical Tools |
---|---|
Description: | The main goal of this package is to present various fuzzy statistical tools. It intends to provide an implementation of the theoretical and empirical approaches presented in the book entitled "The signed distance measure in fuzzy statistical analysis. Some theoretical, empirical and programming advances" <doi: 10.1007/978-3-030-76916-1>. For the theoretical approaches, see Berkachy R. and Donze L. (2019) <doi:10.1007/978-3-030-03368-2_1>. For the empirical approaches, see Berkachy R. and Donze L. (2016) <ISBN: 978-989-758-201-1>). Important (non-exhaustive) implementation highlights of this package are as follows: (1) a numerical procedure to estimate the fuzzy difference and the fuzzy square. (2) two numerical methods of fuzzification. (3) a function performing different possibilities of distances, including the signed distance and the generalized signed distance for instance with all its properties. (4) numerical estimations of fuzzy statistical measures such as the variance, the moment, etc. (5) two methods of estimation of the bootstrap distribution of the likelihood ratio in the fuzzy context. (6) an estimation of a fuzzy confidence interval by the likelihood ratio method. (7) testing fuzzy hypotheses and/or fuzzy data by fuzzy confidence intervals in the Kwakernaak - Kruse and Meyer sense. (8) a general method to estimate the fuzzy p-value with fuzzy hypotheses and/or fuzzy data. (9) a method of estimation of global and individual evaluations of linguistic questionnaires. (10) numerical estimations of multi-ways analysis of variance models in the fuzzy context. The unbalance in the considered designs are also foreseen. |
Authors: | Redina Berkachy <[email protected]>, Laurent Donze <[email protected]> |
Maintainer: | Redina Berkachy <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.3 |
Built: | 2024-11-05 06:16:05 UTC |
Source: | CRAN |
Calculates the adjusted weight for a given main-item of a linguistic questionnaire
adjusted.weight.MI(x, i, j, b_j, b_jk, SI)
adjusted.weight.MI(x, i, j, b_j, b_jk, SI)
x |
the data set to evaluate. |
i |
an observation index. |
j |
a main-item index. |
b_j |
an array referring to the initial weights given to each main-item of the considered main-item. This array will be afterwards re-calculated. |
b_jk |
a matrix of length(b_j) rows and max(SI) columns expressing the initial weights of each sub-item of a given main-item. |
SI |
an array representing the total numbers of sub-items per main-item. |
A numerical value giving the readjusted weight of the main-item j for the observation i.
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) MI <- 2 SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_j <- c(1/2,1/2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) PA11 <- c(1,2,3,4,5) PA12 <- c(1,2,3,4,5) PA21 <- c(1,2,3,4,5) PA22 <- c(1,2,3,4,5) # ------------------ MF111 <- TrapezoidalFuzzyNumber(0,2,2,7) MF112 <- TrapezoidalFuzzyNumber(2,7,7,15) MF113 <- TrapezoidalFuzzyNumber(7,15,15,23) MF114 <- TrapezoidalFuzzyNumber(15,23,23,28) MF115 <- TrapezoidalFuzzyNumber(23,28,28,30) MF11 <- GFUZZ(data, 1, 1, PA11, spec="Identical", breakpoints = 100) # ------------------ MF121 <- TrapezoidalFuzzyNumber(0,2,2,7) MF122 <- TrapezoidalFuzzyNumber(2,7,7,15) MF123 <- TrapezoidalFuzzyNumber(7,15,15,23) MF124 <- TrapezoidalFuzzyNumber(15,23,23,28) MF125 <- TrapezoidalFuzzyNumber(23,28,28,30) MF12 <- GFUZZ(data, 1, 2, PA12, spec="Identical", breakpoints = 100) # ------------------ MF211 <- TrapezoidalFuzzyNumber(0,2,2,7) MF212 <- TrapezoidalFuzzyNumber(2,7,7,15) MF213 <- TrapezoidalFuzzyNumber(7,15,15,23) MF214 <- TrapezoidalFuzzyNumber(15,23,23,28) MF215 <- TrapezoidalFuzzyNumber(23,28,28,30) MF21 <- GFUZZ(data, 2, 1, PA21, spec="Identical", breakpoints = 100) # ------------------ MF221 <- TrapezoidalFuzzyNumber(0,2,2,7) MF222 <- TrapezoidalFuzzyNumber(2,7,7,15) MF223 <- TrapezoidalFuzzyNumber(7,15,15,23) MF224 <- TrapezoidalFuzzyNumber(15,23,23,28) MF225 <- TrapezoidalFuzzyNumber(23,28,28,30) MF22 <- GFUZZ(data, 2, 2, PA22, spec="Identical", breakpoints = 100) # ------------------ range <- matrix(c(0,0,0,0,28,28,28,28), ncol=2) adjusted.weight.MI(data, 9, 1, b_j, b_jk, SI)
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) MI <- 2 SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_j <- c(1/2,1/2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) PA11 <- c(1,2,3,4,5) PA12 <- c(1,2,3,4,5) PA21 <- c(1,2,3,4,5) PA22 <- c(1,2,3,4,5) # ------------------ MF111 <- TrapezoidalFuzzyNumber(0,2,2,7) MF112 <- TrapezoidalFuzzyNumber(2,7,7,15) MF113 <- TrapezoidalFuzzyNumber(7,15,15,23) MF114 <- TrapezoidalFuzzyNumber(15,23,23,28) MF115 <- TrapezoidalFuzzyNumber(23,28,28,30) MF11 <- GFUZZ(data, 1, 1, PA11, spec="Identical", breakpoints = 100) # ------------------ MF121 <- TrapezoidalFuzzyNumber(0,2,2,7) MF122 <- TrapezoidalFuzzyNumber(2,7,7,15) MF123 <- TrapezoidalFuzzyNumber(7,15,15,23) MF124 <- TrapezoidalFuzzyNumber(15,23,23,28) MF125 <- TrapezoidalFuzzyNumber(23,28,28,30) MF12 <- GFUZZ(data, 1, 2, PA12, spec="Identical", breakpoints = 100) # ------------------ MF211 <- TrapezoidalFuzzyNumber(0,2,2,7) MF212 <- TrapezoidalFuzzyNumber(2,7,7,15) MF213 <- TrapezoidalFuzzyNumber(7,15,15,23) MF214 <- TrapezoidalFuzzyNumber(15,23,23,28) MF215 <- TrapezoidalFuzzyNumber(23,28,28,30) MF21 <- GFUZZ(data, 2, 1, PA21, spec="Identical", breakpoints = 100) # ------------------ MF221 <- TrapezoidalFuzzyNumber(0,2,2,7) MF222 <- TrapezoidalFuzzyNumber(2,7,7,15) MF223 <- TrapezoidalFuzzyNumber(7,15,15,23) MF224 <- TrapezoidalFuzzyNumber(15,23,23,28) MF225 <- TrapezoidalFuzzyNumber(23,28,28,30) MF22 <- GFUZZ(data, 2, 2, PA22, spec="Identical", breakpoints = 100) # ------------------ range <- matrix(c(0,0,0,0,28,28,28,28), ncol=2) adjusted.weight.MI(data, 9, 1, b_j, b_jk, SI)
Calculates the adjusted weight for a given sub-item of a linguistic questionnaire
adjusted.weight.SI(x, i, k, b_jk)
adjusted.weight.SI(x, i, k, b_jk)
x |
the data set to evaluate. |
i |
an observation index. |
k |
a sub-item index. |
b_jk |
an array referring to the initial weights given to each sub-item of the considered main-item. This array will be afterwards re-calculated. |
A numerical value giving the readjusted weight of the sub-item k of the considered main-item for the observation i.
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) adjusted.weight.SI(data, 7, 1, c(0.5,0.5))
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) adjusted.weight.SI(data, 7, 1, c(0.5,0.5))
Calculates a distance by the d_Bertoluzza between fuzzy numbers
Bertoluzza(X, Y, i = 1, j = 1, theta = 1/3, breakpoints = 100)
Bertoluzza(X, Y, i = 1, j = 1, theta = 1/3, breakpoints = 100)
X |
a fuzzy number. |
Y |
a fuzzy number. |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Estimates the bootstrap distribution of the likelihood ratio LR by the Algorithm 1 using the mean
boot.mean.algo1( data.fuzzified, distribution, sig, nsim = 100, mu = NA, sigma = NA, step = 0.1, margin = c(5, 5), breakpoints = 100, plot = TRUE )
boot.mean.algo1( data.fuzzified, distribution, sig, nsim = 100, mu = NA, sigma = NA, step = 0.1, margin = c(5, 5), breakpoints = 100, plot = TRUE )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
distribution |
a distribution chosen between "normal", "poisson", "Student" or "Logistic". |
sig |
a numerical value representing the significance level of the test. |
nsim |
an integer giving the number of replications needed in the bootstrap procedure. It is set to 100 by default. |
mu |
if the mean of the normal distribution is known, mu should be a numerical value. Otherwise, the argument mu is fixed to NA. |
sigma |
if the standard deviation of the normal distribution is known, sigma should be a numerical value. Otherwise, the argument sigma is fixed to NA. |
step |
a numerical value fixed to 0.1, defining the step of iterations on the interval [t-5; t+5]. |
margin |
an optional numerical couple of values fixed to [5; 5], representing the range of calculations around the parameter t. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
plot |
fixed by default to "FALSE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a vector of decimals representing the bootstrap distribution of LR.
Estimates the bootstrap distribution of the likelihood ratio LR by the Algorithm 2 using the mean
boot.mean.algo2( data.fuzzified, distribution, sig, nsim = 100, mu = NA, sigma = NA, step = 0.1, margin = c(5, 5), breakpoints = 100, plot = TRUE )
boot.mean.algo2( data.fuzzified, distribution, sig, nsim = 100, mu = NA, sigma = NA, step = 0.1, margin = c(5, 5), breakpoints = 100, plot = TRUE )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
distribution |
a distribution chosen between "normal", "poisson", "Student" or "Logistic". |
sig |
a numerical value representing the significance level of the test. |
nsim |
an integer giving the number of replications needed in the bootstrap procedure. It is set to 100 by default. |
mu |
if the mean of the normal distribution is known, mu should be a numerical value. Otherwise, the argument mu is fixed to NA. |
sigma |
if the standard deviation of the normal distribution is known, sigma should be a numerical value. Otherwise, the argument sigma is fixed to NA. |
step |
a numerical value fixed to 0.1, defining the step of iterations on the interval [t-5; t+5]. |
margin |
an optional numerical couple of values fixed to [5; 5], representing the range of calculations around the parameter t. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
plot |
fixed by default to "FALSE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a vector of decimals representing the bootstrap distribution of LR.
Estimates the bootstrap distribution of the likelihood ratio LR by the Algorithm 1 or 2 using the mean
boot.mean.ml( data.fuzzified, algorithm, distribution, sig, nsim = 100, mu = NA, sigma = NA, step = 0.1, margin = c(5, 5), breakpoints = 100, plot = TRUE )
boot.mean.ml( data.fuzzified, algorithm, distribution, sig, nsim = 100, mu = NA, sigma = NA, step = 0.1, margin = c(5, 5), breakpoints = 100, plot = TRUE )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
algorithm |
an algorithm chosen between "algo1" or "algo2". |
distribution |
a distribution chosen between "normal", "poisson", "Student" or "Logistic". |
sig |
a numerical value representing the significance level of the test. |
nsim |
an integer giving the number of replications needed in the bootstrap procedure. It is set to 100 by default. |
mu |
if the mean of the normal distribution is known, mu should be a numerical value. Otherwise, the argument mu is fixed to NA. |
sigma |
if the standard deviation of the normal distribution is known, sigma should be a numerical value. Otherwise, the argument sigma is fixed to NA. |
step |
a numerical value fixed to 0.1, defining the step of iterations on the interval [t-5; t+5]. |
margin |
an optional numerical couple of values fixed to [5; 5], representing the range of calculations around the parameter t. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
plot |
fixed by default to "FALSE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a vector of decimals representing the bootstrap distribution of LR.
mat <- matrix(c(1,2,2,2,2,1),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) PA11 <- c(1,2) data.fuzzified <- FUZZ(mat,mi=1,si=1,PA=PA11) emp.dist <- boot.mean.ml(data.fuzzified, algorithm = "algo1", distribution = "normal", sig = 0.05, nsim = 5, sigma = 1) eta.boot <- quantile(emp.dist, probs = 95/100)
mat <- matrix(c(1,2,2,2,2,1),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) PA11 <- c(1,2) data.fuzzified <- FUZZ(mat,mi=1,si=1,PA=PA11) emp.dist <- boot.mean.ml(data.fuzzified, algorithm = "algo1", distribution = "normal", sig = 0.05, nsim = 5, sigma = 1) eta.boot <- quantile(emp.dist, probs = 95/100)
Cube a number
cube(x)
cube(x)
x |
Number to be cubed |
The cube of the input
Calculates a distance by the D2 between fuzzy numbers
D2(X, Y, breakpoints = 100)
D2(X, Y, breakpoints = 100)
X |
a fuzzy number. |
Y |
a fuzzy number. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Defuzzify the fuzzy sums of squares calculated by a FANOVA model by an exact calculation or an approximation
Defuzz.FANOVA( res, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
Defuzz.FANOVA( res, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
res |
a result of a call of the function FANOVA, where method = "distance". |
distance.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns a list of all the arguments of the function, the defuzzified total, treatment and residuals sums of squares, the decision made etc.
Calculates the factor Delta_jki
Delta_jki(x, i, K)
Delta_jki(x, i, K)
x |
a dataset. |
i |
an observation index. |
K |
the total number of linguistics in a sub-item. |
The response matrix of binary values (0 or 1) related to the answers of a particular dataset for its corresponding sub-items.
Calculates a distance by the d_Delta.pq between fuzzy numbers
Delta.pq(X, Y, p, q, breakpoints = 100)
Delta.pq(X, Y, p, q, breakpoints = 100)
X |
a fuzzy number. |
Y |
a fuzzy number. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Calculates a distance between fuzzy numbers
distance( X, Y, type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
distance( X, Y, type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
X |
a fuzzy number. |
Y |
a fuzzy number. |
type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
X <- TrapezoidalFuzzyNumber(1,2,3,4) Y <- TrapezoidalFuzzyNumber(4,5,6,7) distance(X, Y, type = "DSGD.G") distance(X, Y, type = "GSGD")
X <- TrapezoidalFuzzyNumber(1,2,3,4) Y <- TrapezoidalFuzzyNumber(4,5,6,7) distance(X, Y, type = "DSGD.G") distance(X, Y, type = "GSGD")
Calculates a distance by the SGD between fuzzy numbers
DSGD(X, Y, i = 1, j = 1, breakpoints = 100, theta = 1/3)
DSGD(X, Y, i = 1, j = 1, breakpoints = 100, theta = 1/3)
X |
a fuzzy number. |
Y |
a fuzzy number. |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
A numerical value.
Calculates a distance by the d_DSGD.G between fuzzy numbers
DSGD.G(X, Y, i = 1, j = 1, thetas = 1, breakpoints = 100)
DSGD.G(X, Y, i = 1, j = 1, thetas = 1, breakpoints = 100)
X |
a fuzzy number. |
Y |
a fuzzy number. |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Computes a FANOVA model by a convenient metric, an exact calculation or an approximation
FANOVA( formula, dataset, data.fuzzified, sig, method, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, int.method = "int.simpson", plot = TRUE )
FANOVA( formula, dataset, data.fuzzified, sig, method, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, int.method = "int.simpson", plot = TRUE )
formula |
a description of the model to be fitted. |
dataset |
the data frame containing all the variables of the model. |
data.fuzzified |
the fuzzified data set constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. |
sig |
a numerical value representing the significance level of the test. |
method |
the choices are the following: "distance", "exact", "approximation". |
distance.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
int.method |
the method of numerical integration. It is set by default to the Simpson method, i.e. int.method="int.simpson". |
plot |
fixed by default to "TRUE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a list of all the arguments of the function, the total, treatment and residuals sums of squares, the coefficients of the model, the test statistics with the corresponding p-values, and the decision made.
mat <- matrix(c(1,1,1,1,1,1,1,2,2,2,2,3,2,3,4,2,3,3,2,4), ncol = 2) data <- data.frame(mat) data$X1 <- factor(data$X1) MF121 <- TrapezoidalFuzzyNumber(0,1,1,2.2) MF122 <- TrapezoidalFuzzyNumber(1.8,1.9,2.2,2.8) MF123 <- TrapezoidalFuzzyNumber(1.9,2.3,3.1,3.3) MF124 <- TrapezoidalFuzzyNumber(3.1,3.4,4.1,4.2) PA12 <- c(1,2,3,4) data.fuzzified <- GFUZZ(data, 1, 2, PA12, "Identical") formula = X2 ~ X1 res <- FANOVA(formula, dataset = data, method ="distance", data.fuzzified = data.fuzzified, sig = 0.05, distance.type = "wabl")
mat <- matrix(c(1,1,1,1,1,1,1,2,2,2,2,3,2,3,4,2,3,3,2,4), ncol = 2) data <- data.frame(mat) data$X1 <- factor(data$X1) MF121 <- TrapezoidalFuzzyNumber(0,1,1,2.2) MF122 <- TrapezoidalFuzzyNumber(1.8,1.9,2.2,2.8) MF123 <- TrapezoidalFuzzyNumber(1.9,2.3,3.1,3.3) MF124 <- TrapezoidalFuzzyNumber(3.1,3.4,4.1,4.2) PA12 <- c(1,2,3,4) data.fuzzified <- GFUZZ(data, 1, 2, PA12, "Identical") formula = X2 ~ X1 res <- FANOVA(formula, dataset = data, method ="distance", data.fuzzified = data.fuzzified, sig = 0.05, distance.type = "wabl")
Computes a FANOVA model by an approximation
FANOVA.approximation( formula, dataset, data.fuzzified, sig, breakpoints = 100, int.method = "int.simpson", plot = TRUE )
FANOVA.approximation( formula, dataset, data.fuzzified, sig, breakpoints = 100, int.method = "int.simpson", plot = TRUE )
formula |
a description of the model to be fitted. |
dataset |
the data frame containing all the variables of the model. |
data.fuzzified |
the fuzzified data set constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. |
sig |
a numerical value representing the significance level of the test. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
int.method |
the method of numerical integration. It is set by default to the Simpson method, i.e. int.method="int.simpson". |
plot |
fixed by default to "TRUE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a list of all the arguments of the function, the total, treatment and residuals sums of squares, the coefficients of the model, the test statistics with the corresponding p-values, and the decision made.
Computes a FANOVA model by a convenient metric
FANOVA.distance( formula, dataset, data.fuzzified, sig, distance.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
FANOVA.distance( formula, dataset, data.fuzzified, sig, distance.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
formula |
a description of the model to be fitted. |
dataset |
the data frame containing all the variables of the model. |
data.fuzzified |
the fuzzified data set constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. |
sig |
a numerical value representing the significance level of the test. |
distance.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns a list of all the arguments of the function, the total, treatment and residuals sums of squares, the coefficients of the model, the test statistics with the corresponding p-values, and the decision made.
Computes a FANOVA model by an exact calculation
FANOVA.exact( formula, dataset, data.fuzzified, sig, breakpoints = 100, int.method = "int.simpson", plot = TRUE )
FANOVA.exact( formula, dataset, data.fuzzified, sig, breakpoints = 100, int.method = "int.simpson", plot = TRUE )
formula |
a description of the model to be fitted. |
dataset |
the data frame containing all the variables of the model. |
data.fuzzified |
the fuzzified data set constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. |
sig |
a numerical value representing the significance level of the test. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
int.method |
the method of numerical integration. It is set by default to the Simpson method, i.e. int.method="int.simpson". |
plot |
fixed by default to "TRUE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a list of all the arguments of the function, the total, treatment and residuals sums of squares, the coefficients of the model, the test statistics with the corresponding p-values, and the decision made.
Prints the summary of the estimation of a FANOVA metric-based model
FANOVA.summary(res)
FANOVA.summary(res)
res |
a result of a call of the function FANOVA, where method = "distance". |
Returns a list of summary statistics of the estimated model given in res, shown in a FANOVA table. In addition, the F-statistics with their p-values, and the decision are given.
Estimates a fuzzy confidence interval by the Likelihood method
fci.ml( data.fuzzified, t, distribution, sig, mu = NA, sigma = NA, step = 0.05, margin = c(5, 5), breakpoints = 100, plot = TRUE )
fci.ml( data.fuzzified, t, distribution, sig, mu = NA, sigma = NA, step = 0.05, margin = c(5, 5), breakpoints = 100, plot = TRUE )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
t |
a given numerical or fuzzy type parameter of the distribution. |
distribution |
a distribution chosen between "normal", "poisson", "Student" or "Logistic". |
sig |
a numerical value representing the significance level of the test. |
mu |
if the mean of the normal distribution is known, mu should be a numerical value. Otherwise, the argument mu is fixed to NA. |
sigma |
if the standard deviation of the normal distribution is known, sigma should be a numerical value. Otherwise, the argument sigma is fixed to NA. |
step |
a numerical value fixed to 0.05, defining the step of iterations on the interval [t-5; t+5]. |
margin |
an optional numerical couple of values fixed to [5; 5], representing the range of calculations around the parameter t. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
plot |
fixed by default to "FALSE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a matrix composed by 2 vectors representing the numerical left and right alpha-cuts. For this output, is.alphacuts = TRUE.
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,4) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) Fmean <- Fuzzy.sample.mean(data.fuzzified) fci.ml(data.fuzzified, t = Fmean, distribution = "normal", sig= 0.05, sigma = 0.62)
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,4) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) Fmean <- Fuzzy.sample.mean(data.fuzzified) fci.ml(data.fuzzified, t = Fmean, distribution = "normal", sig= 0.05, sigma = 0.62)
Estimates a fuzzy confidence interval by the Likelihood method
fci.ml.boot( data.fuzzified, t, distribution, sig, coef.boot, mu = NA, sigma = NA, step = 0.05, margin = c(5, 5), breakpoints = 100, plot = TRUE )
fci.ml.boot( data.fuzzified, t, distribution, sig, coef.boot, mu = NA, sigma = NA, step = 0.05, margin = c(5, 5), breakpoints = 100, plot = TRUE )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
t |
a given numerical or fuzzy type parameter of the distribution. |
distribution |
a distribution chosen between "normal", "poisson", "Student" or "Logistic". |
sig |
a numerical value representing the significance level of the test. |
coef.boot |
a decimal representing the 1-sig-quantile of the bootstrap distribution of LR. |
mu |
if the mean of the normal distribution is known, mu should be a numerical value. Otherwise, the argument mu is fixed to NA. |
sigma |
if the standard deviation of the normal distribution is known, sigma should be a numerical value. Otherwise, the argument sigma is fixed to NA. |
step |
a numerical value fixed to 0.05, defining the step of iterations on the interval [t-5; t+5]. |
margin |
an optional numerical couple of values fixed to [5; 5], representing the range of calculations around the parameter t. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
plot |
fixed by default to "FALSE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a matrix composed by 2 vectors representing the numerical left and right alpha-cuts. For this output, is.alphacuts = TRUE.
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,4) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) Fmean <- Fuzzy.sample.mean(data.fuzzified) fci.ml.boot(data.fuzzified, t = Fmean, distribution = "normal", sig= 0.05, sigma = 0.62, coef.boot = 1.8225)
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,4) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) Fmean <- Fuzzy.sample.mean(data.fuzzified) fci.ml.boot(data.fuzzified, t = Fmean, distribution = "normal", sig= 0.05, sigma = 0.62, coef.boot = 1.8225)
Computes a Mult-FANOVA model by a convenient metric, an exact calculation or an approximation
FMANOVA( formula, dataset, data.fuzzified, sig = 0.05, method, distance.type = "DSGD", index.var = NA, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, int.method = "int.simpson", plot = TRUE )
FMANOVA( formula, dataset, data.fuzzified, sig = 0.05, method, distance.type = "DSGD", index.var = NA, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, int.method = "int.simpson", plot = TRUE )
formula |
a description of the model to be fitted. |
dataset |
the data frame containing all the variables of the model. |
data.fuzzified |
the fuzzified data set constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. |
sig |
a numerical value representing the significance level of the test. |
method |
the choices are the following: "distance", "exact", "approximation". |
distance.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
index.var |
the column index of the considered variable for which the output will be printed. It is an argument of the Mult-FANOVA models by the exact and the approximation methods only. |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
int.method |
the method of numerical integration. It is set by default to the Simpson method, i.e. int.method="int.simpson". |
plot |
fixed by default to "TRUE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a list of all the arguments of the function, the total, treatment and residuals sums of squares, the coefficients of the model, the test statistics with the corresponding p-values, and the decision made.
mat <- matrix(c(2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2,3,4,4,3,1,2,5,4,4,3),ncol=3) data <- data.frame(mat) MF131 <- TrapezoidalFuzzyNumber(0,1,1,2) MF132 <- TrapezoidalFuzzyNumber(1,2,2,3) MF133 <- TrapezoidalFuzzyNumber(2,3,3,4) MF134 <- TrapezoidalFuzzyNumber(3,4,4,5) MF135 <- TrapezoidalFuzzyNumber(4,5,5,6) PA13 <- c(1,2,3,4,5); mi <- 1; si <- 3 Yfuzz <- FUZZ(data,1,3,PA13) attach(data) formula <- X3 ~ X1 + X2 res <- FMANOVA(formula, data, Yfuzz, method = "distance", distance.type = "wabl") detach(data)
mat <- matrix(c(2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2,3,4,4,3,1,2,5,4,4,3),ncol=3) data <- data.frame(mat) MF131 <- TrapezoidalFuzzyNumber(0,1,1,2) MF132 <- TrapezoidalFuzzyNumber(1,2,2,3) MF133 <- TrapezoidalFuzzyNumber(2,3,3,4) MF134 <- TrapezoidalFuzzyNumber(3,4,4,5) MF135 <- TrapezoidalFuzzyNumber(4,5,5,6) PA13 <- c(1,2,3,4,5); mi <- 1; si <- 3 Yfuzz <- FUZZ(data,1,3,PA13) attach(data) formula <- X3 ~ X1 + X2 res <- FMANOVA(formula, data, Yfuzz, method = "distance", distance.type = "wabl") detach(data)
Computes a Mult-FANOVA model by an approximation
FMANOVA.approximation( formula, dataset, data.fuzzified, sig = 0.05, breakpoints = 100, index.var = NA, int.method = "int.simpson", plot = TRUE )
FMANOVA.approximation( formula, dataset, data.fuzzified, sig = 0.05, breakpoints = 100, index.var = NA, int.method = "int.simpson", plot = TRUE )
formula |
a description of the model to be fitted. |
dataset |
the data frame containing all the variables of the model. |
data.fuzzified |
the fuzzified data set constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. |
sig |
a numerical value representing the significance level of the test. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
index.var |
the column index of the considered variable for which the output will be printed. It is an argument of the Mult-FANOVA models by the exact and the approximation methods only. |
int.method |
the method of numerical integration. It is set by default to the Simpson method, i.e. int.method="int.simpson". |
plot |
fixed by default to "TRUE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a list of all the arguments of the function, the total, treatment and residuals sums of squares, the coefficients of the model, the test statistics with the corresponding p-values, and the decision made.
Computes a Mult-FANOVA model by a convenient metric
FMANOVA.distance( formula, dataset, data.fuzzified, distance.type, sig = 0.05, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
FMANOVA.distance( formula, dataset, data.fuzzified, distance.type, sig = 0.05, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
formula |
a description of the model to be fitted. |
dataset |
the data frame containing all the variables of the model. |
data.fuzzified |
the fuzzified data set constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. |
distance.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
sig |
a numerical value representing the significance level of the test. |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns a list of all the arguments of the function, the total, treatment and residuals sums of squares, the coefficients of the model, the test statistics with the corresponding p-values, and the decision made.
Computes a Mult-FANOVA model by an exact calculation
FMANOVA.exact( formula, dataset, data.fuzzified, sig = 0.05, breakpoints = 100, int.method = "int.simpson", index.var = NA, plot = TRUE )
FMANOVA.exact( formula, dataset, data.fuzzified, sig = 0.05, breakpoints = 100, int.method = "int.simpson", index.var = NA, plot = TRUE )
formula |
a description of the model to be fitted. |
dataset |
the data frame containing all the variables of the model. |
data.fuzzified |
the fuzzified data set constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. |
sig |
a numerical value representing the significance level of the test. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
int.method |
the method of numerical integration. It is set by default to the Simpson method, i.e. int.method="int.simpson". |
index.var |
the column index of the considered variable for which the output will be printed. It is an argument of the Mult-FANOVA models by the exact and the approximation methods only. |
plot |
fixed by default to "TRUE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a list of all the arguments of the function, the total, treatment and residuals sums of squares, the coefficients of the model, the test statistics with the corresponding p-values, and the decision made.
Prints the summary of the estimation of the interaction in a Mult-FANOVA metric-based model
FMANOVA.interaction.summary(res)
FMANOVA.interaction.summary(res)
res |
a result of a call of the function FMANOVA, where method = "distance". |
Returns a list of summary statistics of the estimated model given in res, shown in a FANOVA table. In addition, the F-statistics with their p-values, and the decision are given.
Prints the summary of the estimation of a Mult-FANOVA metric-based model
FMANOVA.summary(res)
FMANOVA.summary(res)
res |
a result of a call of the function FMANOVA, where method = "distance". |
Returns a list of summary statistics of the estimated model given in res, shown in a FANOVA table. In addition, the F-statistics with their p-values, and the decision are given.
Calculates multiple tests corresponding to the fuzzy response variable
Ftests(test)
Ftests(test)
test |
a result of a call of the function FMANOVA. |
Returns a table of the following different indicators "Wilks","F-Wilks", "Hotelling-Lawley trace" and "Pillai Trace".
mat <- matrix(c(2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2,3,4,4,3,1,2,5,4,4,3),ncol=3) data <- data.frame(mat) MF131 <- TrapezoidalFuzzyNumber(0,1,1,2) MF132 <- TrapezoidalFuzzyNumber(1,2,2,3) MF133 <- TrapezoidalFuzzyNumber(2,3,3,4) MF134 <- TrapezoidalFuzzyNumber(3,4,4,5) MF135 <- TrapezoidalFuzzyNumber(4,5,5,6) PA13 <- c(1,2,3,4,5); mi <- 1; si <- 3 Yfuzz <- FUZZ(data,1,3,PA13) attach(data) formula <- X3 ~ X1 + X2 res <- FMANOVA(formula, data, Yfuzz, method = "distance", distance.type = "wabl") Ftests(res) detach(data)
mat <- matrix(c(2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2,3,4,4,3,1,2,5,4,4,3),ncol=3) data <- data.frame(mat) MF131 <- TrapezoidalFuzzyNumber(0,1,1,2) MF132 <- TrapezoidalFuzzyNumber(1,2,2,3) MF133 <- TrapezoidalFuzzyNumber(2,3,3,4) MF134 <- TrapezoidalFuzzyNumber(3,4,4,5) MF135 <- TrapezoidalFuzzyNumber(4,5,5,6) PA13 <- c(1,2,3,4,5); mi <- 1; si <- 3 Yfuzz <- FUZZ(data,1,3,PA13) attach(data) formula <- X3 ~ X1 + X2 res <- FMANOVA(formula, data, Yfuzz, method = "distance", distance.type = "wabl") Ftests(res) detach(data)
Calculates the Tukey HSD test corresponding to the fuzzy response variable
FTukeyHSD(test, variable, cont = c(1, -1), conf.level = 0.95)
FTukeyHSD(test, variable, cont = c(1, -1), conf.level = 0.95)
test |
a result of a call of the function FMANOVA. |
variable |
the name of a variable in the data set. |
cont |
the contrasts of the model. It is set by default to c(1,-1). |
conf.level |
the confidence level of the test. It is set by default to 0.95. |
Returns a table of comparisons of means of the different levels of a given factor, two by two. The table contains the means of populations, the lower and upper bounds of the confidence intervals, and their p-values.
mat <- matrix(c(2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2,3,4,4,3,1,2,5,4,4,3),ncol=3) data <- data.frame(mat) MF131 <- TrapezoidalFuzzyNumber(0,1,1,2) MF132 <- TrapezoidalFuzzyNumber(1,2,2,3) MF133 <- TrapezoidalFuzzyNumber(2,3,3,4) MF134 <- TrapezoidalFuzzyNumber(3,4,4,5) MF135 <- TrapezoidalFuzzyNumber(4,5,5,6) PA13 <- c(1,2,3,4,5); mi <- 1; si <- 3 Yfuzz <- FUZZ(data,1,3,PA13) attach(data) formula <- X3 ~ X1 + X2 res <- FMANOVA(formula, data, Yfuzz, method = "distance", distance.type = "wabl") FTukeyHSD(res, "X1")[[1]] detach(data)
mat <- matrix(c(2,2,1,1,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2,3,4,4,3,1,2,5,4,4,3),ncol=3) data <- data.frame(mat) MF131 <- TrapezoidalFuzzyNumber(0,1,1,2) MF132 <- TrapezoidalFuzzyNumber(1,2,2,3) MF133 <- TrapezoidalFuzzyNumber(2,3,3,4) MF134 <- TrapezoidalFuzzyNumber(3,4,4,5) MF135 <- TrapezoidalFuzzyNumber(4,5,5,6) PA13 <- c(1,2,3,4,5); mi <- 1; si <- 3 Yfuzz <- FUZZ(data,1,3,PA13) attach(data) formula <- X3 ~ X1 + X2 res <- FMANOVA(formula, data, Yfuzz, method = "distance", distance.type = "wabl") FTukeyHSD(res, "X1")[[1]] detach(data)
Fuzzifies a variable modelled by trapezoidal or triangular fuzzy numbers
FUZZ(data, mi, si, PA)
FUZZ(data, mi, si, PA)
data |
a data set. |
mi |
the index of the main-item containing the concerned variable. |
si |
the index of the sub-item of a given main-item mi. |
PA |
a vector of the linguistic terms of the considered variable. |
A fuzzification matrix composed by 4 columns c(p,q,r,s), and m lines, i.e. number of observations. No NA is allowed.
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,3) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) is.trfuzzification(data.fuzzified)
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,3) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) is.trfuzzification(data.fuzzified)
Computes a fuzzy inference test by the fuzzy confidence intervals method calculated by the Likelihood method
Fuzzy.CI.ML.test( data.fuzzified, H0, H1, t, mu = NA, sigma = NA, sig, distribution, coef.boot, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, step = 0.05, margin = c(5, 5), plot = TRUE )
Fuzzy.CI.ML.test( data.fuzzified, H0, H1, t, mu = NA, sigma = NA, sig, distribution, coef.boot, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, step = 0.05, margin = c(5, 5), plot = TRUE )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
t |
a given numerical or fuzzy type parameter of the distribution. |
mu |
if the mean of the normal distribution is known, mu should be a numerical value. Otherwise, the argument mu is fixed to NA. |
sigma |
if the standard deviation of the normal distribution is known, sigma should be a numerical value. Otherwise, the argument sigma is fixed to NA. |
sig |
a numerical value representing the significance level of the test. |
distribution |
a distribution chosen between "normal", "poisson", "Student" or "Logistic". |
coef.boot |
a decimal representing the 1-sig-quantile of the bootstrap distribution of LR. |
distance.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
step |
a numerical value fixed to 0.05, defining the step of iterations on the interval [t-5; t+5]. |
margin |
an optional numerical couple of values fixed to [5; 5], representing the range of calculations around the parameter t. |
plot |
fixed by default to "FALSE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a list composed by the arguments, the fuzzy confidence intervals, the fuzzy decisions, the defuzzified values and the decision made.
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,4) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) Fmean <- Fuzzy.sample.mean(data.fuzzified) H0 <- TriangularFuzzyNumber(2.2,2.5,3) H1 <- TriangularFuzzyNumber(2.5,2.5,5) coef.boot <- 3.494829 (res <- Fuzzy.CI.ML.test(data.fuzzified, H0, H1, t = Fmean, sigma=0.7888, coef.boot = coef.boot, sig=0.05, distribution="normal", distance.type="GSGD")) res$decision
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,4) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) Fmean <- Fuzzy.sample.mean(data.fuzzified) H0 <- TriangularFuzzyNumber(2.2,2.5,3) H1 <- TriangularFuzzyNumber(2.5,2.5,5) coef.boot <- 3.494829 (res <- Fuzzy.CI.ML.test(data.fuzzified, H0, H1, t = Fmean, sigma=0.7888, coef.boot = coef.boot, sig=0.05, distribution="normal", distance.type="GSGD")) res$decision
Computes a fuzzy inference test by the traditional fuzzy confidence intervals
Fuzzy.CI.test( type, H0, H1, t, s.d, n, sig, distribution, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, plot = TRUE )
Fuzzy.CI.test( type, H0, H1, t, s.d, n, sig, distribution, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, plot = TRUE )
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
t |
a given numerical or fuzzy type parameter of the distribution. |
s.d |
a numerical value for the standard deviation of the distribution. |
n |
the total number of observations of the data set. |
sig |
a numerical value representing the significance level of the test. |
distribution |
a distribution chosen between "normal", "poisson", "Student" or "Logistic". |
distance.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
plot |
a logical rule "TRUE" or "FALSE" for defining whether to plot the corresponding graphs or not. |
Returns a list composed by the arguments, the fuzzy confidence intervals, the fuzzy decisions, the defuzzified values and the decision made.
H0 <- TriangularFuzzyNumber(2.9,3,3.1) H1 <- TriangularFuzzyNumber(3,3,5) res <- Fuzzy.CI.test(type = 0, H0, H1, t = TriangularFuzzyNumber(0.8,1.80,2.80), s.d = 0.79, n = 10, sig = 0.05, distribution = "normal", distance.type="GSGD")
H0 <- TriangularFuzzyNumber(2.9,3,3.1) H1 <- TriangularFuzzyNumber(3,3,5) res <- Fuzzy.CI.test(type = 0, H0, H1, t = TriangularFuzzyNumber(0.8,1.80,2.80), s.d = 0.79, n = 10, sig = 0.05, distribution = "normal", distance.type="GSGD")
Computes the fuzzy decisions of a fuzzy inference test by the traditional fuzzy confidence intervals
Fuzzy.decisions( type, H0, H1, t, s.d, n, sig, distribution, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
Fuzzy.decisions( type, H0, H1, t, s.d, n, sig, distribution, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
t |
a given numerical or fuzzy type parameter of the distribution. |
s.d |
a numerical value for the standard deviation of the distribution. |
n |
the total number of observations of the data set. |
sig |
a numerical value representing the significance level of the test. |
distribution |
a distribution chosen between "normal", "poisson", "Student" or "Logistic". |
distance.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns a list composed by the arguments, the fuzzy confidence intervals and their complements, the fuzzy decisions and the defuzzified values.
H0 <- alphacut(TriangularFuzzyNumber(2.9,3,3.1), seq(0,1, 0.01)) H1 <- alphacut(TriangularFuzzyNumber(3,3,5), seq(0,1,0.01)) t <- alphacut(TriangularFuzzyNumber(0.8,1.80,2.80), seq(0,1,0.01)) res <- Fuzzy.decisions(type = 0, H0, H1, t = t, s.d = 0.79, n = 10, sig = 0.05, distribution = "normal", distance.type = "GSGD")
H0 <- alphacut(TriangularFuzzyNumber(2.9,3,3.1), seq(0,1, 0.01)) H1 <- alphacut(TriangularFuzzyNumber(3,3,5), seq(0,1,0.01)) t <- alphacut(TriangularFuzzyNumber(0.8,1.80,2.80), seq(0,1,0.01)) res <- Fuzzy.decisions(type = 0, H0, H1, t = t, s.d = 0.79, n = 10, sig = 0.05, distribution = "normal", distance.type = "GSGD")
Computes the fuzzy decisions of a fuzzy inference test by the fuzzy confidence intervals by the likelihood method
Fuzzy.decisions.ML( data.fuzzified, H0, H1, t, coef.boot, mu = NA, sigma = NA, sig, distribution, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, step = 0.05, margin = c(5, 5), plot = FALSE )
Fuzzy.decisions.ML( data.fuzzified, H0, H1, t, coef.boot, mu = NA, sigma = NA, sig, distribution, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, step = 0.05, margin = c(5, 5), plot = FALSE )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
t |
a given numerical or fuzzy type parameter of the distribution. |
coef.boot |
a decimal representing the 1-sig-quantile of the bootstrap distribution of LR. |
mu |
if the mean of the normal distribution is known, mu should be a numerical value. Otherwise, the argument mu is fixed to NA. |
sigma |
if the standard deviation of the normal distribution is known, sigma should be a numerical value. Otherwise, the argument sigma is fixed to NA. |
sig |
a numerical value representing the significance level of the test. |
distribution |
a distribution chosen between "normal", "poisson", "Student" or "Logistic". |
distance.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
step |
a numerical value fixed to 0.05, defining the step of iterations on the interval [t-5; t+5]. |
margin |
an optional numerical couple of values fixed to [5; 5], representing the range of calculations around the parameter t. |
plot |
fixed by default to "FALSE". plot="FALSE" if a plot of the fuzzy number is not required. |
Returns a list composed by the arguments, the fuzzy confidence intervals, the fuzzy decisions, the defuzzified values and the decision made.
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,4) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) H0 <- alphacut(TriangularFuzzyNumber(2.9,3,3.1), seq(0,1, 0.01)) H1 <- alphacut(TriangularFuzzyNumber(3,3,5), seq(0,1,0.01)) t <- alphacut(TriangularFuzzyNumber(0.8,1.80,2.80), seq(0,1,0.01)) coef.boot <- 3.470085 res <- Fuzzy.decisions.ML(data.fuzzified, H0, H1, t = t, coef.boot = coef.boot, sigma = 0.79, sig = 0.05, distribution = "normal", distance.type = "GSGD")
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,4) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) H0 <- alphacut(TriangularFuzzyNumber(2.9,3,3.1), seq(0,1, 0.01)) H1 <- alphacut(TriangularFuzzyNumber(3,3,5), seq(0,1,0.01)) t <- alphacut(TriangularFuzzyNumber(0.8,1.80,2.80), seq(0,1,0.01)) coef.boot <- 3.470085 res <- Fuzzy.decisions.ML(data.fuzzified, H0, H1, t = t, coef.boot = coef.boot, sigma = 0.79, sig = 0.05, distribution = "normal", distance.type = "GSGD")
Calculates the difference between two fuzzy numbers
Fuzzy.Difference(X, Y, alphacuts = FALSE, breakpoints = 100)
Fuzzy.Difference(X, Y, alphacuts = FALSE, breakpoints = 100)
X |
a fuzzy number of any type. |
Y |
a fuzzy number of any type. |
alphacuts |
fixed by default to "FALSE". No alpha-cuts are printed in this case. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
If the parameter alphacuts="TRUE", the function returns a matrix composed by 2 vectors representing the left and right alpha-cuts. For this output, is.alphacuts = TRUE. If the parameter alphacuts="FALSE", the function returns a trapezoidal fuzzy number given by the quadruple (p,q,r,s), such that p q
r
s.
X <- TrapezoidalFuzzyNumber(5,6,7,8) Y <- TrapezoidalFuzzyNumber(1,2,3,4) Fuzzy.Difference(X,Y)
X <- TrapezoidalFuzzyNumber(5,6,7,8) Y <- TrapezoidalFuzzyNumber(1,2,3,4) Fuzzy.Difference(X,Y)
Calculates the exact variance
Fuzzy.exact.variance(data.fuzzified, breakpoints = 100, plot = FALSE)
Fuzzy.exact.variance(data.fuzzified, breakpoints = 100, plot = FALSE)
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
plot |
fixed by default to "FALSE". plot="TRUE" if a plot of the fuzzy number is required. |
The numerical alpha-cuts of the estimated fuzzy variance.
Gives the polynomial forms of the numerical alpha-cuts modelling the exact variance
Fuzzy.exact.variance.poly.left(data.fuzzified, breakpoints = 100)
Fuzzy.exact.variance.poly.left(data.fuzzified, breakpoints = 100)
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A table composed by the coefficients of the second order equations of the left side, given at the corresponding definitions domains.
Gives the polynomial forms of the numerical alpha-cuts modelling the exact variance
Fuzzy.exact.variance.poly.right(data.fuzzified, breakpoints = 100)
Fuzzy.exact.variance.poly.right(data.fuzzified, breakpoints = 100)
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A table composed by the coefficients of the second order equations of the right side, given at the corresponding definitions domains.
Computes the fuzzy p-value of a given fuzzy hypothesis test
Fuzzy.p.value( type, H0, H1, t, s.d = 1, n, sig, distribution, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
Fuzzy.p.value( type, H0, H1, t, s.d = 1, n, sig, distribution, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
t |
a given numerical or fuzzy type parameter of the distribution. |
s.d |
a numerical value for the standard deviation of the distribution. |
n |
the total number of observations of the data set. |
sig |
a numerical value representing the significance level of the test. |
distribution |
a distribution chosen between "normal", "poisson", "Student" or "Logistic". |
distance.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns the defuzzified p-value and the decision made.
H0 <- TriangularFuzzyNumber(2.2,2.5,3) H1 <- TriangularFuzzyNumber(2.5,2.5,5) Fuzzy.p.value(type=1, H0, H1, t=TriangularFuzzyNumber(0.8,1.8,2.8), s.d=0.7888, n=10, sig=0.05, distribution="normal", distance.type="GSGD")
H0 <- TriangularFuzzyNumber(2.2,2.5,3) H1 <- TriangularFuzzyNumber(2.5,2.5,5) Fuzzy.p.value(type=1, H0, H1, t=TriangularFuzzyNumber(0.8,1.8,2.8), s.d=0.7888, n=10, sig=0.05, distribution="normal", distance.type="GSGD")
Computes the fuzzy p-value of a given fuzzy hypothesis test for the mean
Fuzzy.p.value.mean( data.fuzzified, type, H0, H1, s.d = 1, sig, distribution, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
Fuzzy.p.value.mean( data.fuzzified, type, H0, H1, s.d = 1, sig, distribution, distance.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
s.d |
a numerical value for the standard deviation of the distribution. |
sig |
a numerical value representing the significance level of the test. |
distribution |
a distribution chosen between "normal", "poisson" or "Student". |
distance.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns the defuzzified p-value and the decision made.
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,4) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) H0 <- TriangularFuzzyNumber(2.2,2.5,3) H1 <- TriangularFuzzyNumber(2.5,2.5,5) Fuzzy.p.value.mean(data.fuzzified, type=1, H0, H1, s.d=0.7888, sig=0.05, distribution="normal", distance.type="GSGD")
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,4) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) H0 <- TriangularFuzzyNumber(2.2,2.5,3) H1 <- TriangularFuzzyNumber(2.5,2.5,5) Fuzzy.p.value.mean(data.fuzzified, type=1, H0, H1, s.d=0.7888, sig=0.05, distribution="normal", distance.type="GSGD")
Calculates the fuzzy predicted values
fuzzy.predicted.values(dataset, coef.model)
fuzzy.predicted.values(dataset, coef.model)
dataset |
the data frame containing all the variables of the model. |
coef.model |
the coefficients of the model. |
Returns a matrix containing the alpha-cuts of the fuzzy prediced values.
Calculates the fuzzy residuals
fuzzy.residuals(data.fuzzified, predicted.values)
fuzzy.residuals(data.fuzzified, predicted.values)
data.fuzzified |
the fuzzified data set constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. |
predicted.values |
the fuzzy predicted values constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. |
Returns a matrix containing the alpha-cuts of the fuzzy residuals.
Calculates the fuzzy sample mean
Fuzzy.sample.mean(data.fuzzified, breakpoints = 100, alphacuts = FALSE)
Fuzzy.sample.mean(data.fuzzified, breakpoints = 100, alphacuts = FALSE)
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
alphacuts |
fixed by default to "FALSE". No alpha-cuts are printed in this case. |
If the parameter alphacuts="TRUE", the function returns a matrix composed by 2 vectors representing the numerical left and right alpha-cuts. For this output, is.alphacuts = TRUE. If the parameter alphacuts="FALSE", the function returns a trapezoidal fuzzy number given by the quadruple (p,q,r,s).
mat <- matrix(c(1,2,2,3,3,4,4,5), ncol =4) Fuzzy.sample.mean(mat)
mat <- matrix(c(1,2,2,3,3,4,4,5), ncol =4) Fuzzy.sample.mean(mat)
Fuzzy sample variance (approx) - general
Fuzzy.sample.variance.approximation(data.fuzzified, appro.id)
Fuzzy.sample.variance.approximation(data.fuzzified, appro.id)
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
appro.id |
an integer between 1 and 5 giving the method of approximation chosen. |
A numerical value.
Fuzzy sample variance (approx) - method 1
Fuzzy.sample.variance.approximation1(data.fuzzified)
Fuzzy.sample.variance.approximation1(data.fuzzified)
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
A numerical value.
Fuzzy sample variance (approx) - method 2
Fuzzy.sample.variance.approximation2(data.fuzzified)
Fuzzy.sample.variance.approximation2(data.fuzzified)
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
A numerical value.
Fuzzy sample variance (approx) - method 3
Fuzzy.sample.variance.approximation3(data.fuzzified)
Fuzzy.sample.variance.approximation3(data.fuzzified)
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
A numerical value.
Fuzzy sample variance (approx) - method 4
Fuzzy.sample.variance.approximation4(data.fuzzified)
Fuzzy.sample.variance.approximation4(data.fuzzified)
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
A numerical value.
Fuzzy sample variance (approx) - method 5
Fuzzy.sample.variance.approximation5(data.fuzzified)
Fuzzy.sample.variance.approximation5(data.fuzzified)
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
A numerical value.
Calculates numerically the square of a fuzzy number
Fuzzy.Square(F1L, breakpoints = 100, plot = FALSE)
Fuzzy.Square(F1L, breakpoints = 100, plot = FALSE)
F1L |
a fuzzy number. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
plot |
fixed by default to "FALSE". plot="TRUE" if a plot of the fuzzy number is required. |
A matrix composed by 2 vectors representing the numerical left and right alpha-cuts. For this output, is.alphacuts = TRUE.
X <- TrapezoidalFuzzyNumber(1,2,3,4) Fuzzy.Square(X, plot=TRUE)
X <- TrapezoidalFuzzyNumber(1,2,3,4) Fuzzy.Square(X, plot=TRUE)
Gives the polynomial expression of the left alpha-levels of the numerical square of a fuzzy number
Fuzzy.Square.poly.left(F1L, breakpoints = 100)
Fuzzy.Square.poly.left(F1L, breakpoints = 100)
F1L |
a fuzzy number. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A table containing print the related polynoms at the corresponding definition domains.
X <- TrapezoidalFuzzyNumber(1,2,3,4) Fuzzy.Square.poly.left(X)
X <- TrapezoidalFuzzyNumber(1,2,3,4) Fuzzy.Square.poly.left(X)
Gives the polynomial expression of the right alpha-levels of the numerical square of a fuzzy number
Fuzzy.Square.poly.right(F1L, breakpoints = 100)
Fuzzy.Square.poly.right(F1L, breakpoints = 100)
F1L |
a fuzzy number. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A table containing print the related polynoms at the corresponding definition domains.
X <- TrapezoidalFuzzyNumber(1,2,3,4) Fuzzy.Square.poly.right(X)
X <- TrapezoidalFuzzyNumber(1,2,3,4) Fuzzy.Square.poly.right(X)
Calculates the variance by a chosen method: distance, exact or approximation
Fuzzy.variance( data.fuzzified, method, dist.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, int.method = "int.simpson", plot = FALSE )
Fuzzy.variance( data.fuzzified, method, dist.type = "DSGD", i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, int.method = "int.simpson", plot = FALSE )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
method |
choices are the following: "distance", "exact", "approximation1", "approxi- mation2", "approximation3", "approximation4", "approximation5". |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, q is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
int.method |
the integration method could be one of the following four methods: "int.0", "int.t", "int.ct" and "int.simpson". |
plot |
fixed by default to "FALSE". plot="TRUE" if a plot of the fuzzy number is required. |
If the parameter method = "distance", returns a numerical value. If else, returns the numerical -cuts of the estimated fuzzy variance.
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,3) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) Fuzzy.variance(data.fuzzified, method = "approximation5", plot=TRUE) Fuzzy.variance(data.fuzzified, method = "distance")
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,3) PA11 <- c(1,2,3) data.fuzzified <- FUZZ(data,mi=1,si=1,PA=PA11) Fuzzy.variance(data.fuzzified, method = "approximation5", plot=TRUE) Fuzzy.variance(data.fuzzified, method = "distance")
Creates a Gaussian two-sided bell fuzzy number
GaussianBellFuzzyNumber( left.mean, left.sigma, right.mean, right.sigma, alphacuts = FALSE, margin = c(5, 5), step = 0.01, breakpoints = 100, precision = 4, plot = FALSE )
GaussianBellFuzzyNumber( left.mean, left.sigma, right.mean, right.sigma, alphacuts = FALSE, margin = c(5, 5), step = 0.01, breakpoints = 100, precision = 4, plot = FALSE )
left.mean |
a numerical value of the parameter mu of the left Gaussian curve. |
left.sigma |
a numerical value of the parameter sigma of the left Gaussian curve. |
right.mean |
a numerical value of the parameter mu of the right Gaussian curve. |
right.sigma |
a numerical value of the parameter sigma of the right Gaussian curve. |
alphacuts |
fixed by default to "FALSE". No alpha-cuts are printed in this case. |
margin |
an optional numerical couple of values representing the range of calculations of the Gaussian curve written as [mean - 3*sigma; mean + 3*sigma] by default. |
step |
a numerical value fixing the step between two knots dividing the interval [mean - 3*sigma; mean + 3*sigma]. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
precision |
an integer specifying the number of decimals for which the calculations are made. These latter are set by default to be at the order of 1/10^4 . |
plot |
fixed by default to "FALSE". plot="TRUE" if a plot of the fuzzy number is required. |
If the parameter alphacuts="TRUE", the function returns a matrix composed by 2 vectors representing the left and right alpha-cuts. For this output, is.alphacuts = TRUE. If the parameter alphacuts="FALSE", the function returns a list composed by the Class, the mean, the sigma, the vectors of the left and right alpha-cuts.
GBFN <- GaussianBellFuzzyNumber(left.mean = -1, left.sigma = 1, right.mean = 2, right.sigma = 1, alphacuts = TRUE, plot=TRUE) is.alphacuts(GBFN)
GBFN <- GaussianBellFuzzyNumber(left.mean = -1, left.sigma = 1, right.mean = 2, right.sigma = 1, alphacuts = TRUE, plot=TRUE) is.alphacuts(GBFN)
Creates a Gaussian fuzzy number
GaussianFuzzyNumber( mean, sigma, alphacuts = FALSE, margin = c(5, 5), step = 0.01, breakpoints = 100, precision = 4, plot = FALSE )
GaussianFuzzyNumber( mean, sigma, alphacuts = FALSE, margin = c(5, 5), step = 0.01, breakpoints = 100, precision = 4, plot = FALSE )
mean |
a numerical value of the parameter mu of the Gaussian curve. |
sigma |
a numerical value of the parameter sigma of the Gaussian curve. |
alphacuts |
fixed by default to "FALSE". No alpha-cuts are printed in this case. |
margin |
an optional numerical couple of values representing the range of calculations of the Gaussian curve written as [mean - 3*sigma; mean + 3*sigma] by default. |
step |
a numerical value fixing the step between two knots dividing the interval [mean - 3*sigma; mean + 3*sigma]. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
precision |
an integer specifying the number of decimals for which the calculations are made. These latter are set by default to be at the order of 1/10^4 . |
plot |
fixed by default to "FALSE". plot="TRUE" if a plot of the fuzzy number is required. |
If the parameter alphacuts="TRUE", the function returns a matrix composed by 2 vectors representing the left and right alpha-cuts. For this output, is.alphacuts = TRUE. If the parameter alphacuts="FALSE", the function returns a list composed by the Class, the mean, the sigma, the vectors of the left and right alpha-cuts.
GFN <- GaussianFuzzyNumber(mean = 0, sigma = 1, alphacuts = TRUE, plot=TRUE) is.alphacuts(GFN)
GFN <- GaussianFuzzyNumber(mean = 0, sigma = 1, alphacuts = TRUE, plot=TRUE) is.alphacuts(GFN)
Fuzzifies a variable modelled by any type of fuzzy numbers
GFUZZ(data, mi, si, PA, spec = "Identical", breakpoints = 100)
GFUZZ(data, mi, si, PA, spec = "Identical", breakpoints = 100)
data |
a data set. |
mi |
the index of the main-item containing the concerned variable. |
si |
the index of the sub-item of a given main-item mi. |
PA |
a vector of the linguistic terms of the considered variable. |
spec |
specification of the fuzzification matrix. The possible values are "Identical" and "Not Identical". |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. breakpoints is fixed to 100 by default. |
A numerical fuzzification array of 3 dimensions (m,n,2), with m lines, n columns and no NA.
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,3) PA11 <- c(1,2,3) data.fuzzified <- GFUZZ(data,mi=1,si=1,PA=PA11)
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) MF111 <- TrapezoidalFuzzyNumber(0,1,1,2) MF112 <- TrapezoidalFuzzyNumber(1,2,2,3) MF113 <- TrapezoidalFuzzyNumber(2,3,3,3) PA11 <- c(1,2,3) data.fuzzified <- GFUZZ(data,mi=1,si=1,PA=PA11)
Calculates the global evaluation of a linguistic questionnaire
GLOB.EVAL( Full_Database, MI, bmi, SI, b_jkt, p_ind = rep(1/nrow(Full_Database), nrow(Full_Database)), distance.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
GLOB.EVAL( Full_Database, MI, bmi, SI, b_jkt, p_ind = rep(1/nrow(Full_Database), nrow(Full_Database)), distance.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
Full_Database |
the data set to evaluate. |
MI |
a numerical value representing the total number of main-items dividing the linguistic questionnaire. |
bmi |
an array referring to the initial weights of the main-items. |
SI |
an array representing the total numbers of sub-items per main-item. |
b_jkt |
a matrix of MI rows and max(SI) columns expressing the initial weights of each sub-item of a given main-item. |
p_ind |
a vector of the relative sampling weights of the units, for which
If no sampling weights are used, the vector of weights is reduced to a vector of values 1, i.e. |
distance.type |
type of distance chosen from the family of distances, set by default to the signed distance. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A data set of individual evaluations, for which the number of observations is exactly the same as the initial data set.
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) MI <- 2 SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_j <- c(1/2,1/2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) PA11 <- c(1,2,3,4,5) PA12 <- c(1,2,3,4,5) PA21 <- c(1,2,3,4,5) PA22 <- c(1,2,3,4,5) # ------------------ MF111 <- TrapezoidalFuzzyNumber(0,2,2,7) MF112 <- TrapezoidalFuzzyNumber(2,7,7,15) MF113 <- TrapezoidalFuzzyNumber(7,15,15,23) MF114 <- TrapezoidalFuzzyNumber(15,23,23,28) MF115 <- TrapezoidalFuzzyNumber(23,28,28,30) MF11 <- GFUZZ(data, 1, 1, PA11, spec="Identical", breakpoints = 100) # ------------------ MF121 <- TrapezoidalFuzzyNumber(0,2,2,7) MF122 <- TrapezoidalFuzzyNumber(2,7,7,15) MF123 <- TrapezoidalFuzzyNumber(7,15,15,23) MF124 <- TrapezoidalFuzzyNumber(15,23,23,28) MF125 <- TrapezoidalFuzzyNumber(23,28,28,30) MF12 <- GFUZZ(data, 1, 2, PA12, spec="Identical", breakpoints = 100) # ------------------ MF211 <- TrapezoidalFuzzyNumber(0,2,2,7) MF212 <- TrapezoidalFuzzyNumber(2,7,7,15) MF213 <- TrapezoidalFuzzyNumber(7,15,15,23) MF214 <- TrapezoidalFuzzyNumber(15,23,23,28) MF215 <- TrapezoidalFuzzyNumber(23,28,28,30) MF21 <- GFUZZ(data, 2, 1, PA21, spec="Identical", breakpoints = 100) # ------------------ MF221 <- TrapezoidalFuzzyNumber(0,2,2,7) MF222 <- TrapezoidalFuzzyNumber(2,7,7,15) MF223 <- TrapezoidalFuzzyNumber(7,15,15,23) MF224 <- TrapezoidalFuzzyNumber(15,23,23,28) MF225 <- TrapezoidalFuzzyNumber(23,28,28,30) MF22 <- GFUZZ(data, 2, 2, PA22, spec="Identical", breakpoints = 100) # ------------------ range <- matrix(c(0,0,0,0,28,28,28,28), ncol=2) ind.eval <- IND.EVAL(data,MI,b_j,SI,b_jk, range = range, distance.type ="DSGD.G") GLOB <- GLOB.EVAL(data, MI, b_j, SI, b_jk, distance.type ="GSGD")
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) MI <- 2 SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_j <- c(1/2,1/2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) PA11 <- c(1,2,3,4,5) PA12 <- c(1,2,3,4,5) PA21 <- c(1,2,3,4,5) PA22 <- c(1,2,3,4,5) # ------------------ MF111 <- TrapezoidalFuzzyNumber(0,2,2,7) MF112 <- TrapezoidalFuzzyNumber(2,7,7,15) MF113 <- TrapezoidalFuzzyNumber(7,15,15,23) MF114 <- TrapezoidalFuzzyNumber(15,23,23,28) MF115 <- TrapezoidalFuzzyNumber(23,28,28,30) MF11 <- GFUZZ(data, 1, 1, PA11, spec="Identical", breakpoints = 100) # ------------------ MF121 <- TrapezoidalFuzzyNumber(0,2,2,7) MF122 <- TrapezoidalFuzzyNumber(2,7,7,15) MF123 <- TrapezoidalFuzzyNumber(7,15,15,23) MF124 <- TrapezoidalFuzzyNumber(15,23,23,28) MF125 <- TrapezoidalFuzzyNumber(23,28,28,30) MF12 <- GFUZZ(data, 1, 2, PA12, spec="Identical", breakpoints = 100) # ------------------ MF211 <- TrapezoidalFuzzyNumber(0,2,2,7) MF212 <- TrapezoidalFuzzyNumber(2,7,7,15) MF213 <- TrapezoidalFuzzyNumber(7,15,15,23) MF214 <- TrapezoidalFuzzyNumber(15,23,23,28) MF215 <- TrapezoidalFuzzyNumber(23,28,28,30) MF21 <- GFUZZ(data, 2, 1, PA21, spec="Identical", breakpoints = 100) # ------------------ MF221 <- TrapezoidalFuzzyNumber(0,2,2,7) MF222 <- TrapezoidalFuzzyNumber(2,7,7,15) MF223 <- TrapezoidalFuzzyNumber(7,15,15,23) MF224 <- TrapezoidalFuzzyNumber(15,23,23,28) MF225 <- TrapezoidalFuzzyNumber(23,28,28,30) MF22 <- GFUZZ(data, 2, 2, PA22, spec="Identical", breakpoints = 100) # ------------------ range <- matrix(c(0,0,0,0,28,28,28,28), ncol=2) ind.eval <- IND.EVAL(data,MI,b_j,SI,b_jk, range = range, distance.type ="DSGD.G") GLOB <- GLOB.EVAL(data, MI, b_j, SI, b_jk, distance.type ="GSGD")
Calculates the weighted mean of the set of individual evaluations
GLOB.EVAL.mean(ind.eval, weight = rep(1, length(ind.eval)))
GLOB.EVAL.mean(ind.eval, weight = rep(1, length(ind.eval)))
ind.eval |
the set of individual evaluations. |
weight |
a vector of the relative sampling weights of the units, for which |
An integer.
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) MI <- 2 SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_j <- c(1/2,1/2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) PA11 <- c(1,2,3,4,5) PA12 <- c(1,2,3,4,5) PA21 <- c(1,2,3,4,5) PA22 <- c(1,2,3,4,5) # ------------------ MF111 <- TrapezoidalFuzzyNumber(0,2,2,7) MF112 <- TrapezoidalFuzzyNumber(2,7,7,15) MF113 <- TrapezoidalFuzzyNumber(7,15,15,23) MF114 <- TrapezoidalFuzzyNumber(15,23,23,28) MF115 <- TrapezoidalFuzzyNumber(23,28,28,30) MF11 <- GFUZZ(data, 1, 1, PA11, spec="Identical", breakpoints = 100) # ------------------ MF121 <- TrapezoidalFuzzyNumber(0,2,2,7) MF122 <- TrapezoidalFuzzyNumber(2,7,7,15) MF123 <- TrapezoidalFuzzyNumber(7,15,15,23) MF124 <- TrapezoidalFuzzyNumber(15,23,23,28) MF125 <- TrapezoidalFuzzyNumber(23,28,28,30) MF12 <- GFUZZ(data, 1, 2, PA12, spec="Identical", breakpoints = 100) # ------------------ MF211 <- TrapezoidalFuzzyNumber(0,2,2,7) MF212 <- TrapezoidalFuzzyNumber(2,7,7,15) MF213 <- TrapezoidalFuzzyNumber(7,15,15,23) MF214 <- TrapezoidalFuzzyNumber(15,23,23,28) MF215 <- TrapezoidalFuzzyNumber(23,28,28,30) MF21 <- GFUZZ(data, 2, 1, PA21, spec="Identical", breakpoints = 100) # ------------------ MF221 <- TrapezoidalFuzzyNumber(0,2,2,7) MF222 <- TrapezoidalFuzzyNumber(2,7,7,15) MF223 <- TrapezoidalFuzzyNumber(7,15,15,23) MF224 <- TrapezoidalFuzzyNumber(15,23,23,28) MF225 <- TrapezoidalFuzzyNumber(23,28,28,30) MF22 <- GFUZZ(data, 2, 2, PA22, spec="Identical", breakpoints = 100) # ------------------ range <- matrix(c(0,0,0,0,28,28,28,28), ncol=2) ind.eval <- IND.EVAL(data,MI,b_j,SI,b_jk, range = range, distance.type ="DSGD.G") GLOB.mean <- GLOB.EVAL.mean(ind.eval)
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) MI <- 2 SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_j <- c(1/2,1/2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) PA11 <- c(1,2,3,4,5) PA12 <- c(1,2,3,4,5) PA21 <- c(1,2,3,4,5) PA22 <- c(1,2,3,4,5) # ------------------ MF111 <- TrapezoidalFuzzyNumber(0,2,2,7) MF112 <- TrapezoidalFuzzyNumber(2,7,7,15) MF113 <- TrapezoidalFuzzyNumber(7,15,15,23) MF114 <- TrapezoidalFuzzyNumber(15,23,23,28) MF115 <- TrapezoidalFuzzyNumber(23,28,28,30) MF11 <- GFUZZ(data, 1, 1, PA11, spec="Identical", breakpoints = 100) # ------------------ MF121 <- TrapezoidalFuzzyNumber(0,2,2,7) MF122 <- TrapezoidalFuzzyNumber(2,7,7,15) MF123 <- TrapezoidalFuzzyNumber(7,15,15,23) MF124 <- TrapezoidalFuzzyNumber(15,23,23,28) MF125 <- TrapezoidalFuzzyNumber(23,28,28,30) MF12 <- GFUZZ(data, 1, 2, PA12, spec="Identical", breakpoints = 100) # ------------------ MF211 <- TrapezoidalFuzzyNumber(0,2,2,7) MF212 <- TrapezoidalFuzzyNumber(2,7,7,15) MF213 <- TrapezoidalFuzzyNumber(7,15,15,23) MF214 <- TrapezoidalFuzzyNumber(15,23,23,28) MF215 <- TrapezoidalFuzzyNumber(23,28,28,30) MF21 <- GFUZZ(data, 2, 1, PA21, spec="Identical", breakpoints = 100) # ------------------ MF221 <- TrapezoidalFuzzyNumber(0,2,2,7) MF222 <- TrapezoidalFuzzyNumber(2,7,7,15) MF223 <- TrapezoidalFuzzyNumber(7,15,15,23) MF224 <- TrapezoidalFuzzyNumber(15,23,23,28) MF225 <- TrapezoidalFuzzyNumber(23,28,28,30) MF22 <- GFUZZ(data, 2, 2, PA22, spec="Identical", breakpoints = 100) # ------------------ range <- matrix(c(0,0,0,0,28,28,28,28), ncol=2) ind.eval <- IND.EVAL(data,MI,b_j,SI,b_jk, range = range, distance.type ="DSGD.G") GLOB.mean <- GLOB.EVAL.mean(ind.eval)
Calculates a distance between fuzzy numbers
GSGD(X, Y, i = 1, j = 1, thetas = 1, breakpoints = 100)
GSGD(X, Y, i = 1, j = 1, thetas = 1, breakpoints = 100)
X |
a fuzzy number. |
Y |
a fuzzy number. |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Calculates the individual evaluations of a linguistic questionnaire
IND.EVAL( Full_Database, MI, bmi, SI, b_jkt, range, distance.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, spec = "Identical" )
IND.EVAL( Full_Database, MI, bmi, SI, b_jkt, range, distance.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, spec = "Identical" )
Full_Database |
the data set to evaluate. |
MI |
a numerical value representing the total number of main-items dividing the linguistic questionnaire. |
bmi |
an array referring to the initial weights of the main-items. |
SI |
an array representing the total numbers of sub-items per main-item. |
b_jkt |
a matrix of MI rows and max(SI) columns expressing the initial weights of each sub-item of a given main-item. |
range |
a vector of 2 elements giving the range of definition of the produced individual evaluations. The range is usually chosen in the interval between 0 and the maximum of the support set of all the membership functions modelling the data set. |
distance.type |
type of distance chosen from the family of distances, set by default to the signed distance. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
spec |
specification of the fuzzification matrix. The possible values are "Identical" and "Not Identical". |
A data set of individual evaluations, for which the number of observations is exactly the same as the initial data set.
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) MI <- 2 SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_j <- c(1/2,1/2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) PA11 <- c(1,2,3,4,5) PA12 <- c(1,2,3,4,5) PA21 <- c(1,2,3,4,5) PA22 <- c(1,2,3,4,5) # ------------------ MF111 <- TrapezoidalFuzzyNumber(0,2,2,7) MF112 <- TrapezoidalFuzzyNumber(2,7,7,15) MF113 <- TrapezoidalFuzzyNumber(7,15,15,23) MF114 <- TrapezoidalFuzzyNumber(15,23,23,28) MF115 <- TrapezoidalFuzzyNumber(23,28,28,30) MF11 <- GFUZZ(data, 1, 1, PA11, spec="Identical", breakpoints = 100) # ------------------ MF121 <- TrapezoidalFuzzyNumber(0,2,2,7) MF122 <- TrapezoidalFuzzyNumber(2,7,7,15) MF123 <- TrapezoidalFuzzyNumber(7,15,15,23) MF124 <- TrapezoidalFuzzyNumber(15,23,23,28) MF125 <- TrapezoidalFuzzyNumber(23,28,28,30) MF12 <- GFUZZ(data, 1, 2, PA12, spec="Identical", breakpoints = 100) # ------------------ MF211 <- TrapezoidalFuzzyNumber(0,2,2,7) MF212 <- TrapezoidalFuzzyNumber(2,7,7,15) MF213 <- TrapezoidalFuzzyNumber(7,15,15,23) MF214 <- TrapezoidalFuzzyNumber(15,23,23,28) MF215 <- TrapezoidalFuzzyNumber(23,28,28,30) MF21 <- GFUZZ(data, 2, 1, PA21, spec="Identical", breakpoints = 100) # ------------------ MF221 <- TrapezoidalFuzzyNumber(0,2,2,7) MF222 <- TrapezoidalFuzzyNumber(2,7,7,15) MF223 <- TrapezoidalFuzzyNumber(7,15,15,23) MF224 <- TrapezoidalFuzzyNumber(15,23,23,28) MF225 <- TrapezoidalFuzzyNumber(23,28,28,30) MF22 <- GFUZZ(data, 2, 2, PA22, spec="Identical", breakpoints = 100) # ------------------ range <- matrix(c(0,0,0,0,28,28,28,28), ncol=2) ind.eval <- IND.EVAL(data,MI,b_j,SI,b_jk, range = range, distance.type ="DSGD.G")
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) MI <- 2 SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_j <- c(1/2,1/2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) PA11 <- c(1,2,3,4,5) PA12 <- c(1,2,3,4,5) PA21 <- c(1,2,3,4,5) PA22 <- c(1,2,3,4,5) # ------------------ MF111 <- TrapezoidalFuzzyNumber(0,2,2,7) MF112 <- TrapezoidalFuzzyNumber(2,7,7,15) MF113 <- TrapezoidalFuzzyNumber(7,15,15,23) MF114 <- TrapezoidalFuzzyNumber(15,23,23,28) MF115 <- TrapezoidalFuzzyNumber(23,28,28,30) MF11 <- GFUZZ(data, 1, 1, PA11, spec="Identical", breakpoints = 100) # ------------------ MF121 <- TrapezoidalFuzzyNumber(0,2,2,7) MF122 <- TrapezoidalFuzzyNumber(2,7,7,15) MF123 <- TrapezoidalFuzzyNumber(7,15,15,23) MF124 <- TrapezoidalFuzzyNumber(15,23,23,28) MF125 <- TrapezoidalFuzzyNumber(23,28,28,30) MF12 <- GFUZZ(data, 1, 2, PA12, spec="Identical", breakpoints = 100) # ------------------ MF211 <- TrapezoidalFuzzyNumber(0,2,2,7) MF212 <- TrapezoidalFuzzyNumber(2,7,7,15) MF213 <- TrapezoidalFuzzyNumber(7,15,15,23) MF214 <- TrapezoidalFuzzyNumber(15,23,23,28) MF215 <- TrapezoidalFuzzyNumber(23,28,28,30) MF21 <- GFUZZ(data, 2, 1, PA21, spec="Identical", breakpoints = 100) # ------------------ MF221 <- TrapezoidalFuzzyNumber(0,2,2,7) MF222 <- TrapezoidalFuzzyNumber(2,7,7,15) MF223 <- TrapezoidalFuzzyNumber(7,15,15,23) MF224 <- TrapezoidalFuzzyNumber(15,23,23,28) MF225 <- TrapezoidalFuzzyNumber(23,28,28,30) MF22 <- GFUZZ(data, 2, 2, PA22, spec="Identical", breakpoints = 100) # ------------------ range <- matrix(c(0,0,0,0,28,28,28,28), ncol=2) ind.eval <- IND.EVAL(data,MI,b_j,SI,b_jk, range = range, distance.type ="DSGD.G")
Numerical integration by the trivial method - method 1
int.0(cut, a = 0, b = 1)
int.0(cut, a = 0, b = 1)
cut |
a vector. |
a |
fixed by default to 0. |
b |
fixed by default to 1. |
An integer.
Numerical integration by the composite trapezoidal method - method 3
int.ct(cut, a = 0, b = 1)
int.ct(cut, a = 0, b = 1)
cut |
a vector. |
a |
fixed by default to 0. |
b |
fixed by default to 1. |
An integer.
Numerical integration by the Simpson method - method 4
int.simpson(alpha, cut, a = 0, b = 1)
int.simpson(alpha, cut, a = 0, b = 1)
alpha |
a vector of alpha values between 0 and 1. |
cut |
a vector. |
a |
fixed by default to 0. |
b |
fixed by default to 1. |
An integer.
Numerical integration - method 2
int.t(alpha, cut, a = 0, b = 1)
int.t(alpha, cut, a = 0, b = 1)
alpha |
a vector of alpha values between 0 and 1. |
cut |
a vector. |
a |
fixed by default to 0. |
b |
fixed by default to 1. |
An integer.
Numerical integration by a particular method
integrate.num(alpha, cut, method, a = 0, b = 1)
integrate.num(alpha, cut, method, a = 0, b = 1)
alpha |
a vector of alpha values between 0 and 1. |
cut |
a vector. |
method |
the integration method could be one of the following four methods: "int.0", "int.t", "int.ct" and "int.simpson". |
a |
fixed by default to 0. |
b |
fixed by default to 1. |
An integer.
Verifies if a matrix is set of left and right alpha-cuts
is.alphacuts(data)
is.alphacuts(data)
data |
a matrix of 2 equal length columns with no NA. |
A value TRUE if the concerned object can be a set of numerical left and right alpha-cuts, FALSE otherwise.
mat <- matrix(c(1,2,3,7,6,5), ncol = 2) is.alphacuts(mat)
mat <- matrix(c(1,2,3,7,6,5), ncol = 2) is.alphacuts(mat)
Verifies if a design is balanced
is.balanced(ni)
is.balanced(ni)
ni |
a line array given by the contingency table related to the considered variable. Often written as a result of a call of the function table. |
Returns a logical decision TRUE or FALSE, to indicate if a given design is respectively balanced or not.
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) ni <- t(table(data)) is.balanced(ni)
data <- matrix(c(1,2,3,2,2,1,1,3,1,2),ncol=1) ni <- t(table(data)) is.balanced(ni)
Verifies if a matrix is a fuzzification matrix
is.fuzzification(data)
is.fuzzification(data)
data |
an array of 3 dimensions c(m,n,2), with m lines, n columns. No NA are allowed. |
A value TRUE if the concerned object is a numerical fuzzification matrix, FALSE otherwise.
mat <- array(c(1,1,2,2,3,3,5,5,6,6,7,7),dim=c(2,3,2)) is.fuzzification(mat)
mat <- array(c(1,1,2,2,3,3,5,5,6,6,7,7),dim=c(2,3,2)) is.fuzzification(mat)
Verifies if a matrix is a fuzzification matrix of trapezoidal fuzzy numbers
is.trfuzzification(data)
is.trfuzzification(data)
data |
a matrix of 4 columns (p,q,r,s), where p |
A value TRUE if the concerned object is a trapezoidal or triangular fuzzification matrix, FALSE otherwise.
mat <- matrix(c(1,1,2,2,3,3,4,4),ncol=4) is.trfuzzification(mat)
mat <- matrix(c(1,1,2,2,3,3,4,4),ncol=4) is.trfuzzification(mat)
Calculates the excess of kurtosis of a random fuzzy variable
Kurtosis( data.fuzzified, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
Kurtosis( data.fuzzified, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, q is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
mat <- matrix(c(1,2,0.25,1.8,2,2.6,0.5,3,3,2.6,3.8,4,4,4.2,3.9,5), ncol =4) Kurtosis(mat, dist.type = "GSGD")
mat <- matrix(c(1,2,0.25,1.8,2,2.6,0.5,3,3,2.6,3.8,4,4,4.2,3.9,5), ncol =4) Kurtosis(mat, dist.type = "GSGD")
Calculates a distance by the d_Mid.Spr between fuzzy numbers
Mid.Spr(X, Y, i = 1, j = 1, theta = 1/3, breakpoints = 100)
Mid.Spr(X, Y, i = 1, j = 1, theta = 1/3, breakpoints = 100)
X |
a fuzzy number. |
Y |
a fuzzy number. |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Calculates a central sample moment of a random fuzzy variable
Moment( data.fuzzified, k, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
Moment( data.fuzzified, k, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
k |
the order of the moment. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, q is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
mat <- matrix(c(1,2,2,3,3,4,4,5), ncol =4) Moment(mat, k=4, dist.type = "GSGD")
mat <- matrix(c(1,2,2,3,3,4,4,5), ncol =4) Moment(mat, k=4, dist.type = "GSGD")
Calculates the number of answers by a specific sub-item
n_jk..(x, varindex, PA, p_ind = rep(1, nrow(x)))
n_jk..(x, varindex, PA, p_ind = rep(1, nrow(x)))
x |
the data set to evaluate. |
varindex |
index of a particular sub-item. |
PA |
set of possible linguistic terms. |
p_ind |
a vector of the relative sampling weights of the units, for which
If no sampling weights are used, the vector of weights is reduced to a vector of values 1, i.e. |
A positive integer.
Calculates the number of answers by a specific linguistic of a sub-item
n_jkq.(x, varindex, q, p_ind = rep(1, nrow(x)))
n_jkq.(x, varindex, q, p_ind = rep(1, nrow(x)))
x |
the data set to evaluate. |
varindex |
index of a particular sub-item. |
q |
index of a particular linguistic term. |
p_ind |
a vector of the relative sampling weights of the units, for which
If no sampling weights are used, the vector of weights is reduced to a vector of values 1, i.e. |
A positive integer.
Calculates the number of breakpoints of a numerical matrix of alpha-cuts
nbreakpoints(data)
nbreakpoints(data)
data |
a matrix of numerical alpha-cuts or a 3-dimensional array. No NA are allowed. |
A numerical positive integer.
X <- TrapezoidalFuzzyNumber(1,2,3,4) alpha.X <- alphacut(X, seq(0,1,0.01)) nbreakpoints(alpha.X)
X <- TrapezoidalFuzzyNumber(1,2,3,4) alpha.X <- alphacut(X, seq(0,1,0.01)) nbreakpoints(alpha.X)
Calculates the p-value of fuzzy observations taken from a Fisher distribution
p.value.fisher( type, H0, H1, t, n, r, s.d, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
p.value.fisher( type, H0, H1, t, n, r, s.d, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
t |
a given numerical or fuzzy type parameter of the distribution. |
n |
first degree of freedom. |
r |
second degree of freedom. |
s.d |
a numerical value for the standard deviation of the distribution. |
sig |
a numerical value representing the significance level of the test. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns the defuzzified p-value and the decision made.
Calculates the p-value of fuzzy observations taken from a Logistic distribution
p.value.log( type, H0, H1, t, n, s.d, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
p.value.log( type, H0, H1, t, n, s.d, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
t |
a given numerical or fuzzy type parameter of the distribution. |
n |
the total number of observations of the data set. |
s.d |
a numerical value for the standard deviation of the distribution. |
sig |
a numerical value representing the significance level of the test. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns the defuzzified p-value and the decision made.
Calculates the p-value of fuzzy observations taken from a logistic distribution for the mean
p.value.mean.log( data.fuzzified, type, H0, H1, s.d, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
p.value.mean.log( data.fuzzified, type, H0, H1, s.d, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
s.d |
a numerical value for the standard deviation of the distribution. |
sig |
a numerical value representing the significance level of the test. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns the defuzzified p-value and the decision made.
Calculates the p-value of fuzzy observations taken from a normal distribution for the mean
p.value.mean.normal( data.fuzzified, type, H0, H1, s.d, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
p.value.mean.normal( data.fuzzified, type, H0, H1, s.d, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
s.d |
a numerical value for the standard deviation of the distribution. |
sig |
a numerical value representing the significance level of the test. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns the defuzzified p-value and the decision made.
Calculates the p-value of fuzzy observations taken from a Poisson distribution for the mean
p.value.mean.poisson( data.fuzzified, type, H0, H1, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
p.value.mean.poisson( data.fuzzified, type, H0, H1, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
sig |
a numerical value representing the significance level of the test. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns the defuzzified p-value and the decision made.
Calculates the p-value of fuzzy observations taken from a Student distribution for the mean
p.value.mean.Student( data.fuzzified, type, H0, H1, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
p.value.mean.Student( data.fuzzified, type, H0, H1, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
sig |
a numerical value representing the significance level of the test. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns the defuzzified p-value and the decision made.
Calculates the p-value of fuzzy observations taken from a normal distribution
p.value.normal( type, H0, H1, t, n, s.d, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
p.value.normal( type, H0, H1, t, n, s.d, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
t |
a given numerical or fuzzy type parameter of the distribution. |
n |
the total number of observations of the data set. |
s.d |
a numerical value for the standard deviation of the distribution. |
sig |
a numerical value representing the significance level of the test. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
Returns the defuzzified p-value and the decision made.
Calculates the p-value of fuzzy observations taken from a Poisson distribution
p.value.poisson( type, H0, H1, t, n, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, s.d = 1 )
p.value.poisson( type, H0, H1, t, n, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, s.d = 1 )
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
t |
a given numerical or fuzzy type parameter of the distribution. |
n |
the total number of observations of the data set. |
sig |
a numerical value representing the significance level of the test. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
s.d |
a numerical value for the standard deviation of the distribution. |
Returns the defuzzified p-value and the decision made.
Calculates the p-value of fuzzy observations taken from a Student distribution
p.value.Student( type, H0, H1, t, n, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, s.d = 1 )
p.value.Student( type, H0, H1, t, n, sig, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100, s.d = 1 )
type |
a category betwenn "0", "1" and "2". The category "0" refers to a bilateral test, the category "1" for a lower unilateral one, and "2" for an upper unilateral test. |
H0 |
a trapezoidal or a triangular fuzzy number representing the fuzzy null hypothesis. |
H1 |
a trapezoidal or a triangular fuzzy number representing the fuzzy alternative hypothesis. |
t |
a given numerical or fuzzy type parameter of the distribution. |
n |
the total number of observations of the data set. |
sig |
a numerical value representing the significance level of the test. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, p is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
s.d |
a numerical value for the standard deviation of the distribution. |
Returns the defuzzified p-value and the decision made.
Calculates the indicator of information's rate of the data base
R(x, p_ind, b_jk, SI)
R(x, p_ind, b_jk, SI)
x |
the data set to evaluate. |
p_ind |
a vector of the relative sampling weights of the units, for which
If no sampling weights are used, the vector of weights is reduced to a vector of values 1, i.e. |
b_jk |
a matrix of length(b_j) rows and max(SI) columns expressing the initial weights of each sub-item of a given main-item. |
SI |
an array representing the total numbers of sub-items per main-item. |
A numerical value giving the indicator of information's rate of the complete linguistic questionnaire. Note that the obtained value is interpreted as the more it tends to the value 1, the less the complete questionnaire contains missing values.
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) p_ind <- c(0.1,0.05,0.05,0.2,0.1,0.05,0.1,0.1,0.2,0.05) SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) R(data, p_ind, b_jk, SI)
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) p_ind <- c(0.1,0.05,0.05,0.2,0.1,0.05,0.1,0.1,0.2,0.05) SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) R(data, p_ind, b_jk, SI)
Calculates a distance by the Rho1 between fuzzy numbers
Rho1(X, Y, breakpoints = 100)
Rho1(X, Y, breakpoints = 100)
X |
a fuzzy number. |
Y |
a fuzzy number. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Calculates a distance by the Rho2 between fuzzy numbers
Rho2(X, Y, breakpoints = 100)
Rho2(X, Y, breakpoints = 100)
X |
a fuzzy number. |
Y |
a fuzzy number. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Calculates a distance by the d_Rhop between fuzzy numbers
Rhop(X, Y, p, breakpoints = 100)
Rhop(X, Y, p, breakpoints = 100)
X |
a fuzzy number. |
Y |
a fuzzy number. |
p |
a positive integer such that 1 |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Calculates the indicator of information's rate of the data base for a given unit
Ri(x, i, b_jk, SI)
Ri(x, i, b_jk, SI)
x |
the data set to evaluate. |
i |
an observation index. |
b_jk |
a matrix of length(b_j) rows and max(SI) columns expressing the initial weights of each sub-item of a given main-item. |
SI |
an array representing the total numbers of sub-items per main-item. |
A numerical value giving the indicator of information's rate of the complete linguistic questionnaire for a particular observation. Note that the obtained value is interpreted as the more it tends to the value 1, the less the observation i contains missing values.
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) Ri(data, 7, b_jk, SI)
data <- matrix(c(3,4,2,3,3,2,4,3,3,4,3,4,4,2,5,3,4,4,3,3,3,4,4,3, 3,3,4,3,3,3,3,4,4,3,5,3,4,3,3,3), ncol = 4) data <- as.data.frame(data) SI1 <- 2 SI2 <- 2 SI <- c(SI1,SI2) b_jk <- matrix(c(0.5,0.5,0.5,0.5),nrow=2) Ri(data, 7, b_jk, SI)
Calculates the sample variance by a convenient metric
Sample.variance( data.fuzzified, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
Sample.variance( data.fuzzified, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, q is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Calculates the sequential sums of squares by a convenient metric
SEQ.ORDERING(scope, data, f.response)
SEQ.ORDERING(scope, data, f.response)
scope |
a description of the complete fitting model. |
data |
the data frame containing all the variables of the model. |
f.response |
the vector of distances of the fuzzy response variable to the fuzzy origin. |
Returns a list of the new sets of sums of squares, as well as the coefficients, the residuals and the fitted.values.
Calculates the sequential sums of squares by an approximation
SEQ.ORDERING.APPROXIMATION(scope, data, f.response)
SEQ.ORDERING.APPROXIMATION(scope, data, f.response)
scope |
a description of the complete fitting model. |
data |
the data frame containing all the variables of the model. |
f.response |
the vector of distances of the fuzzy response variable to the fuzzy origin. |
Returns a list of the new sets of sums of squares, as well as the coefficients, the residuals and the fitted.values.
Calculates the sequential sums of squares by an exact calculation
SEQ.ORDERING.EXACT(scope, data, f.response)
SEQ.ORDERING.EXACT(scope, data, f.response)
scope |
a description of the complete fitting model. |
data |
the data frame containing all the variables of the model. |
f.response |
the vector of distances of the fuzzy response variable to the fuzzy origin. |
Returns a list of the new sets of sums of squares, as well as the coefficients, the residuals and the fitted.values.
Calculates a distance by the SGD between fuzzy numbers
SGD(X, i = 1, j = 1, breakpoints = 100)
SGD(X, i = 1, j = 1, breakpoints = 100)
X |
a fuzzy number. |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Calculates the skewness of a random fuzzy variable
Skewness( data.fuzzified, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
Skewness( data.fuzzified, dist.type, i = 1, j = 1, theta = 1/3, thetas = 1, p = 2, q = 0.5, breakpoints = 100 )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
dist.type |
type of distance chosen from the family of distances. The different choices are given by: "Rho1", "Rho2", "Bertoluzza", "Rhop", "Delta.pq", "Mid/Spr", "wabl", "DSGD", "DSGD.G", "GSGD". |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
thetas |
a decimal value between 0 and 1, representing the weight given to the shape of the fuzzy number. By default, thetas is fixed to 1. This parameter is used in the calculations of the d_theta star and the d_GSGD distances. |
p |
a positive integer such that 1 |
q |
a decimal value between 0 and 1, referring to the parameter of the metric Delta_pq. By default, q is fixed to 0.5. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
mat <- matrix(c(1,2,0.25,1.8,2,2.6,0.5,3,3,2.6,3.8,4,4,4.2,3.9,5), ncol =4) Skewness(mat, dist.type = "GSGD")
mat <- matrix(c(1,2,0.25,1.8,2,2.6,0.5,3,3,2.6,3.8,4,4,4.2,3.9,5), ncol =4) Skewness(mat, dist.type = "GSGD")
Takes any numerical value and squares it.
square(x)
square(x)
x |
A numeric value to be squared |
The square of the input
Fuzzifies a variable modelled by trapezoidal or triangular fuzzy numbers
tr.gfuzz(data, breakpoints = 100)
tr.gfuzz(data, breakpoints = 100)
data |
a matrix of 4 columns (p,q,r,s), where p |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. breakpoints is fixed to 100 by default. |
A 3-dimensional array with dimensions (m,n,2), i.e. m lines, n columns, with no NA.
data <- matrix(c(1,1,2,2,3,3,4,4),ncol=4) data.tr <- tr.gfuzz(data)
data <- matrix(c(1,1,2,2,3,3,4,4),ncol=4) data.tr <- tr.gfuzz(data)
Calculates a distance by the d_wabl between fuzzy numbers
wabl(X, Y, i = 1, j = 1, theta = 1/3, breakpoints = 100)
wabl(X, Y, i = 1, j = 1, theta = 1/3, breakpoints = 100)
X |
a fuzzy number. |
Y |
a fuzzy number. |
i |
parameter of the density function of the Beta distribution, fixed by default to i = 1. |
j |
parameter of the density function of the Beta distribution, fixed by default to j = 1. |
theta |
a numerical value between 0 and 1, representing a weighting parameter. By default, theta is fixed to 1/3 referring to the Lebesgue space. This measure is used in the calculations of the following distances: d_Bertoluzza, d_mid/spr and d_phi-wabl/ldev/rdev. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
A numerical value.
Calculates the weighted fuzzy sample mean
Weighted.fuzzy.mean( data.fuzzified, weight, breakpoints = 100, alphacuts = FALSE )
Weighted.fuzzy.mean( data.fuzzified, weight, breakpoints = 100, alphacuts = FALSE )
data.fuzzified |
a fuzzification matrix constructed by a call to the function FUZZ or the function GFUZZ, or a similar matrix. No NA are allowed. |
weight |
a weighting vector of the same length of the fuzzification matrix. No NA allowed. |
breakpoints |
a positive arbitrary integer representing the number of breaks chosen to build the numerical alpha-cuts. It is fixed to 100 by default. |
alphacuts |
fixed by default to "FALSE". No alpha-cuts are printed in this case. |
If the parameter alphacuts="TRUE", the function returns a matrix composed by 2 vectors representing the numerical left and right alpha-cuts. For this output, is.alphacuts = TRUE. If the parameter alphacuts="FALSE", the function returns a trapezoidal fuzzy number given by the quadruple (p,q,r,s).
mat <- matrix(c(1,2,2,3,3,4,4,5), ncol =4) w <- c(1,3) Weighted.fuzzy.mean(mat, w)
mat <- matrix(c(1,2,2,3,3,4,4,5), ncol =4) w <- c(1,3) Weighted.fuzzy.mean(mat, w)