plotVars: Plot Euler Diagram of Variance Structure

Description Usage Arguments Details Value See Also

Description

This function gives a visual estimate of the confounding structure of the data used as input to estVC. This method uses the assigned PCs to estimate the percentage of variance in the data explained by each covariate, and to what extent there is overlap.

Usage

1
2
plotVars(results, annotation, plotzero = TRUE, incvals = FALSE,
  plotve = TRUE, maxStress = 0.1)

Arguments

results

An object output by estVC

annotation

The ‘annotation’ data frame fed to estVC when creating ‘results’

plotzero

Whether to include labels for covariates for which no PCs were assigned, and thus for which no variance is explained

incvals

Whether to add covariates to the Euler diagram in ascending order of percent variance explained

Details

This function uses the percent variance explained by each PC (via the eigenvalues) to estimate the percent variance explained by each covariate. Each covariate's variance explained is given by the sum of the percents of its assigned PCs, weighted by the between-cluster sum-of-squares divided by the total sum-of-squares. Overlaps in the Euler diagram represent overlaps in the sets of assigned PCs. Areas are proportional to percentages.

Occasionally, the underlying plotting function, venneuler, has trouble effectively creating the Euler diagram due to complex overlap structures. For this reason, two features have been implemented. First, the method will jitter the underlying values to ensure that no two covariates overlap perfectly. Secondly, the parameter ‘incvals’ controls whether values are added in ascending or descending order. By flipping ‘incvals,’ more attractive outputs are sometimes attainable.

Value

None

See Also

estVC for example usage, plotPCs for plotting individual covariates and their assigned subspaces, and venneuler in the venneuler package.


dmoskowitz/mavric documentation built on May 29, 2019, 3:04 a.m.