# seed PRNG
set.seed(1234)
# load the necessary library
library(FuzzySimRes)
# generate sample of trapezoidal fuzzy numbers with FuzzySimRes library
list1<-SimulateSample(20,originalPD="rnorm",parOriginalPD=list(mean=0,sd=1),
incrCorePD="rexp", parIncrCorePD=list(rate=2),
suppLeftPD="runif",parSuppLeftPD=list(min=0,max=0.6),
suppRightPD="runif", parSuppRightPD=list(min=0,max=0.6),
type="trapezoidal")
# convert fuzzy data into a matrix
matrix1 <- FuzzyNumbersToMatrix(list1$value)
# check starting values
head(matrix1)
# check the quality of the imputed values
if (FALSE) {
MethodsComparison(matrix1,iterations=10,trapezoidal=TRUE)
}
Run the code above in your browser using DataLab