Displaying 1 result from an estimated 1 matches for "dataindices".
2009 Apr 16
0
manipulating data via the factors of a term in a lm()
...ctors ("A:B", "A:B:C",
...). I'd
prefer not to have to require() additional packages if possible. The
functions I need
are
[1] termMeans(mod, term): Find the (possibly vector) response means for
a model term, specified by a string, "A", "A:B", ...
[2] dataIndices(mod, term): Find indices of the observations in the data
corresponding to the combination of levels in the term
Here is a small example to illustrate what I need: a 3-factor mlm
factors <- expand.grid(A=factor(1:3),B=factor(1:2),C=factor(1:2))
n <- nrow(factors)
responses <-data.frame(Y...