StatisticalMeasures {FuzzyImputationTest}R Documentation

Calculation of statistical measures for errors of the imputed data.

Description

StatisticalMeasures calculates various statistical measures between the real and imputed data.

Usage

StatisticalMeasures(trueData, imputedData, imputedMask, ...)

Arguments

trueData

Name of the input matrix (or data frame) with the true values of the variables.

imputedData

Name of the input matrix (or data frame) with the imputed values.

imputedMask

Matrix (or data frame) with logical values where TRUE indicates the cells with the imputed values.

...

Additional parameters passed to other functions.

Details

The procedure calculates different statistical measures between the real and imputed data for each column, namely:

To properly distinguish the real values with their imputed counterparts, the additional matrix imputedMask should be provided. In this matrix, the logical value TRUE points out the cells with the imputed values. Otherwise, FALSE should be used. These input datasets should be given as matrices or data frames.

Value

The output is given as a matrix with columns related to all columns of the input dataset plus the overall mean.

Examples


# 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)

# add some NAs to the matrix

matrix1NA <- IntroducingNA(matrix1,percentage = 0.1)

head(matrix1NA)

# impute missing values

matrix1DImp <- ImputationDimp(matrix1NA)

# find cells with NAs

matrix1Mask <- is.na(matrix1NA)

# calculate errors for the imputed values

StatisticalMeasures(matrix1,matrix1DImp,matrix1Mask)



[Package FuzzyImputationTest version 0.3.6 Index]