plot.cvCovEst {cvCovEst}R Documentation

Generic Plot Method for cvCovEst


The plot method is a generic method for plotting objects of class, "cvCovEst". The method is designed as a tool for diagnostic and exploratory analysis purposes when selecting a covariance matrix estimator using cvCovEst.


## S3 method for class 'cvCovEst'
  estimator = NULL,
  plot_type = c("summary"),
  stat = c("min"),
  k = NULL,
  leading = TRUE,
  abs_v = TRUE,
  switch_vars = FALSE,
  min_max = FALSE,



An object of class, "cvCovEst". Specifically, this is the standard output of the function cvCovEst.


The numeric data.frame, matrix, or similar object originally passed to cvCovEst.


A character vector specifying one or more classes of estimators to compare. If NULL, the class of estimator associated with optimal cvCovEst selection is used.


A character vector specifying one of four choices of diagnostic plots. Default is "summary". See Details for more about each plotting choice.


A character vector of one or more summary statistics to use when comparing estimators. Default is "min" for minimum cross-validated risk. See Details for more options.


A integer indicating the number of leading/trailing eigenvalues to plot. If NULL, will default to the number of columns in dat_orig.


A logical indicating if the leading eigenvalues should be used. Default is TRUE. If FALSE, the trailing eigenvalues are used instead.


A logical determining if the absolute value of the matrix entries should be used for plotting the matrix heat map. Default is TRUE.


A logical. If TRUE, the hyperparameters used for the x-axis and factor variables are switched in the plot of the cross-validated risk. Only applies to estimators with more than one hyperparameter. Default is FALSE.


A logical. If TRUE, only the minimum and maximum values of the factor hyperparameter will be used. Only applies to estimators with more than one hyperparameter. Default is FALSE.


Additional arguments passed to the plot method. These are not explicitly used and should be ignored by the user.


This plot method is designed to aide users in understanding the estimation procedure carried out in cvCovEst(). There are currently four different values for plot_type that can be called:

The stat argument accepts five values. They each correspond to a summary statistic of the cross-validated risk distribution within a class of estimator. Possible values are:


A plot object


cv_dat <- cvCovEst(
  dat = mtcars,
  estimators = c(
    thresholdingEst, sampleCovEst
  estimator_params = list(
    thresholdingEst = list(gamma = seq(0.1, 0.9, 0.1))

plot(x = cv_dat, dat_orig = mtcars)

[Package cvCovEst version 1.2.2 Index]