PerfMeasure {CoImp} | R Documentation |
Performance measures for evaluating the goodness of an imputed database
Description
Set of measures useful to evaluate the goodness of the used imputation method.
Usage
PerfMeasure(db.complete, db.imputed, db.missing, n.marg = 2, model =
list(normalCopula(0.5, dim=n.marg), claytonCopula(10,
dim=n.marg), gumbelCopula(10, dim=n.marg), frankCopula(10,
dim=n.marg), tCopula(0.5, dim=n.marg,...),
rotCopula(claytonCopula(10,dim=n.marg),flip=rep(TRUE,n.marg)),
...), ...)
Arguments
db.complete |
the complete data matrix. |
db.imputed |
the imputed data matrix. |
db.missing |
the data matrix with |
n.marg |
the number of variables in db.complete. |
model |
a list of copula models to be used for the imputation. See the Details section.
This should be one of |
... |
further parameters for |
Details
PerfMeasure computes some measures useful for evaluating the goodness of the used imputation method. PerfMeasure requires in input the imputed, the complete and the missing data matrix and gives in output five different measures of performance. See below for details
Value
An object of S4 class "PerfMeasure", which is a list with the following elements:
MARE |
Object of class |
RB |
Object of class |
RRMSE |
Object of class |
TID |
Object of class |
Author(s)
F. Marta L. Di Lascio <marta.dilascio@unibz.it>,
Simone Giannerini <simone.giannerini@unibo.it>
References
Di Lascio, F.M.L., Giannerini, S. and Reale, A. (2015) "Exploring Copulas for the Imputation of Complex Dependent Data". Statistical Methods & Applications, 24(1), p. 159-175. DOI 10.1007/s10260-014-0287-2.
Di Lascio, F.M.L., Giannerini, S. and Reale, A. (2014) "Imputation of complex dependent data by conditional copulas: analytic versus semiparametric approach", Book of proceedings of the 21st International Conference on Computational Statistics (COMPSTAT 2014), p. 491-497. ISBN 9782839913478.
Bianchi, G. Di Lascio, F.M.L. Giannerini, S. Manzari, A. Reale, A. and Ruocco, G. (2009) "Exploring copulas for the imputation of missing nonlinearly dependent data". Proceedings of the VII Meeting Classification and Data Analysis Group of the Italian Statistical Society (Cladag), Editors: Salvatore Ingrassia and Roberto Rocci, Cleup, p. 429-432. ISBN: 978-88-6129-406-6.
Examples
## Not run:
# generate data from a 4-variate Gumbel copula with different margins
set.seed(11)
n.marg <- 4
theta <- 5
copula <- frankCopula(theta, dim = n.marg)
mymvdc <- mvdc(copula, c("norm", "gamma", "beta","gamma"), list(list(mean=7, sd=2),
list(shape=3, rate=2), list(shape1=4, shape2=1), list(shape=4, rate=3)))
n <- 20
x.samp <- rMvdc(n, mymvdc)
# randomly introduce univariate and multivariate missing
perc.mis <- 0.3
set.seed(11)
miss.row <- sample(1:n, perc.mis*n, replace=TRUE)
miss.col <- sample(1:n.marg, perc.mis*n, replace=TRUE)
miss <- cbind(miss.row,miss.col)
x.samp.miss <- replace(x.samp,miss,NA)
# impute missing values
imp <- CoImp(x.samp.miss, n.marg=n.marg, smoothing=rep(0.6,n.marg), plot=TRUE,
type.data="continuous");
imp
# apply PerfMeasure to the imputed data set
pm <- PerfMeasure(db.complete=x.samp, db.missing=x.samp.miss,
db.imputed=imp@"Imputed.data.matrix", n.marg=4)
pm
str(pm)
## End(Not run)