PerfMeasure: Performance measures for evaluating the goodness of an...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/PerfMeasure.R

Description

Set of measures useful to evaluate the goodness of the used imputation method.

Usage

1
2
3
PerfMeasure(db.complete, db.imputed, db.missing, n.marg = 2, 
model = list(normalCopula(0.5, dim=n.marg, dispstr="ex"), claytonCopula(10, 
dim=n.marg), gumbelCopula(10, dim=n.marg), frankCopula(10, dim=n.marg)), ...)

Arguments

db.complete

the complete data matrix.

db.imputed

the imputed data matrix.

db.missing

the data matrix with NA data.

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 normal, frank, clayton and gumbel.

...

further parameters for fitCopula.

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 "numeric". The mean (on the replications performed) of the absolute relative error between the imputed and the corresponding original value.

RB

Object of class "numeric". The relative bias of the estimator for the dependence parameter.

RRMSE

Object of class "numeric". The relative root mean squared error of the estimator for the dependence parameter.

TID

Object of class "vector". Upper and lower tail dependence indexes for bivariate copulas. Original function is in tailIndex.

Author(s)

Francesca Marta Lilja Di Lascio <[email protected]>,

Simone Giannerini <[email protected]>

References

Di Lascio, F.M.L. Giannerini, S. and Reale A. (201x) "A multivariate technique based on conditional copula specification for the imputation of complex dependent data". Working paper.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# 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.5
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)

CoImp documentation built on May 29, 2017, 6:38 p.m.

Related to PerfMeasure in CoImp...