Plot the response or the model diagnostic plots for robust linear regression model with compositional data
# S3 method for 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"),
...
)
the object returned by complmrob
.
ignored.
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).
should the confidence interval be shown in the response plot.
if the confidence interval is shown in the response plot, this parameter sets the level of the confidence interval.
should the x-axis in the response plot be in percentage or in the ILR-transformed scale?
the ggplot2 theme to use for the response plot.
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.
list with style parameters for the smoothing lines in the response plot (possible entries
are color
, width
, and linetype
)
a list with style parameters (color
and alpha
) for the confidence band (if se
is TRUE
)
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).
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.
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
Run the code above in your browser using DataLab