Learn R Programming

multicon (version 1.6)

decomp: Decomposition of Effects

Description

A function for decomposing a matrix into its grand mean, row effects, column effects, and unique effects and examining the association of these effects with corresponding effects in another matrix

Usage

decomp(x, y=NULL, na.rm=TRUE, use="pair")

Arguments

x
A matrix of data to decompose
y
An optional criterion matrix of data to examine for componential similarity to x
na.rm
A logicial indicating if missing values should be removed
use
A character indicating how to handle missing data for correlations

Value

A list containing the following
GrandMeanX
The grand mean of the x matrix
GrandMeanY
The grand mean of the y matrix
RowEffectX
The mean of the rows for the x matrix
RowEffectY
The mean of the rows for the y matrix
ColEffectX
The mean of the columns for the x matrix
ColEffectY
The mean of the columns for the y matrix
DecompositionX
The unique effects in the X matrix after decomposition
DecompositionY
The unique effects in the Y matrix after decomposition
RowUniqueCor
A vector containing the correlations between the corresponding rows of the decomposed matrices
ColUniqueCor
A vector containing the correaltions between the corresponding columns of the decomposed matrices
VarComp
A data.frame containing the variance components for rows, columns, and interactions
Stats
A 4 x 1 matrix containing 4 similarity components (only returned if a criterion matrix y is provided) Elevation Accuracy: The grand mean of x minus the grand mean of y Differential Eleveation: The correlation between the row effects Stereotype Accuracy: The correlation between the column effects Differential Accuracy: The correlation between the uniquenesses

Details

Following Cronbach (1955) this function deomposes the data matrices in x and y and returns a number of characerisicts about these matrices including four measures of their similarity. See value section.

References

Cronbach, L. J. (1955). Processes affecting scores on "understanding of others" and "assumed similarity." Psychological Bulletin, 52, 177-193.

Examples

Run this code
data(exsitu)
data(insitu)
  # Decomposition of the column and row effects of a single data matrix
decomp(exsitu)
  # Decomposition of the column and row effects of two data matrices including
  # the similarities (correlations) between the row, column, and unqiue effects. 
decomp(exsitu, insitu)

Run the code above in your browser using DataLab