predictions
: A predictions.frame
, being a data.frame
beginning with the variables classifying the predictions, in the same order
as in the classify
, and also containing columns named
predicted.value
, standard.error
and est.status
;
each row contains a single predicted value. The number of rows should equal the
number of unique combinations of the classify
variables and will be in
standard order for the classify
variables. That is, the values of the
last variable change with every row, those of the second-last variable only
change after all the values of the last variable have been traversed;
in general, the values of a variable are the same for all the
combinations of the values to the variables to its right in the classify
.
The data.frame
may also include columns for the lower and upper
values of error intervals, either standard error, confidence or half-LSD
intervals. 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
.
Note that the names standard.error
and
est.status
have been changed to std.error
and status
in the pvals
component produced by asreml-R4
; if the new names
are in the data.frame
supplied to predictions
, they will be
returned to the previous names.
differencesA matrix
containing all pairwise differences between
the predictions; it should have the same number of rows and columns as there are
rows in predictions
.
p.differences
: A matrix
containing p-values for all pairwise differences
between the predictions; each p-value is computed as the probability of a t-statistic
as large as or larger than the observed difference divided by its standard error.
The degrees of freedom of the t distribution for computing it are computed as
the denominator degrees of freedom of the F value for the fixed term, if available;
otherwise, the degrees of freedom stored in the attribute tdf
are used;
the matrix should be of the same size as that for differences
.
sed
: A matrix
containing the standard errors of all pairwise differences
between the predictions; they are used in computing the p-values in p.differences
.
vcov
: A matrix
containing the variance matrix of the predictions; it is
used in computing the variance of linear transformations of the predictions.
LSD
: A data.frame
containing the mean, minimum and maximum LSD for determining
the significance of pairwise differences, the mean LSD being calculated using
the square root of the mean of the variances of pairwise differences.
If factor.combination
was specified for meanLSD.type
when the
LSDs were being calculated, then LSD
contains an LSD for each
factor.combination
of the factors
specified by LSDby
.
Each LSD is calculated from the square root of the mean of the variances for all
pairwise differences for each factor combination, unless there is only one prediction
for a factor.combination
, when notional LSDs are calculated that are based
on the standard error of the prediction multiplied by the square root of two.
If LSD
is not NULL
then the overall mean LSD will be added as
an attribute named meanLSD
of the alldiffs.object
, as will
the values of meanLSD.type
and LSDby
. The LSD for a single prediction
assumes that any predictions to be compared are independent; this is not the case if
residual errors are correlated.
backtransforms
: When the response values have been transformed for analysis,
a data.frame
containing the backtransformed values of the
predicted values is added to the alldiffs.object
. This data.frame
is consistent with the predictions
component, except
that the column named predicted.value
is replaced by one called
backtransformed.predictions
. Any error.interval
values will also
be the backtransformed values. Each row contains a single predicted value.
response
: A character
specifying the response variable for the
predictions.
response.title
: A character
specifying the title for the response variable
for the predictions.
term
: A character string giving the variables that define the term
that was fitted using asreml
and that corresponds
to classify
. It is often the same as classify
.
classify
: A character string giving the variables that define the margins
of the multiway table used in the prediction. Multiway tables are
specified by forming an interaction type term from the
classifying variables, that is, separating the variable names
with the :
operator.
tdf
: An integer
specifying the degrees of freedom of the standard error. It is used as
the degrees of freedom for the t-distribution on which p-values and confidence
intervals are based.
meanLSD
: If the LSD
component is not NULL
then the mean LSD is added as an
attribute, calculated using the square root of the mean of the variances of pairwise differences.
meanLSD.type
: If the LSD
component is not NULL
then meanLSD.type
is
added as an attribute.
LSDby
: If the LSD
component is not NULL
then LSDby
is added as an attribute.
sortFactor
: A character
containing the name of the
factor
that indexes the set of predicted values that
determined the sorting of the components.
sortOrder
: A character
vector that is the same length as the number of levels for
sortFactor
in the predictions
component of the
alldiffs.object
. It specifies the order of the
levels in the reordered components of the alldiffs.object
.
The following creates a sortOrder
vector levs
for factor
f
based on the values in x
:
levs <- levels(f)[order(x)]
.