plot.asreml {asreml} | R Documentation

## Plot diagnostics for an asreml object.

### Description

Four plots are generated: a histogram of the residuals, a Normal Q-Q plot, a plot of residuals against fitted values and a plot of residuals against unit number.

### Usage

    ## S3 method for class 'asreml'
    plot(
      x,
      res = "default",
      spatial = "trend",
      facet = TRUE,
      distribution = "norm",
      conf = 0.95,
      labels = FALSE,
      ...
    )

### Arguments

`x` | An `asreml` object.
`res` | The type of residuals; see `residuals.asreml`.
`spatial` | If `"plot"` and an independent error has been fitted with `units` in the random formula, these are added to the residuals, otherwise if `"trend"` (the default) then `units` are not added even if present in the model.
`facet` | If `TRUE` (the default), multi-panel conditioning plots are produced for models with multi-section residual structures.
`distribution` | A character string specifing the distribution for q-q plots. Density and quantile functions for many standard probability distributions are available in the `"stats"` package. The distribution name is automatically prefixed with `"d"` and `"q"`; the default is `"norm"`.
`conf` | Confidence interval.
`labels` | if `TRUE` (the default is `FALSE`) points are labelled by unit number.
`...` | Additional arguments.

### Details

If the residual structure of the model contains multiple sections, the default plots are conditioned on the factor whose levels define the sections; normal Q-Q plots are only produced if `facet=TRUE`. For multivariate analyses, the plots are conditioned on `trait`.

### Value

An invisible list of `ggplot2` objects.

[Package asreml version 4.1.0.176 Index]