# oranges: Orange sales In lsmeans: Least-Squares Means

## Description

This example dataset on sales of oranges has two factors, two covariates, and two responses. There is one observation per factor combination.

## Usage

 `1` ```data(oranges) ```

## Format

A data frame with 36 observations on the following 6 variables.

`store`

a factor with levels `1` `2` `3` `4` `5` `6`. The store that was observed.

`day`

a factor with levels `1` `2` `3` `4` `5` `6`. The day the observation was taken (same for each store).

`price1`

a numeric vector. Price of variety 1.

`price2`

a numeric vector. Price of variety 2.

`sales1`

a numeric vector. Sales (per customer) of variety 1.

`sales2`

a numeric vector. Sales (per customer) of variety 2.

## References

Littell, R., Stroup W., Freund, R. (2002) SAS For Linear Models (4th edition). SAS Institute. ISBN 1-59047-023-0.

## Examples

 ```1 2 3 4 5 6 7 8``` ```require(lsmeans) # Example on p.244 of Littell et al. oranges.lm <- lm(sales1 ~ price1*day, data = oranges) lsmeans(oranges.lm, "day") # Example on p.246 lsmeans(oranges.lm, "day", at = list(price1 = 0)) ```

### Example output

```Loading required package: estimability
NOTE: Results may be misleading due to involvement in interactions
day    lsmean       SE df  lower.CL upper.CL
1    7.382830 2.011404 24  3.231495 11.53416
2    6.546316 1.922533 24  2.578403 10.51423
3   14.030179 1.917401 24 10.072858 17.98750
4    8.396073 1.909505 24  4.455049 12.33710
5   16.645013 2.468563 24 11.550149 21.73988
6   10.514573 1.918759 24  6.554449 14.47470

Confidence level used: 0.95
NOTE: Results may be misleading due to involvement in interactions
day   lsmean       SE df   lower.CL  upper.CL
1   18.67549 14.41101 24 -11.067370  48.41835
2   38.48693 15.10941 24   7.302648  69.67122
3   45.32968 26.15762 24  -8.657004  99.31636
4   49.14921 16.60916 24  14.869590  83.42883
5   77.89895 27.50071 24  21.140261 134.65763
6   73.27264 13.48374 24  45.443570 101.10170

Confidence level used: 0.95
```

lsmeans documentation built on Nov. 17, 2017, 4 a.m.