Output objects from package relaimpo have classes relimplm (output from calc.relimp), relimplmboot
(output from boot.relimp), relimplmbooteval (output from booteval.relimp) or relimplmbootMI.
For classes relimplm, relimplmbooteval and relimplmbootMI, there are methods for plotting and printing,
usage of which is described below. For class relimplmbootMI, there is in addition a summary-method,
which produces a less detailed output than the show / print - method.
For classes relimplm, relimplmbooteval and relimplmbootMI,
there is in addition a method for extracting slots of the class with $.
Usage
## S3 method for class 'relimplm'
print(x,...,show.coeffs = ifelse(any(c("lmg", "pmvd") %in% x@type)
& is.null(x@always), TRUE, FALSE))
## S3 method for class 'relimplm'
plot(x,...,names.abbrev=4, ylim=NULL, main=NULL, cex.title=1.5)
## S3 method for class 'relimplmbooteval'
print(x,...)
## S3 method for class 'relimplmbootMI'
print(x,...)
## S3 method for class 'relimplmbooteval'
plot(x, ..., lev=max(x@level), names.abbrev=4, ylim=NULL,
main=NULL, cex.title=1.5)
## S3 method for class 'relimplmbootMI'
plot(x, ..., lev=max(x@level), names.abbrev=4, ylim=NULL,
main=NULL, cex.title=1.5)
## S3 method for class 'relimplmbootMI'
summary(object, ..., lev = max(object@level))
Arguments
x
x is an output object from package relaimpo of the required class
show.coeffs
show.coeffs, if set to FALSE, suppresses printing of averaged coefficients,
which are otherwise printed, if lmg and/or pmvd are among the metrics in x and
always is NULL.
See details for a discussion of the averaged coefficients, if always is not NULL.
object
object is an object of class relimplmbootMI
(output from function mianalyze.relimp)
...
further arguments to functions
names.abbrev
names.abbrev is an integer that provides the number of characters to which the bar labels
are shortened (default: 4).
ylim
The plot routines try to use appropriate scaling. If adjustments are needed, ylim can be used
like usually on plot.
main
The plot routine uses a default title based on the reponses name.
If adjustments are desired, main can be used for specifying a different title.
Note that only the first title is affected
(in case of plot.relimpbooteval, there is also a sub title that cannot be changed).
cex.title
cex.title specifies the text size for the overall title.
Thus, the par option cex.main can be used for specifying the size of individual plot titles.
lev
lev is a numeric that provides the confidence level to be plotted
or displayed respectivly (default: maximum available confidence level; 0.5<lev<1 ).
Details
This documentation part describes S3 methods. In addition there are S4 methods for show which
coincide with the S3 methods for print and an S4 method for coercing objects of relimplm to lists
(of their numeric elements).
Print (and show) methods produce annotated output for calc.relimp, booteval.relimp, and
mianalyze.relimp (or the objects produced by these functions). Since version 2.1, calc.relimp
provides averaged coefficients for different sub model sizes (slot ave.coeffs of class relimplm),
if metrics based on averaging over orderings (lmg and/or pmvd) are calculated.
These are per default printed if the slot always of x is NULL.
If some variables were forced into all models (non-NULL always), the averaged coefficients
refer to the adjusted model after taking residuls from regressions on the always-columns
of the X-matrix for both response and the other columns of the X-matrix. The reason is that these could be
easily and cheaply implemented into the existing code and do correspond to sub models relevant
for lmg and pmvd. Users who are interested in these coefficients, can set option show.coeffs=TRUE
in spite of non-NULL always.
The plot methods produce barplots of relative contributions,
either of the metrics alone for output objects of class relimplm from function calc.relimp,
or of the metrics with lines indicating confidence intervals for output objects of class relimplmbooteval
from function booteval.relimp or relimplmbootMI from function booteval.relimp.
Most par() options can be set and should work on plot.
Exceptions: mfrow, oma and mar are set by the plot function,
depending on the number of metrics to plot and the amount of annotating text required.
The summary-method for class relimplmbootMI allows to quickly display brief output and to change
the confidence level versus the level used in the original run (with interval bounds stored in the
“metric”.lower and “metric”.upper slots and displayed by print and show methods).
Because of a defined S3-extraction method,
slots of classes relimplm, relimplmbooteval and relimplmbootMI can be extracted not only
with the @ extractor but also with $.
Hence, output elements from functions calc.relimp, booteval.relimp, and mianalyze.relimp
can be extracted as though the output objects were lists.
Note that there also is an an internally-used class relimplmtest that permits the internal function
calc.relimp.default.intern to output further detail needed for usage from within other funtions.