Function to plot simple 2D graphics for univariate effects/functions, typically used for objects
of class "linear.bayesx" and "sm.bayesx" returned from function bayesx
and read.bayesx.output.
a matrix or data frame, containing the covariate for which the effect should be plotted
in the first column and at least a second column containing the effect, typically the structure
for univariate functions returned within bayesx and
read.bayesx.output model term objects is used, also see
fitted.bayesx. Another possibility is to specify the plot via a formula,
e.g. y ~ x, also see the example. x may also be a character file path to the
data to be used for plotting.
residuals
if set to TRUE, partial residuals may also be plotted if available.
rug
add a rug to the plot.
jitter
if set to TRUE a jittered
rug plot is added.
col.residuals
the color of the partial residuals.
col.lines
the color of the lines.
col.polygons
specify the background color of polygons, if x has at least 3 columns,
i.e. column 2 and 3 can form one polygon.
col.rug
specify the color of the rug representation.
c.select
integer vector of maximum length of columns of x, selects the
columns of the resulting data matrix that should be used for plotting. E.g. if x has 5
columns, then c.select = c(1, 2, 5) will select column 1, 2 and 5 for plotting. Note that
first element of c.select should always be the column that holds the variable for the
x-axis.
fill.select
integer vector, select pairwise the columns of the resulting data matrix
that should form one polygon with a certain background color specified in argument col.
E.g. x has three columns, or is specified with formula f1 + f2 ~ x, then setting
fill.select = c(0, 1, 1) will draw a polygon with f1 and f2 as boundaries.
If x has five columns or the formula is e.g. f1 + f2 + f3 + f4 ~ x, then setting
fill.select = c(0, 1, 1, 2, 2), the pairs f1, f2 and f3, f4
are selected to form two polygons.
data
if x is a formula, a data.frame or list. By default the variables
are taken from environment(x): typically the environment from which plot2d is
called. Note that data may also be a character file path to the data.
sep
the field separator character when x or data is a character, see function
read.table.
month, year, step
provide specific annotation for plotting estimation results for temporal
variables. month and year define the minimum time point whereas step specifies the
type of temporal data with step = 4, step = 2 and step = 1 corresponding to
quartely, half yearly and yearly data.
shift
numeric. Constant to be added to the smooth before plotting.
trans
function to be applied to the smooth before plotting, e.g., to transform the
plot to the response scale.
...
other graphical parameters, please see the details.
Details
For 2D plots the following graphical parameters may be specified additionally:
cex: specify the size of partial residuals,
lty: the line type for each column that is plotted, e.g. lty = c(1, 2),
lwd: the line width for each column that is plotted, e.g. lwd = c(1, 2),
poly.lty: the line type to be used for the polygons,
poly.lwd: the line width to be used for the polygons,
densityangle, border: see polygon,
...: other graphical parameters, see function plot.
Author(s)
Nikolaus Umlauf, Thomas Kneib, Stefan Lang, Achim Zeileis.