predictiondiffs.asreml {asreml3Plus}R Documentation

Uses information in a supplied alldiffs object to forms all pairwise differences between a set of predictions, the p-values for a test of whether the differences are significantly different from zero, and the minimum, mean and maximum LSD values, provided they are not present in the suppplied alldiffs object.

Description

Uses predictions and standard errors of pairwise differences from an alldiffs object to form, for those components not already present, (i) a table of all pairwise differences of the predictions in an alldiffs object, (ii) the p-values of each pairwise difference, and (iii) the minimum, mean and maximum LSD values. Predictions that are aliased (or nonestimable) are removed from the predictions component of the alldiffs object and standarard errors of differences involving them are removed from the sed component.

Each p-value is computed as the probability of a t-statistic as large as or larger than the absolute value of the observed difference divided by its standard error. The p-values are stored in the p.differences component. The degrees of freedom of the t-distribution is the degrees of freedom stored in the tdf attribute of the alldiffs object. This t-distibrution is also used in calculating the LSD statistics stored in the alldiffs object.

Usage

predictiondiffs.asreml(classify, alldiffs.obj, 
                       x.num = NULL, x.fac = NULL,  
                       levels.length = NA, 
                       pairwise = TRUE, alpha = 0.05,
                       inestimable.rm = TRUE)

Arguments

classify

a character string giving the variables that define the margins of the multiway table to be predicted. Multiway tables are specified by forming an interaction type term from the classifying variables, that is, separating the variable names with the : operator.

alldiffs.obj

An alldiffs object for a fitted model. Note that the attribute tdf, being the degrees of freedom for the critical t-value to be used incomputing p-values, should be set to an appropriate value.

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.

levels.length

The maximum number of characters from the the levels of factors to use in the row and column labels of the tables of pairwise differences and their p-values and standard errors.

pairwise

A logical indicating whether all pairwise differences of the predictions and their standard errors and p-values are to be computed and stored. If FALSE, the components differences and p.differences will be NULL in the returned alldiffs object.

alpha

The significance level for an LSD to compare a pair of predictions.

inestimable.rm

A logical indicating whether rows for predictions that are not estimable are to be removed from the components of the alldiffs object.

Value

An alldiffs object that is a list with components predictions containing the predictions and their standard errors, differences containing all pairwise differences between the predictions, p.differences containing p-values for all pairwise differences between the predictions, sed containing the standard errors of all pairwise differences between the predictions, and,an LSD containing the mean, minimum and maximum LSDs.

See Also

asreml3Plus-package, alldiffs, print.alldiffs, predictionplot.asreml,
predictparallel.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]