Displaying 1 result from an estimated 1 matches for "m_lm".
Did you mean:
_lm
2018 Oct 20
0
Feature request: Have t.test return (group-wise) SD and N
...2, 4.2,
4.3, 3, 4.1),
Species = structure(rep(c(1L, 2L), each = 50), .Label = c("setosa", "versicolor"), class = "factor")),
row.names = c(NA, 100L), class = "data.frame")
# lm model
m_lm <- lm(Petal.Length ~ Species, d)
# Extract group means:
aggregate(m_lm$model$Petal.Length, list(m_lm$model$Species), mean)
# Extract group SDs:
aggregate(m_lm$model$Petal.Length, list(m_lm$model$Species), sd)
# Extract group Ns:
table(m_lm$model$Species)
# t.test model
m_t <- t.test(d$Petal....