Huge gap in my understanding [General Sta­tis­tics]

posted by martin  – Austria, 2018-03-06 14:40 (1330 d 13:50 ago) – Posting: # 18498
Views: 4,192

(edited by martin on 2018-03-06 14:59)

Dear ElMaestro,

You may have a look at R package lsmeans for more details and this R code may help (credits to Alex) in understanding.


### Covariance example (from Montgomery Design (8th ed.), p.656)

### model
fiber.lm <- lm(strength ~ diameter + machine, data = fiber)

# means versus ls-means
fiber$pred <- predict(fiber.lm, list(machine=fiber$machine, diameter=rep(mean(fiber$diameter), 15)))
aggregate(fiber$strength, by=list(fiber$machine), mean) # mean
aggregate(fiber$pred, by=list(fiber$machine), mean)     # lsmean

# lsmeans via R package lsmeans
fiber.lsm <- lsmeans(fiber.lm, "machine")

Complete thread:

 Admin contact
21,758 posts in 4,550 threads, 1,544 registered users;
online 2 (0 registered, 2 guests [including 1 identified bots]).
Forum time: Wednesday 05:30 CEST (Europe/Vienna)

There ain’t no rules around here!
We’re trying to accomplish something!    Thomas Alva Edison

The Bioequivalence and Bioavailability Forum is hosted by
BEBAC Ing. Helmut Schütz