measure_correlation: Measure correlation and stationary proportion between...

Description Usage Arguments Details Value See Also Examples

View source: R/measure_correlation.R

Description

Measures a relationship between two supplied completed data sets, typically generated by two sequential iterations of the missForest procedure. Given by the rank correlation or proportion of stationary values for ordered (including continuous) and categorical data respectively.

Usage

1
measure_correlation(X, Y, X_init, indicator, method = "spearman")

Arguments

X

named list; imputed values, in order of appearance by row in original data, of each variable (named) from one iteration within missForest procedure.

Y

named list; imputed values, in order of appearance by row in origina data, of each variable (named) from the iteration within the missForest procedure succeeding that used to determine X.

X_init

data.frame; a data set including any of numeric, logical, integer, factor and ordered data types, to be used as the initial state of the missForest procedure.

indicator

named list; an indicator of the missing (=T) or not-missing (=F) status of the columns of X_init.

method

character; passed to cor.

Details

Measures a relationship between two supplied completed data sets, typically generated by two sequential iterations of the missForest procedure. Intended to be used with the stop criterion that as soon as all values (see below) remain constant or decrease at once, then the missForest procedure is deemed to have converged.

The two values are the;

The type of correlation can be modified to that of kendall or pearson (not recommended for ordered data) by the method argument passed on to cor.

Value

named numeric; two named values:

continuous

mean (rank) correlation of the continuous and ordered data between the two completed data sets, and;

categorical

proportion of stationary values of categorical (unordered) data between the two completed data sets (see stationary_rate).

See Also

cor smirf stationary_rate

Examples

1
2
3
4
5
## Not run: 
# simply pass to smirf 
smirf(iris, stop.measure=measure_correlation)

## End(Not run)

stephematician/miForang documentation built on July 23, 2019, 5:11 p.m.