STAtoTD | R Documentation |
Convert an STA object to a TD object.
To be able to use the output of a single trial analysis in
Genotype-by-Environment (GxE) analysis the output first needs to be converted
back to an TD object. This function does exactly that. It extracts BLUEs,
BLUPs and their standard errors from the STA object and creates a new TD
object using these. Also a column "wt" (weight) may also be added. Weights
are then calculated as 1/(SE BLUEs) ^ 2.
STAtoTD(
STA,
what = c("BLUEs", "seBLUEs", "BLUPs", "seBLUPs"),
traits = NULL,
keep = NULL,
addWt = FALSE
)
STA |
An object of class |
what |
A character string containing the statistics to be included as
traits in the TD object. Multiple statistics can be included in which case
they will appear as |
traits |
A character string containing the traits to be included in the
TD object. If |
keep |
Columns from the TD object used as input for the STA model to
be copied to the output. see |
addWt |
Should a column wt be added to the output? If |
Trial information for the trials in the STA object will be copied from the original TD object on which the modeling was done.
Other functions for STA objects:
STAtoCross()
,
plot.STA()
,
report.STA()
,
summary.STA()
## Fit model using SpATS.
modSp <- fitTD(TD = TDHeat05,
design = "res.rowcol",
traits = "yield",
what = "fixed")
## Create TD object from the fitted model with BLUEs and standard errors.
TDRes <- STAtoTD(modSp,
what = c("BLUEs", "seBLUEs"))
## Add a weight column in the output.
TDResWt <- STAtoTD(modSp,
what = c("BLUEs", "seBLUEs"),
addWt = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.