Learn R Programming

asremlPlus (version 4.1-26)

as.asrtests: Forms an asrtests object that stores (i) a fitted asreml object, (ii) a pseudo-anova table for the fixed terms and (iii) a history of changes and hypthesis testing used in obtaining the model.

Description

An asrtests.object that is a list consisting of the components asreml.obj, wald.tab and test.summary.

A call to as.asrtests with test.summary = NULL re-initializes the test.summary data.frame.

If there is no wald.tab, wald.asreml is called. In all cases, recalcWaldTab is called and any changes made as specified by the the recalcWaldTab arguments supplied via .

Usage

as.asrtests(asreml.obj, wald.tab = NULL, test.summary = NULL, 
            denDF = "numeric", ...)
asrtests(asreml.obj, wald.tab = NULL, test.summary = NULL, 
         denDF = "numeric", ...)

Arguments

asreml.obj

an asreml object for a fitted model.

wald.tab

A data.frame containing a pseudo-anova table for the fixed terms produced by wald.asreml; it should have 4 columns. Sometimes wald.asreml returns a data.frame and at other times a list. For example, it may return a list when denDF is used. In this case, the Wald component of the list is to be extracted and stored. It is noted that, as of asreml version 4, wald.asreml has a kenadj argument.

test.summary

A data.frame with columns term, DF, denDF, p and action containing the results of previous hypothesis tests.

denDF

Specifies the enthod to use in computing approximate denominator degrees of freedom when wald.asreml is called. Can be none to suppress the computations, numeric for numerical methods, algebraic for algebraic methods or default, the default, to autommatically choose numeric or algebraic computations depending on problem size. The denominator degrees of freedom are calculated according to Kenward and Roger (1997) for fixed terms in the dense part of the model.

further arguments passed to wald.asreml and recalcWaldTab.

Value

An object of S3-class asrtests.

See Also

asremlPlus-package, is.alldiffs, as.alldiffs, recalcWaldTab, testranfix.asrtests, chooseModel.asrtests, rmboundary.asrtests, reparamSigDevn.asrtests

Examples

Run this code
# NOT RUN {
data(Wheat.dat)

# Fit initial model
current.asr <- asreml(yield ~ Rep + WithinColPairs + Variety, 
                      random = ~ Row + Column + units,
                      residual = ~ ar1(Row):ar1(Column), 
                      data=Wheat.dat)

# Load current fit into an asrtests object
current.asrt <- as.asrtests(current.asr, NULL, NULL)

# Check for and remove any boundary terms
current.asrt <- rmboundary(current.asrt)
# }

Run the code above in your browser using DataLab