R: Deprecated functions in package 'robustHD'

robustHD-deprecated {robustHD} | R Documentation

## Deprecated functions in package robustHD

### Description

These functions are provided for compatibility with older versions only, and may be defunct as soon as the next release.

### Usage

    ## S3 method for class 'seqModel'
    fortify(model, data, s = NA, covArgs = list(...), ...)

    ## S3 method for class 'sparseLTS'
    fortify(
      model,
      data,
      s = NA,
      fit = c("reweighted", "raw", "both"),
      covArgs = list(...),
      ...
    )

    ## Default S3 method:
    diagnosticPlot(
      object,
      which = c("all", "rqq", "rindex", "rfit", "rdiag"),
      ask = (which == "all"),
      facets = attr(object, "facets"),
      size = c(2, 4),
      id.n = NULL,
      ...
    )

### Arguments

`model` | the model fit to be converted.
`data` | currently ignored.
`s` | for the `"seqModel"` method, an integer vector giving the steps of the submodels to be converted (the default is to use the optimal submodel). For the `"sparseLTS"` method, an integer vector giving the indices of the models to be converted (the default is to use the optimal model for each of the requested fits).
`covArgs` | a list of arguments to be passed to `covMcd` for computing robust Mahalanobis distances.
`...` | for the `fortify` methods, additional arguments to be passed to `covMcd` can be specified directly instead of via `covArgs`. For the default method of `diagnosticPlot`, additional arguments to be passed down to `geom_point`.
`fit` | a character string specifying which fit to convert. Possible values are `"reweighted"` (the default) to convert the reweighted fit, `"raw"` to convert the raw fit, or `"both"` to convert both fits.
`object` | a data frame containing all necessary information for plotting (as generated by the `fortify` methods).
`which` | a character string indicating which plot to show. Possible values are `"all"` (the default) for all of the following, `"rqq"` for a normal Q-Q plot of the standardized residuals, `"rindex"` for a plot of the standardized residuals versus their index, `"rfit"` for a plot of the standardized residuals versus the fitted values, or `"rdiag"` for a regression diagnostic plot (standardized residuals versus robust Mahalanobis distances of the predictor variables).
`ask` | a logical indicating whether the user should be asked before each plot (see `devAskNewPage`). The default is to ask if all plots are requested and not ask otherwise.
`facets` | a faceting formula to override the default behavior. If supplied, `facet_wrap` or `facet_grid` is called depending on whether the formula is one-sided or two-sided.
`size` | a numeric vector of length two giving the point and label size, respectively.
`id.n` | an integer giving the number of the most extreme observations to be identified by a label. The default is to use the number of identified outliers, which can be different for the different plots.

### Details

The `fortify` methods supplement the fitted values and residuals of a sequence of regression models (such as robust least angle regression models or sparse least trimmed squares regression models) with other useful information for diagnostic plots.

The default method of `diagnosticPlot` creates the corresponding plot from the data frame returned by `fortify`.

### Value

The `fortify` methods return data frame containing the columns listed below, as well as additional information stored in the attributes `"qqLine"` (intercepts and slopes of the respective reference lines to be displayed in residual Q-Q plots), `"q"` (quantiles of the Mahalanobis distribution used as cutoff points for detecting leverage points), and `"facets"` (default faceting formula for the diagnostic plots).

`step`

  the steps (for the `"seqModel"` method) or indices (for the `"sparseLTS"` method) of the models (only returned if more than one model is requested).

`fit`

  the model fits (only returned if both the reweighted and raw fit are requested in the `"sparseLTS"` method).

`index`

  the indices of the observations.

`fitted`

  the fitted values.

`residual`

  the standardized residuals.

`theoretical`

  the corresponding theoretical quantiles from the standard normal distribution.

`qqd`

  the absolute distances from a reference line through the first and third sample and theoretical quartiles.

`rd`

  the robust Mahalanobis distances computed via the MCD (see `covMcd`).

`xyd`

  the pairwise maxima of the absolute values of the standardized residuals and the robust Mahalanobis distances, divided by the respective other outlier detection cutoff point.

`weight`

  the weights indicating regression outliers.

`leverage`

  logicals indicating leverage points (i.e., outliers in the predictor space).

`classification`

  a factor with levels `"outlier"` (regression outliers) and `"good"` (data points following the model).

### Author(s)

Andreas Alfons

[Package robustHD version 0.7.2 Index]