Huge gap in my understanding [General Statistics]
Dear ElMaestro,
You may have a look at R package
You may have a look at R package
lsmeans
for more details and this R code may help (credits to Alex) in understanding. library(lsmeans)
### Covariance example (from Montgomery Design (8th ed.), p.656)
print(fiber)
### model
fiber.lm <- lm(strength ~ diameter + machine, data = fiber)
summary(fiber.lm)
# 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")
fiber.lsm
Complete thread:
- LSMeans ElMaestro 2018-02-27 09:02 [General Statistics]
- Understanding (!) LSMeans d_labes 2018-02-28 09:49
- Huge gap in my understanding ElMaestro 2018-03-04 10:03
- Huge gap in my understandingmartin 2018-03-06 14:40
- Huge gap in my understanding ElMaestro 2018-03-06 17:30
- Huge gap in my understanding martin 2018-03-06 19:58
- Huge gap in my understanding ElMaestro 2018-03-06 20:53
- Huge gap in my understanding martin 2018-03-07 08:42
- Huge gap in my understanding ElMaestro 2018-03-06 20:53
- Huge gap in my understanding martin 2018-03-06 19:58
- Huge gap in my understanding ElMaestro 2018-03-06 17:30
- Huge gap in my understandingmartin 2018-03-06 14:40