Description Details Author(s) References Examples

This package contains tools useful in screening univariate and multivariate data, testing simple moderating relationships, extimating indirect effects based on simple (proximal) and complex (distal) mediating relationships. A tool for computing power in a given F distribution is also included. These are basic operations covered in a multivariate course in most Doctoral level Psychology programs. THese functions will also likely be useful in other domains (e.g., sociology, business management, medicine).

Package: | QuantPsyc |

Type: | Package |

Version: | 1.4 |

Date: | 2010-08-07 |

License: | GPL (version 2 or later) |

These functions can be grouped into 4 sets.

Data Screening

Moderation

Mediation

Power Calculation

*Data Screening* tools include both graphical and statistical methods for assessing the shape of the distributions as well as look for any outliers. Key functions include `norm`

and `mult.norm`

. *Moderation* functions are based on Aiken & West (1991) and Cohen, Cohen, West & Aiken (2003). Currently, only simple models are permissible (Y ~ X + Z + XZ). Key functions include `moderate.lm`

, `sim.slopes`

, and `graph.mod`

. *Mediation* functions are largely based on MacKinnon et al (2002) and Fletcher (2006). Both simple (one mediator) and complex (chain of two mediators) relationships can be estimated. Key functions include `proximal.med`

, and `distal.med`

. Finally, `powerF`

will calculate power based on an F distribution given percent variance accounted for (e.g. effect size) and degrees of freedom (e.g., model parameters and sample size). Some of the functions are original and others borrowed from numerous sources. I have taken care to reference appropriately.

Thomas D. Fletcher

Strategic Resources

State Farm Insurance Cos.

Maintainer: Thomas D. Fletcher <[email protected]>

Aiken, L. S., & West, S. G. (1991). *Multiple regression: Testing and interpreting interactions.* Newbury Park: Sage Publications.

Cohen, J., Cohen, P., West, S. G., & Aiken, L. S. (2003). *Applied multiple regression/correlation analysis for the behavioral sciences, 3rd ed.* Mahwah, NJ: Lawrence Erlbaum Associates.

Fletcher, T. D. (2006, August). *Methods and approaches to assessing distal mediation.* Paper presented at the 66th annual meeting of the Academy of Management, Atlanta, GA.

Khattree, R. & Naik, D. N. (1999). *Applied multivariate statistics with SAS software (2nd ed.).* Cary, NC: SAS Institute Inc.

MacKinnon, D. P., Lockwood, C. M., Hoffman, J. M., West, S. G., & Sheets, V. (2002). A comparison of methods to test mediation and other intervening variable effects. *Psychological Methods, 7,* 83-104.

Murphy, K. R., & Myors, B. (2004). *Statistical power analysis: A simple and general model for traditional and modern hypothesis tests (2nd ed.).* Mahwah, NJ: Lawrence Erlbaum Associates.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
# Data Screening
data(USJudgeRatings)
norm(USJudgeRatings$CONT)
mult.norm(USJudgeRatings[,1:4])
# Moderation
data(tra)
lm.mod1 <- moderate.lm(beliefs, values, attitudes, tra)
ss.mod1 <- sim.slopes(lm.mod1,meanCenter(tra$values))
summary(lm.mod1)
ss.mod1
# use mouse click to place legend in graph.mod
# graph.mod(ss.mod1,beliefs,attitudes,tra,"Interaction Example")
# Mediation
# create object with names x, m, y
# data(tra)
temp.tra <- tra
names(temp.tra) <- c("x", "z", "m", "y")
proximal.med(temp.tra)
``` |

QuantPsyc documentation built on May 29, 2017, 10:40 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.