compute.fa2: FA2

Description Usage Arguments Details Author(s) Examples

Description

Estimates the FA2 of two univariate signals Y (imputed values) and X (true values).

Usage

1
compute.fa2(Y, X, verbose = F)

Arguments

Y

vector of imputed values

X

vector of true values

verbose

if TRUE, print advice about the quality of the model

Details

This function returns the value of FA2 of two vectors corresponding to univariate signals X (true values) and Y (imputed values). This FA2 corresponds to the percentage of pairs of values (x_{i}, y_{i}) satisfying the condition 0,5 <= (Y_{i}/X_{i}) <= 2. The closer FA2 is to 1, the more accurate is the imputation model. Both vectors Y and X must be of equal length, on the contrary an error will be displayed. In both input vectors, eventual NA will be exluded with a warning diplayed.

Author(s)

Camille Dezecache, Hong T. T. Phan, Emilie Poisson-Caillault

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(dataDTWBI)
X <- dataDTWBI[, 1] ; Y <- dataDTWBI[, 2]
compute.fa2(Y,X)
compute.fa2(Y,X, verbose = TRUE)

# By definition, if pairs of true and imputed values are zero,
# FA2 corresponding to this pair of values equals 1.
X[1] <- 0
Y[1] <- 0
compute.fa2(Y,X)

Example output

[1] 0.7761194
[1] "important number of different points"
[1] 0.7761194
[1] 0.7761194

DTWBI documentation built on May 2, 2019, 1:59 a.m.