computes the projection matrix that produces means
Computes the symmetric projection matrix that produces the means
corresponding to a (generalized)
The design matrix X for a (generalized)
factor is formed with a
column for each
level of the (generalized)
factor, this column
being its indicator variable. The projection matrix is formed as
X %*% (1/diag(r) %*% t(X), where
r is the
factor is a
factor formed from the
combinations of the
levels of several original
factors can be formed using
projector containing the symmetric, projection matrix
and its degrees of freedom.
fac.sumop in package dae.
projector for further information about this class.
1 2 3 4 5 6 7 8 9
## set up a two-level factor and a three-level factor, both of length 12 A <- factor(rep(1:2, each=6)) B <- factor(rep(1:3, each=2, times=2)) ## create a generalized factor whose levels are the combinations of A and B AB <- fac.combine(list(A,B)) ## obtain the operator that computes the AB means from a vector of length 12 M.AB <- fac.meanop(AB)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.