Moderated Mediation with PROCESS (model 7 & 8) for R (2024)

Running Hayes' PROCESS-macro (Version 3.5 and later) with R

Arndt Regorz, Dipl. Kfm. & M.Sc. Psychologie, 07/14/2021


For years the PROCESS macro has been the standard way of testing conditional indirect effects (moderated mediation, mediated moderation) when using SPSS. At the end of 2020 Hayes has released the PROCESS function for R, too.This video will show you how to run and interpret a moderated mediation analysis with Hayes' PROCESS function for R / RStudio. In addition, you can finde the PROCESS syntax used for testing a moderated mediation.

Primarily, the video explains PROCESS models 7 and 8, that is a moderated mediation (conditional process analysis) with a moderated a-path from the independent variable to the mediator. However, at the end of the video there is some additional information you could use if you want to test PROCESS models 14 or 15 within R (models with a moderated b-path).

Content

  1. Video tutorial
  2. Downloading PROCESS
  3. Initializing the Code
  4. PROCESS syntax for a moderated mediation
  5. Additional options
  6. More information

1. Video tutorial PROCESS model 7 & 8 for R


(Note: When you click on this video you are using a service offered by YouTube.)

2. Downloading PROCESS

You can download PROCESS for R from here:
https://www.processmacro.org/download.html

Currently (May, 2021) you will find a folder named “PROCESS v3.5beta for R”. There you will find an R-file “process.r”. Please be aware that it is at this point in time still a beta version so there could be bugs in the code.

3. Initializing the Code

Since PROCESS is not an R package you cannot use the commands install.packages() and library() with it. As a user defined function it has to be installed by running the file “process.r”.

If you open it in Rstudio, run it. It will take a minute or two for the code to run. After that has been completed you have gained a new R function, process(). With this function you can run PROCESS in the R environment in your active R session.

If you do not want to have to rerun the code of process.r each time you open R, then Hayes recommends saving your R workspace after running process.r

4. PROCESS syntax for a moderated mediation

Here you can find my recommendation for the R syntax for testing PROCESS model 7 or model 8, i.e. a moderated mediation with a moderated a-path.

Before you can run them you have to load and initialize the PROCESS-function.

PROCESS model 7

# PROCESS Model 7
process (data = my_data_frame,
y = "DV", x = "IV", m = "MED",
w = "MOD", model = 7,
cov = "COV", center = 2,
moments = 1, modelbt = 1,
boot = 10000, seed = 654321)

PROCESS model 8

# PROCESS Model 8
process (data = my_data_frame,
y = "DV", x = "IV", m = "MED",
w = "MOD", model = 8,
cov = "COV", center = 2,
moments = 1, modelbt = 1,
boot = 10000, seed = 654321)

And if you want to test a moderated mediation with a moderated b-path:

PROCESS model 14

# PROCESS Model 14
process (data = my_data_frame,
y = "DV", x = "IV", m = "MED",
w = "MOD", model = 14,
cov = "COV", center = 2,
moments = 1, modelbt = 1,
boot = 10000, seed = 654321)

Please be extremely careful with this model! In almost all cases it is safer to use model 15 instead.

PROCESS model 15

# PROCESS Model 15
process (data = my_data_frame,
y = "DV", x = "IV", m = "MED",
w = "MOD", model = 15,
cov = "COV", center = 2,
moments = 1, modelbt = 1,
boot = 10000, seed = 654321)

5. Additional Options

The following additional options can be helpful if you run a moderated mediation analysis with PROCESS.

Including covariates

You can include one or more covariates in your model. For two or more covariates you have to bind them together with the c(...)-Funktion.
cov = "age"
cov = c("age", "gender")

Robust standard errors

My code recommendation above uses bootstrapping as a robust method. In addition (or instead of it) you can request robust standard errors, e.g. HC4:
hc = 4

Johnson-Neyman method

If you want Johnson-Neyman significance regions for the moderation results, you can request them:
jn = 1

Changing the number format

You can change the decimal places, e.g. to three:
decimals = 10.3

Adjusting your confidence level

You can adjust the the confidence level, e.g. to 97.5%:
conf = 97.5

6. More Information

How to Report a Moderated Mediation - Which information to include, and in which order

If you want to know more about the theory behind a moderated mediation analysis I recommend Andrew Hayes' excellent book:
“Introduction to Mediation, Moderation, and Conditional Process Analysis: A Regression-Based Approach”
http://www.afhayes.com/introduction-to-mediation-moderation-and-conditional-process-analysis.html

Moderated Mediation with PROCESS (model 7 & 8) for R (2024)

References

Top Articles
Itsellamay
Purdue Basketball Message Board
Spasa Parish
Rentals for rent in Maastricht
159R Bus Schedule Pdf
Sallisaw Bin Store
Black Adam Showtimes Near Maya Cinemas Delano
Espn Transfer Portal Basketball
Pollen Levels Richmond
11 Best Sites Like The Chive For Funny Pictures and Memes
Things to do in Wichita Falls on weekends 12-15 September
Craigslist Pets Huntsville Alabama
Paulette Goddard | American Actress, Modern Times, Charlie Chaplin
What's the Difference Between Halal and Haram Meat & Food?
R/Skinwalker
Rugged Gentleman Barber Shop Martinsburg Wv
Jennifer Lenzini Leaving Ktiv
Justified - Streams, Episodenguide und News zur Serie
Epay. Medstarhealth.org
Olde Kegg Bar & Grill Portage Menu
Cubilabras
Half Inning In Which The Home Team Bats Crossword
Amazing Lash Bay Colony
Juego Friv Poki
Dirt Devil Ud70181 Parts Diagram
Truist Bank Open Saturday
Water Leaks in Your Car When It Rains? Common Causes & Fixes
What’s Closing at Disney World? A Complete Guide
New from Simply So Good - Cherry Apricot Slab Pie
Fungal Symbiote Terraria
modelo julia - PLAYBOARD
Poker News Views Gossip
Abby's Caribbean Cafe
Joanna Gaines Reveals Who Bought the 'Fixer Upper' Lake House and Her Favorite Features of the Milestone Project
Tri-State Dog Racing Results
Navy Qrs Supervisor Answers
Trade Chart Dave Richard
Lincoln Financial Field Section 110
Free Stuff Craigslist Roanoke Va
Stellaris Resolution
Wi Dept Of Regulation & Licensing
Pick N Pull Near Me [Locator Map + Guide + FAQ]
Crystal Westbrooks Nipple
Ice Hockey Dboard
Über 60 Prozent Rabatt auf E-Bikes: Aldi reduziert sämtliche Pedelecs stark im Preis - nur noch für kurze Zeit
Wie blocke ich einen Bot aus Boardman/USA - sellerforum.de
Infinity Pool Showtimes Near Maya Cinemas Bakersfield
Dermpathdiagnostics Com Pay Invoice
How To Use Price Chopper Points At Quiktrip
Maria Butina Bikini
Busted Newspaper Zapata Tx
Latest Posts
Article information

Author: Frankie Dare

Last Updated:

Views: 6290

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Frankie Dare

Birthday: 2000-01-27

Address: Suite 313 45115 Caridad Freeway, Port Barabaraville, MS 66713

Phone: +3769542039359

Job: Sales Manager

Hobby: Baton twirling, Stand-up comedy, Leather crafting, Rugby, tabletop games, Jigsaw puzzles, Air sports

Introduction: My name is Frankie Dare, I am a funny, beautiful, proud, fair, pleasant, cheerful, enthusiastic person who loves writing and wants to share my knowledge and understanding with you.