getEffectParameters | R Documentation |
From a matrix of cell means, the factors in the experiment, and information about which factor to test, creates a matrix of ANOVA effect parameters.
getEffectParameters(cellMeans, factors, testedFactors, dmFactors = NULL, contrastType = NULL, warnOnDrop = FALSE)
cellMeans |
A matrix of cell means. Each column is a cell and each row is a sample from the prior or posterior. The columns must correspond to the rows of |
factors |
See |
testedFactors |
See |
dmFactors |
See |
contrastType |
See |
warnOnDrop |
Emit a warning if columns of the design matrix are dropped due to it not being full rank. |
The steps of the procedure:
Calculate the design matrix, X
.
1b. If design is not fully crossed, strip excess terms from X
.
If mu
are cell means and beta
are effect parameters, then mu = X * beta
and beta = (X' * X)^-1 * X' * mu
. Calculate S = (X' * X)^-1 * X'
.
Calculate beta = S * mu
.
Select out only the beta
needed for the testedFactors
, beta_s
.
Select the corresponding columns (and rows) in X
, X_s
.
Complete the required effect parameters with X_s * beta_s
. This is not the same as mu = X * beta
because only subsets of X
and beta
are used.
A matrix of effect parameters where each column is one parameter and each row is a sample from the prior or posterior (depending on what cellmeans
was). The columns are named with factor level names.
See also summarizeEffectParameters
and groupEffectParameters
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.