Implements the moderated profile analysis approach developed by Davison & Davenport (unpublished)
mpa(formula, data, moderator, k =100, na.action ="na.fail")
Arguments
formula: An object of class formula of the form response ~ terms.
data: An optional data frame, list or environment containing the variables in the model.
moderator: Name of the moderator variable.
k: Corresponds to the scalar constant and must be greater than 0. Defaults to 100.
na.action: How should missing data be handled? Function defaults to failing if missing data are present.
Returns
A list containing the following components:
call - The model call
output - The output from the moderated criterion-related profile analysis
f.table - The corrected F-table for assessing differences in patterns.
moder.model - The standard moderated regression model
Details
The function returns the criterion-related moderated profile analysis described in Davison & Davenport (unpublished). Missing data are presently handled by specifying na.action = "na.omit", which performs listwise deletion and na.action = "na.fail", the default, which causes the function to fail. The following S3 generic functions are not yet available but will be in future implementations. summary(),anova(), print(), and plot(). These functions provide a summary of the analysis (namely, R2 and the level and pattern components); perform ANOVA of the R2 for the pattern, the level, and the overall model; provide output similar to lm(), and plots the pattern effect. WORKS ONLY WITH TWO GROUPS!
Examples
## Not run:data(mod_data)mod <- mpa(gpa ~ satv * major + satq * major, moderator ="major", data = bacc2001)summary(mod$output)mod$f.table
summary(mod$moder.model)## End(Not run)
References
Davison, M., & Davenport, E. (unpublished). Comparing Criterion-Related Patterns of Predictor Variables across Populations Using Moderated Regression.