wald.asreml | R Documentation

## Wald tests for Asreml Models

### Description

Compute either an incremental pseudo analysis of variance table using Wald statistics or conditional F-tests that respect marginality.

### Usage

    wald.asreml(object, Ftest = formula("~NULL"),
    denDF = ("none", "default", "numeric", "algebraic"),
    ssType = c("incremental", "conditional"), ...)

### Arguments

`object` | an `asreml` object.
`Ftest` | a formula object of the form `~ test-term | background-terms` specifying a conditional Wald test of the contribution of `test-term` conditional on those listed in `background-terms`, and the those in the `random` and `sparse` model formulae.
`denDF` | compute approximate denominator degrees of freedom. Can be `"none"`, the default, to suppress the computations, `"numeric"` for numerical methods, `"algebraic"` for algebraic methods or `"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.
`ssType` | can be `"incremental"` for incremental sum of squares, the default, or `"conditional"` for F-tests that respect both structural and intrinsic marginality.
`...` | arguments to `asreml` can be passed through `update.asreml` if `ssType` is not "incremental".

### Details

`wald.asreml()` produces two styles of analysis of variance table depending on the settings of `denDF` and `ssType`. If `denDF = "none"` and `ssType = "incremental"` (the defaults), a pseudo analysis of variance table is returned based on incremental sums of squares with rows corresponding to each of the fixed terms in the object, plus an additional row for the residual. The model sum of squares is partitioned into its fixed term components, and the sum of squares for each term listed in the table of Wald statistics is adjusted for the terms listed in the rows above. The denominator degrees of freedom are not computed and consequently Wald tests are provided.

If either `denDF` or `ssType` are not set at their default values, a data frame is returned that will include columns for the approximate denominator degrees of freedom and incremental and conditional F statistics depending on the combination of options chosen. `update.asreml` is called to complete the calculations.

The principle used in determining the conditional tests is that a term cannot be adjusted for another term which encompasses it explicitly (for example, A:C cannot be adjusted for A:B:C) or implicitly (for example, REGION cannot be adjusted for LOCATION when locations are nested in regions although coded independently). Users should consult the Users Guide for further information.

The numerator degrees of freedom for each term is determinaed as the number of non-singular equations involved in the term. However, the calculation of the denominator df is in general not trivial and is computationally expensive. Numerical derivatives require an extra evaluation of the mixed model equations for every variance parameter while algebraic derivatives require a large dense matrix, potentially of order the number of equations plus the number of observations. The calculations are supressed by default.

### Value

A list with the following components:

`wald` | an `anova` object if `denDF = none` and `ssType = "incremental"`, or a data frame otherwise.
`stratumVariances` | If `denDF` is not `"none"`, a matrix of approximate stratum variances, degrees of freedom and component coefficients is returned for simple variance component models.

### Author(s)

David Butler

### References

Kenward, M.G. and Roger, J.H. (1997). The precision of fixed effects estimates from restricted maximum likelihood, Biometrics, 53, 983-997.

### See Also

`svc.asreml`

### Examples

    data(oats, package="asreml3")
    oats.asr <- asreml(yield ~ Variety*Nitrogen,
                       random = ~ Blocks/Wplots, data=oats)
    wald(oats.asr)
    wald(oats.asr, denDF="default")