alldiffs {asreml3Plus} | R Documentation |
Forms an object of S3-class alldiffs
that stores the predictions for a model
fitted using asreml, along with supplied statistics for all pairwise differences.
Description
Creates an object of S3-class alldiffs
that consists of a list
containing the following components: predictions
, differences
,
p.differences
, sed
, LSD
and backtransforms
.
Predictions must be supplied to the functions while the others will be set
only if they are supplies; those not supplied are set to NULL
.
It also has attributes response
,
response.title
, term
, classify
and tdf
,
which will be set to the values supplied or NULL
if none are supplied.
Usage
alldiffs(predictions, differences = NULL, p.differences = NULL,
sed = NULL, LSD = NULL, backtransforms = NULL,
response = NULL, response.title = NULL,
term = NULL, classify = NULL, tdf = NULL)
Arguments
predictions |
a data.frame containing the predicted values 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 . That is, in addition to
variables classifying the predictions, it will include columns named
predicted.value , standard.error and est.status ;
each row contains a single predicted value. It may also contain
columns for the lower and upper confidence limits for the predictions.
If LSD is not NULL , the mean LSD will be added as an attribute
named meanLSD .
|
differences |
a 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.
|
LSD |
a data.frame containing the mean, minimum and maximum LSD for determining
the significance of pairwise differences.
|
backtransforms |
a data.frame containing the backtransformed values of the predicted values
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 . That is, in addition to
variables classifying the predictions, it will include columns named
backtransformed.predictions and est.status ; it may also contain
columns for the lower and upper confidence limits;
each row contains a single predicted value.
|
response |
a character specifying the response variable for the
predictions. It is stored as an attribute to the alldiffs
object.
|
response.title |
a character specifying the title for the response variable
for the predictions. It is stored as an attribute to the alldiffs
object.
|
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 .
It is stored as an attribute to the alldiffs object.
|
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. It is stored as an attribute to the
alldiffs object.
|
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.
It is stored as an attribute to the alldiffs object.
|
Value
An object of S3-class alldiffs
with attributes response
,
response.title
, term
, classify
and tdf
.
See Also
asreml3Plus-package
, print.alldiffs
,
predictparallel.asreml
,predictionplot.asreml
,
predictiondiffs.asreml
, pred.present.asreml
Examples
## Not run:
Var.pred <- predict(current.asr, classify="Variety", sed=TRUE)$predictions
wald.tab <- current.asrt$wald.tab
den.df <- wald.tab[match("Variety", rownames(wald.tab)), "denDF"]
Var.diffs <- alldiffs(predictions = Var.pred$pvals,
sed = Var.pred$sed,
tdf = den.df)
Var.diffs <- predictiondiffs.asreml(classify = "Variety",
alldiffs.obj=Var.diffs)
print.alldiffs(Var.diffs, which="differences")
## End(Not run)
[Package
asreml3Plus version 2.0-14
Index]