Learn R Programming

asremlPlus (version 4.4.46)

getTestEntry.asrtests: Gets the entry for a test recorded in the test.summary data.frame of an asrtests.object

Description

Matches the label in the term column of the test.summary data.frame in the supplied asrtests.object and extracts the line for it. It only matches the last occurrence of label.

Usage

# S3 method for asrtests
getTestEntry(asrtests.obj, label, error.absent = TRUE, ...)

Value

A one-line data.frame containing the entry or, error.absent is NULL, NULL.

Arguments

asrtests.obj

An asrtests.object containing the components (i) asreml.obj, (ii) wald.tab, and (iii) test.summary.

label

A character specifying the label of the test for which the entry is required. If testranfix.asrtests was used for the test of interest, then the label will be the value of the term argument supplied to testranfix.asrtests. For changeModelOnIC.asrtests, the label will be the value of the label argument. Other arguments will be relevant for other test and change functions.

error.absent

A logical indicating whether the absence of the supplied label is to result in an error. If set to FALSE, NULL is returned.

...

provision for passing arguments to functions called internally - not used at present.

Author

Chris Brien

See Also

getTestPvalue.asrtests, as.asrtests,
testranfix.asrtests, testswapran.asrtests, testresidual.asrtests,
changeModelOnIC.asrtests, changeTerms.asrtests, chooseModel.asrtests

Examples

Run this code
if (FALSE) {
data(Wheat.dat)
current.asr <- asreml(yield ~ Rep + WithinColPairs + Variety, 
                      random = ~ Row + Column + units,
                      residual = ~ ar1(Row):ar1(Column), 
                      data=Wheat.dat)
current.asrt <- as.asrtests(current.asr, NULL, NULL)
current.asrt <- rmboundary(current.asrt)
# Test nugget term
current.asrt <- testranfix(current.asrt, "units", positive=TRUE)
getTestEntry(current.asrt, label = "units")
}

Run the code above in your browser using DataLab