plot.spar {spareg}R Documentation

plot.spar

Description

Plot values of validation measure or number of active variables over different thresholds or number of models for 'spar' object, or residuals vs fitted

Usage

## S3 method for class 'spar'
plot(
  x,
  plot_type = c("Val_Measure", "Val_numAct", "res-vs-fitted", "coefs"),
  plot_along = c("nu", "nummod"),
  nummod = NULL,
  nu = NULL,
  xfit = NULL,
  yfit = NULL,
  prange = NULL,
  coef_order = NULL,
  digits = 2L,
  ...
)

Arguments

x

result of spar function of class 'spar'.

plot_type

one of c("Val_Measure", "Val_numAct", "res-vs-fitted", "coefs").

plot_along

one of c("nu","nummod"); ignored when plot_type = "res-vs-fitted".

nummod

fixed value for number of models when plot_along = "nu" for plot_type = "Val_Measure" or "Val_numAct"; same as for predict.spar when plot_type="res-vs-fitted".

nu

fixed value for \nu when plot_along="nummod" for plot_type = "Val_Measure" or "Val_numAct"; same as for predict.spar when plot_type="res-vs-fitted".

xfit

data used for predictions in "res-vs-fitted".

yfit

data used for predictions in "res-vs-fitted".

prange

optional vector of length 2 for "coefs"-plot to give the limits of the predictors' plot range; defaults to c(1, p).

coef_order

optional index vector of length p for plot_type = "coefs" to give the order of the predictors; defaults to 1 : p.

digits

number of significant digits to be displayed in the axis; defaults to 2L.

...

further arguments passed to or from other methods

Value

'ggplot2::ggplot' object


[Package spareg version 1.0.0 Index]