Learn R Programming

asremlPlus (version 2.0-2)

alldiffs: 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
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 div
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
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. I
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 va
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

Value

  • An object of S3-class alldiffs with attributes response, response.title, term, classify and tdf.

See Also

asremlPlus-package, print.alldiffs, predictparallel.asreml,predictionplot.asreml, predictiondiffs.asreml, pred.present.asreml

Examples

Run this code
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")

Run the code above in your browser using DataLab