term using classify
and the supplied asreml object and stores them in an alldiffs
object. If x.num is supplied, the
predictions will be obtained for the values supplied in x.pred.values
and, if supplied, x.plot.values will replace them in the
alldiffs object that is returned. If x.fac, but not
x.num, is specified, predictions will involve it and, if supplied,
x.plot.values will replace the levels of x.fac in the
alldiffs object that is returned.
In order to get the correct predictions you may need to supply
additional arguments to predict through ... e.g. present. Any
aliased predictions will be removed, as will any standard error of pairwise
differences involving them.
Also calculated are the approximate degrees of freedom of the standard errors
of the predictions. If the deominator degrees of freedom for term are
available in wald.tab, they are used. Otherwise the residual degrees
of freedom or the maximum of the denominator degrees in wald.tab,
excluding the Intercept, are used. Which is used depends on the setting of
dDF.na. These degrees of freedom are used for the t-distribution on
which p-values and confidence intervals are based. It is stored as an
attribute to the alldiffs object. The degrees of freedom are also
used in valculating the minimum, mean and maximum LSD fro comparing pairs
of predictions, which are also stored in the alldiffs object.
If pairwise = TRUE, all pairwise differences between the predictions,
their standard errors, p-values and LSD statistics are computed using
predictiondiffs.asreml. This adds them to the alldiffs
object as additional list components named differences,
sed, p.differences and LSD.
If a transformation has been applied (any one of transform.power is not one,
scale is not one and offset is nonzero), the back-transforms of
the predicted values and their lower and upper confidence intervals are added
to a data.frame that is consistent with an object of class
asremlPredict, such as is stored in the pvals component of the
prediction component of the value produced by predict.asreml.
This data.frame is added to the alldiffs object as a list
component called backtransforms.
The printing of the components produced is controlled by the tables
argument.predictparallel.asreml(classify, term = NULL, asreml.obj = NULL, titles = NULL,
x.num = NULL, x.fac = NULL,
x.pred.values = NULL, x.plot.values = NULL,
error.intervals = "Confidence", avsed.tolerance = 0.25,
pairwise = TRUE, tables = "all" , levels.length = NA,
transform.power = 1, offset = 0, scale = 1,
inestimable.rm = TRUE, wald.tab = NULL,
alpha = 0.05, dDF.na = "residual", dDF.values = NULL,
trace = FALSE, ...)asreml and that corresponds
to classify. It only needs to be specified when
it is differeasreml object for a fitted model.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
x.fac, (ii)is potentially included in terms in the
fitted model, and (iii) which corresponds to the x-axis variable. It shouldx.num, (ii) is potentially included in terms in the fitted model, and
(iii) which corresponds to the x-axis variable. It should have the x.num for which predicted values are required.x.num are to be
plotted or x.fac is to be plotted because there is no
x.num"none", "StandardError", "Confidencepredictions and their standard errors and p-values are to be
computed and stored. If tables is equal to "differences"
character vector containing a combination of none,
predictions, backtransforms, differences,
p.differences, sed, LSD logical indicating whether rows for predictions that
are not estimable are to be removed from the components of the
alldiffs object.data frame containing the pseudo-anova table for the
fixed terms produced by a call to wald.asreml. The main
use of it here is in determinining the degrees of freedom of thew standard errorNA. Consistent with
when no denDF are available, the default is "residual" avector of values to be used when dDF.na = "supplied".
Its values will be used when denDF in a test for a fixed effect
is NA. This vector must be the same length as the nupredict.asreml.alldiffs object with predictions and their standard errors and,
depending on the settings
of the arguments, all pairwise differences between predictions, their
standard errors and p-values and LSD statistics. If power.transform is
not one, it will
contain a data.frame with the backtransformed predictions. If
error.intervals is not "none", then the predictions
component and, if present, the backtransforms component will contain
columns for the lower and upper values of the limits for the interval.
The names of these columns will consist of three parts separated
by full stops: 1) the first part will be lower or upper;
2) the second part will be one of Confidence, StandardError
or halfLeastSignificant; 3) the third component will be limits.
The name of the response,
the term, the classify and tdf, as well as the degrees of freedom
of the standard error, will be set as attributes to the object.alldiffs, print.alldiffs, predictiondiffs.asreml,
pred.present.asreml, as.Date,
predictionplot.asreml, pred.present.asreml, predict.asremlcurrent.asr <- asreml(fixed = pH ~ Benches + (Sources * (Type + Species)),
random = ~ Benches:MainPlots,
keep.order=TRUE, data= Runoff.longi.dat)
diffs <- predictparallel.asreml(classify = "Sources:Type",
asreml.obj = current.asr,
x.num = "xDay", x.fac = "Date",
x.pred.values=sort(unique(Runoff.longi.dat$xDay)),
x.plot.values=c(0,28,56,84))Run the code above in your browser using DataLab