feedlot {lsmeans} | R Documentation

## Feedlot data

### Description

This is an unbalanced analysis-of-covariance example, where one covariate is affected by a factor. Feeder calves from various herds enter a feedlot, where they are fed one of three diets. The weight of the animal at entry is the covariate, and the weight at slaughter is the response.

### Usage

    data(feedlot)

### Format

A data frame with 67 observations on the following 4 variables.

`herd`

  a factor with levels `9` `16` `3` `32` `24` `31` `19` `36` `34` `35` `33`, designating the herd that a feeder calf came from.

`diet`

  a factor with levels `Low` `Medium` `High`: the energy level of the diet given the animal.

`swt`

  a numeric vector: the weight of the animal at slaughter.

`ewt`

  a numeric vector: the weight of the animal at entry to the feedlot.

### Details

The data arise from a Western Regional Research Project conducted at New Mexico State University. Calves born in 1975 in commercial herds entered a feedlot as yearlings. Both diets and herds are of interest as factors. The covariate, `ewt`, is thought to be dependent on `herd` due to different genetic backgrounds, breeding history, etc. The levels of `herd` ordered to similarity of genetic background.

Note: There are some empty cells in the cross-classification of `herd` and `diet`.

### Source

Urquhart NS (1982) Adjustment in covariates when one factor affects the covariate. Biometrics 38, 651-660.

### Examples

    require(lsmeans)
    feedlot.lm <- lm(swt ~ ewt + herd*diet, data = feedlot)

    # Obtain LS~means with a separate reference value of ewt for each
    # herd. This reproduces the last part of Table 2 in the reference
    lsmeans(feedlot.lm,  ~ diet | herd,  cov.reduce = ewt ~ herd)

[Package lsmeans version 2.27-62 Index]