plot.complmrob: Diagnostic plots for the robust regression model with...

Description Usage Arguments Details Examples

View source: R/plot-methods.R

Description

Plot the response or the model diagnostic plots for robust linear regression model with compositional data

Usage

1
2
3
4
5
6
7
## S3 method for class 'complmrob'
plot(x, y = NULL, type = c("response", "model"),
  se = TRUE, conf.level = 0.95, scale = c("ilr", "percent"),
  theme = theme_bw(), pointStyle = list(color = "black", size = rel(1),
  alpha = 1, shape = 19), lineStyle = list(color = "grey20", width =
  rel(1), linetype = "solid"), seBandStyle = list(color = "gray80", alpha
  = 0.5), stack = c("horizontal", "vertical"), ...)

Arguments

x

the object returned by complmrob.

y

ignored.

type

one of "response" to plot the response or "model" to get the standard lmrob model diagnostic plots. Partial matching is performed, so any unique abbreviation of the two possible values is excepted (e.g., "r" for the response plot).

se

should the confidence interval be shown in the response plot.

conf.level

if the confidence interval is shown in the response plot, this parameter sets the level of the confidence interval.

scale

should the x-axis in the response plot be in percentage or in the ILR-transformed scale?

theme

the ggplot2 theme to use for the response plot.

pointStyle

a list with style parameters for the points in the response plot (possible entries are color, size, alpha, and shape). If color and/or shape is a vector of length equal to the number of observations in the model, the points will be colored/shaped according to this vector.

lineStyle

list with style parameters for the smoothing lines in the response plot (possible entries are color, width, and linetype)

seBandStyle

a list with style parameters (color and alpha) for the confidence band (if se is TRUE)

stack

how the facets are laid out in the response plot. "horizontal" for side by side and "vertical" for on top of each other.

...

further arguments to the model diagnostic plot method (see plot.lmrob for details).

Details

The response plot shows the value on the first component of the orthonormal basis versus the response and the fitted values. For the fitted values, the other components are set to the median of the values in that direction. This usually causes aberrant predictions when plotting on the *percent* scale.

For the model diagnostic plots see the details in the help file for plot.lmrob. The model diagnostic plots are the same for all sub-models fit to the data transformed with the different orthonormal basis.

Examples

1
2
3
4
data <- data.frame(lifeExp = state.x77[, "Life Exp"], USArrests[ , -3])
mUSArr <- complmrob(lifeExp ~ ., data = data)
plot(mUSArr)
plot(mUSArr, type = "model") # for the model diagnostic plots

complmrob documentation built on Sept. 18, 2019, 1:02 a.m.