compute.fa2: FA2

Description Usage Arguments Details Author(s) Examples

View source: R/FA2.R

Description

Calculate the FA2 between 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 FA2 value which corresponds to the percentage of pairs of values (x_{i}, y_{i}) satisfying the condition 0,5 <= (y_{i}/x_{i}) <= 2. FA2 is close to 1, the imputation model is more accurate. 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)

Thi-Thu-Hong Phan, Andre Bigand, Emilie Poisson-Caillault

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(dataFSMUMI)
X <- dataFSMUMI[, 1] ; Y <- dataFSMUMI[, 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)

FSMUMI documentation built on May 2, 2019, 12:40 p.m.