Learn R Programming

yhat (version 2.0-2)

commonalityCoefficients: Commonality Coefficents

Description

Commonality Coefficients returns a list of two tables. The first table CC contains the list of commonality coefficients and the percent variance for each effect. The second CCTotByVar totals the unique and common effects for each independent variable.

Usage

commonalityCoefficients(dataMatrix, dv, ivlist, imat=FALSE)

Arguments

dataMatrix

Dataset containing the dependent and independent variables

dv

The dependent variable named in the dataset

ivlist

List of independent variables named in the dataset

imat

Echo flag, default to FALSE

Value

CC

Matrix containing commonality coefficients and percentage of variance for each effect.

CCTotalByVar

Table of unique and common effects for each independent variable.

Details

When echo flag is true, transitional matrices during commonality coefficient calculation are sent to output window. Default for this option is false. When set to true, the intermediate matrices for each commonality coefficient and regression combinations are printed in the output window.

References

Nimon, K., Lewis, M., Kane, R. & Haynes, R. M. (2008) An R package to compute commonality coefficients in the multiple regression case: An introduction to the package and a practical example.Behavior Research Methods, 40, 457-466.

See Also

canonCommonality genList odd setBits

Examples

Run this code
# NOT RUN {
  ## Predict miles per gallon based on vehicle weight, type of 
  ## carborator, & number of engine cylinders
     commonalityCoefficients(mtcars,"mpg",list("wt","carb","cyl"))

  ## Predict paragraph comprehension based on four verbal
  ## tests: general info, sentence comprehension, word
  ## classification, & word type 
  ## Use HS dataset in MBESS 
     require ("MBESS")
     data(HS)
  ## Commonality Coefficient Analysis
     commonalityCoefficients(HS,"t6_paragraph_comprehension",list("t5_general_information",
       "t7_sentence","t8_word_classification","t9_word_meaning"))

# }

Run the code above in your browser using DataLab