pgu.corrValidator: pgu.corrValidator

Description Format Construction Active bindings Methods Author(s) Examples

Description

An R6 class that performs pairwise correlation of the features of the original and the imputed data set. The correlation results of both data sets are compared by subtraction.

Format

R6::R6Class object.

Construction

x <- pguIMP::pgu.corrValidator$new()

Active bindings

featureNames

Returns the instance variable featureNames. (character)

orgR_mat

Returns the instance variable orgR_mat. (matrix)

impR_mat

Returns the instance variable impR_mat. (matrix)

orgP_mat

Returns the instance variable orgP_mat. (matrix)

impP_mat

Returns the instance variable impP_mat. (matrix)

corr_df

Returns the instance variable corr_df. (tibble::tibble)

summary_df

Returns the instance variable summary_df. (tibble::tibble)

Methods

Public methods


Method new()

Clears the heap and indicates if instance of pgu.corrValidator is removed from heap.

Summary of the correlation deviation distribution.

Creates a square matrix which dimension corresponds to the length of the instance variable featureNames. The matrix entries are set to a distinct value.

Flattens the results transforms them into a dataframe and stores it into the instance variable corr_df.

Creates and returns a new pgu.corrValidator object.

Usage
pgu.corrValidator$new(org_df = "tbl_df", imp_df = "tbl_df")
Arguments
org_df

The original data to be analyzed. (tibble::tibble)

imp_df

The imputed version of the org_df data.

Returns

A new pgu.corrValidator object. (pguIMP::pgu.corrValidator)


Method print()

Prints instance variables of a pgu.corrValidator object.

Usage
pgu.corrValidator$print()
Returns

string


Method reset()

Resets the object pgu.corrValidator based on the instance variable featureNames..

Usage
pgu.corrValidator$reset()

Method fit()

Runs the corraltion analysis.

Usage
pgu.corrValidator$fit(org_df = "tbl_df", imp_df = "tbl_df")
Arguments
org_df

Adataframe comprising the original data. (tibble::tibble)

imp_df

Adataframe comprising the imputed data. (tibble::tibble)


Method correlationScatterPlot()

Plots the correlation analysis results.

Usage
pgu.corrValidator$correlationScatterPlot()

Method correlationBarPlot()

Creates and returns a histogram from the cor_delat values.

Usage
pgu.corrValidator$correlationBarPlot()
Returns

Bar plot (ggplot2::ggplot)


Method correlationBoxPlot()

Plots the correlation analysis results.

Usage
pgu.corrValidator$correlationBoxPlot()

Method correlationCompoundPlot()

Creates and returns a compund graphical analysis of the cor_delta values.

Usage
pgu.corrValidator$correlationCompoundPlot()
Returns

Compound plot (gridExtra::grid.arrange)


Method clone()

The objects of this class are cloneable with this method.

Usage
pgu.corrValidator$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Sebastian Malkusch, malkusch@med.uni-frankfurt.de

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require(dplyr)
require(tibble)
data(iris)
data_df <- iris %>%
  tibble::as_tibble()
comp_df <- data_df %>%
  dplyr::mutate(Sepal.Length = sample(Sepal.Length))
corr_obj = pguIMP::pgu.corrValidator$new()
corr_obj$fit(data_df, comp_df)
print(corr_obj)

pguIMP documentation built on Sept. 30, 2021, 5:08 p.m.