Skip to contents

Generates a table of least significant differences (LSDs) for a given model.

Usage

lsd_table(model, classify, ...)

Arguments

model

The model object to calculate LSDs from.

The value may be:

  • asreml

  • glmmTMB (not yet implemented)

classify

character A string specifying which variables to predict and calculate LSDs from.

...

Arguments to pass to predictPlus.asreml

Value

A data.frame with the LSD values.

Examples

library(asreml)
model <- asreml(
    fixed = yield ~ Variety + Nitrogen + Variety:Nitrogen,
    random = ~ idv(Blocks) + idv(Blocks):idv(Wplots),
    residual = ~ idv(units),
    data = oats
)
lsd_table(model, classify = "Variety")
#>     treatment group      lsd    means
#> 1  Marvellous     a 15.77278 109.7917
#> 2 Golden_rain     a 15.77278 104.5000
#> 3     Victory     a 15.77278  97.6250