predictPresent.asreml | R Documentation |
This function forms the predictions for each term in terms
using a supplied asreml
object and
predictPlus.asreml
.
Tables are produced using predictPlus.asreml
,
in conjunction with
allDifferences.data.frame
,
with the argument tables
specifying which tables are printed.
The argument plots
, along with transform.power
,
controls which plots are produced. The plots are
produced using plotPredictions.data.frame
, with
line plots produced when variables involving x.num
or x.fac
are involved in classify
for the predictions and bar charts
otherwise.
In order to get the correct predictions you may
need to supply additional arguments to predict.asreml
through ...
e.g. present
, parallel
, levels
.
The order of plotting the levels of
one of the factors indexing the predictions can be modified and is achieved
using sort.alldiffs
.
## S3 method for class 'asreml'
predictPresent(asreml.obj, terms, inestimable.rm = TRUE,
linear.transformation = NULL, EGLS.linTransform,
error.intervals = "Confidence", alpha = 0.05,
wald.tab = NULL, dDF.na = "residual", dDF.values = NULL,
pairwise = TRUE, Vmatrix = FALSE,
avsed.tolerance = 0.25, accuracy.threshold = NA,
LSDtype = "overall", LSDsupplied = NULL, LSDby = NULL,
LSDstatistic = "mean", LSDaccuracy = "maxAbsDeviation",
x.num = NULL, x.fac = NULL, nonx.fac.order = NULL,
x.pred.values = NULL, x.plot.values = NULL,
plots = "predictions", panels = "multiple",
graphics.device = NULL, interval.annotate = TRUE,
titles = NULL, colour.scheme = "colour", save.plots = FALSE,
transform.power = 1, offset = 0, scale = 1,
transform.function = "identity",
tables = "all", level.length = NA,
sortFactor = NULL, sortParallelToCombo = NULL,
sortNestingFactor = NULL, sortOrder = NULL,
decreasing = FALSE,
trace = FALSE, ggplotFuncs = NULL, ...)
asreml.obj |
|
terms |
A |
inestimable.rm |
A |
linear.transformation |
A If a In either case, as well as the values of the linear combinations,
their standard errors, pairwise differences and associated statistics
are returned in the |
EGLS.linTransform |
A |
error.intervals |
A |
alpha |
A |
wald.tab |
A |
dDF.na |
The method to use to obtain approximate denominator degrees of freedom.
when the numeric or algebraic methods produce an |
dDF.values |
A |
pairwise |
A logical indicating whether all pairwise differences of the
|
Vmatrix |
A |
avsed.tolerance |
A
|
accuracy.threshold |
A |
LSDtype |
A See |
LSDsupplied |
A |
LSDby |
A |
LSDstatistic |
A |
LSDaccuracy |
A |
x.num |
A |
x.fac |
A |
nonx.fac.order |
A |
x.pred.values |
The values of |
x.plot.values |
The actual values to be plotted on the x axis or in the labels of
tables. They are
needed when values different to those in |
plots |
Possible values are |
panels |
Possible values are |
graphics.device |
A |
interval.annotate |
A |
titles |
A |
colour.scheme |
A character string specifying the colour scheme for the plots.
The default is |
save.plots |
A |
transform.power |
A |
offset |
A number that has been added to each value of the response after any scaling
and before applying any power transformation. Unless it is equal to 0, the
default, back-transforms of the predictions will be obtained and stored in
the |
scale |
A number by which each value of the response has been multiply before adding
any offset and applying any power transformation. Unless it is equal to 1, the
default, back-transforms of the predictions will be obtained and stored in
the |
transform.function |
A |
tables |
A |
level.length |
The maximum number of characters from the levels of
factors to use in the row and column labels of the tables produced by
|
sortFactor |
A |
sortParallelToCombo |
A |
sortNestingFactor |
A |
sortOrder |
A The following creates a |
decreasing |
A |
trace |
If TRUE then partial iteration details are displayed when ASReml-R functions are invoked; if FALSE then no output is displayed. |
ggplotFuncs |
A |
... |
further arguments passed to |
A list
containing an alldiffs.object
for each term
for
which tables are produced. The names of the components of this list are
the terms
with full-stops (.
) replacing colons (:
).
Plots are also preduced depending on the setting of the plot
argument.
Chris Brien
predictPlus.asreml
, allDifferences.data.frame
,
sort.alldiffs
, subset.alldiffs
,
redoErrorIntervals.alldiffs
, recalcLSD.alldiffs
,
pickLSDstatistics.alldiffs
,
plotPredictions.data.frame
,
print.alldiffs
, as.Date
, Devices
## Not run:
data(WaterRunoff.dat)
titles <- list("Days since first observation", "Days since first observation",
"pH", "Turbidity (NTU)")
names(titles) <- names(WaterRunoff.dat)[c(5,7,11:12)]
asreml.options(keep.order = TRUE) #required for asreml-R4 only
current.asr <- asreml(fixed = log.Turbidity ~ Benches + Sources + Type + Species +
Sources:Type + Sources:Species + Sources:Species:xDay +
Sources:Species:Date,
data = WaterRunoff.dat, keep.order = TRUE)
current.asrt <- as.asrtests(current.asr, NULL, NULL)
#### Get the observed combinations of the factors and variables in classify
class.facs <- c("Sources","Species","Date","xDay")
levs <- as.data.frame(table(WaterRunoff.dat[class.facs]))
levs <- levs[do.call(order, levs), ]
levs <- as.list(levs[levs$Freq != 0, class.facs])
levs$xDay <- as.numfac(levs$xDay)
#### parallel and levels are arguments from predict.asreml
diff.list <- predictPresent.asreml(asreml.obj = current.asrt$asreml.obj,
terms = "Date:Sources:Species:xDay",
x.num = "xDay", x.fac = "Date",
parallel = TRUE, levels = levs,
wald.tab = current.asrt$wald.tab,
plots = "predictions",
error.intervals = "StandardError",
titles = titles,
transform.power = 0,
present = c("Type","Species","Sources"),
tables = "none",
level.length = 6)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.