Usage
predictionplot.asreml(classify, y, data, x.num = NULL, x.fac = NULL, nonx.fac.order = NULL, colour.scheme = "colour", panels = "multiple", graphics.device = NULL, error.intervals = "Confidence", titles = NULL, y.title = NULL, filestem = NULL, ...)
Arguments
classify
a character string giving the combinations of the independent
variables on which the predictions are based. It is
an interaction type term formed from the independent variables,
that is, separating the variable names with the : operator.
y
a character string giving the name of the variable that is to be plotted
on the Y axis.
data
a data.frame containing the values of the variables to be plotted. It
should be consistent with an object of class asremlPredict such as
is stored in the pvals component of the predictions component
of the value produced by predict.asreml; that is, in addition to
variables classifying the predictions, it will include a column
with the name specified in the y argument, usually
predicted.value or backtransformed.predictions;
each row contains a single predicted value. If error.intervals
is not "none", then the predictions component and,
if present, the backtransforms component should contain
columns for the lower and upper values of the limits for the interval
with names that begin with lower and upper,
respectively. The second part of the name must be one of
Confidence, StandardError or
halfLeastSignificant. The last part needs to be consistent
between the lower and upper limits.
x.num
A character string giving the name of the numeric covariate that
corresponds to x.fac, is potentially included in terms in the
fitted model and which corresponds to the x-axis variable. It should
have the same number of unique values as the number of levels in
x.fac.
x.fac
A character string giving the name of the factor that corresponds to
x.num, is potentially included in terms in the fitted model and
which corresponds to the x-axis variable. It should have the same
number of levels as the number of unique values in x.num.
The levels of x.fac must be in the order in which they are to
be plotted - if they are dates, then they should be in the form
yyyymmdd which can be achieved using as.Date.
nonx.fac.order
A character vector giving the order in which factors other
than x.fac are to be plotted in facetted plots (i.e. where the
number of non x factors is greater than 1). The first factor in the vector
will be plotted on the X axis (if there is no x.num or
x.fac. Otherwise, the order of plotting the factors is in
columns (X facets) and then rows (Y facets). By default the order is
in decreasing order for the numbers of levels of the non x factors.
colour.scheme
A character string specifying the colour scheme for the plots.
The default is "colour" which produces coloured lines and bars,
a grey background and white gridlines. A value of "black"
results in black lines, grey bars and gridlines and a white background.
panels
Possible values are "single" and "multiple".
When line plots are to be produced, because variables involving
x.num or x.fac are involved in classify for
the predictions, panels determines whether or not a single
panel or multiple panels in a single window are produced. The
panels argument is ignored for bar charts.
graphics.device
A character specifying a graphics device for plotting.
The default is graphics.device = NULL, which will result
in plots being produced on the current graphics device. Setting it to
"windows", for example, will result in a windows graphics
device being opened.
error.intervals
A character string indicating the type of error interval, if any,
to calculate and plot in order to indicate uncertainty in the results.
Possible values are "none", "StandardError", "Confidence"
and "halfLeastSignificant". Here, any option other than "none"
will result in the interval limits contained in data being plotted.
titles
A list, each component of which is named for an object name and
contains a character string giving a title to use in output
(e.g. tables and graphs) for the object. Here they will be used for
axis labels.
filestem
A character sting giving the beginning of the name of the file in which to
save the plot. If filestem = NULL, the plot is not saved. The remainder
of the file name will be generated automatically and consists of the
following elements separated by full stops: the classify term,
Bar or Line and, if error.intervals
is not "none", one of SE, CI or LSI. The
file will be saved as a `png' file in the current work directory.
y.title
The title to be displayed on the y axis of any plot.
...
further arguments passed to ggplot.