Choose Language Hide Translation Bar

New Tools for Modeling and Visualizing Moderation and Moderated Mediation in JMP® Pro (2023-EU-PO-1229)

Often as we are trying to gain insights from our data, understanding that two variables are related is not enough. We need to dig deeper and ask questions like: under what circumstances are they related? For whom are they related, why are they related, and how? Moderation (i.e., interactions), mediation, and moderated mediation models allow us to answer these types of questions. These models are popular and important but cumbersome to fit. Furthermore, visualizations essential for understanding interactions are difficult to create from scratch. This presentation will describe the Moderation and Mediation Add-In for JMP Pro, which enables easy specification, fitting, and visual probing of interactions in three popular models: moderation, first-stage moderated mediation, and second-stage moderated mediation. With minimal user input, the add-in automatically specifies and estimates the appropriate model. Then, the results are processed and packaged into ready-to-publish output. An interactive Johnson-Neyman plot, as well as a simple slopes plot, is created. We will provide an in-depth demonstration of these features using an example from psychology. Academics and data analysts across the social, behavioral, educational, and life sciences will benefit from this novel functionality. 

 

Blog post describing the Moderation and Mediation Add-In: https://community.jmp.com/t5/JMPer-Cable/Who-what-why-and-how-Tools-for-modeling-and-visualizing/ba-p/527173 

 

 

All  right .  Hi ,  everybody .  My  name  is  Haley  Yaremych .  I  worked  at  JMP  this  past  summer  as  a  statistical  testing  intern ,  and  I'll  be  returning  this  coming  summer  in  the  same  role .   This  past  summer ,  I  built  an  Add- in  that  helps  users  fit  and  visualize  interactions .   I'm  excited  to  talk  to  you  all  about  that  today .

Okay ,   to  set  up  the  example  that  I'm  going  to  be  using  throughout  the  talk .  Let's  take  a  look  at  this  clip  from  a  website  called  The  Science  of  People.com .   This  clip  reads .  Do  you  know  the  impact  of  your  work  when  we  don't  have  our  why  at  the  front  of  our  mind ?  It  can  be  hard  to  feel  motivated  and  excited  about  what  we're  doing.

When  we  get  busy  or  overwhelmed .  The  why  just  seems  to  slip  away .   This  clip  tells  us  that  when  we  feel  that  our  work  has  meaning ,  this  tends  to  lead  to  greater  job  satisfaction .   With  a  structural  equation  modeling  path  diagram ,  we  would  display  that  cause  and  effect  relationship  like  this .

But  if  we're  too  overwhelmed  at  work ,  this  relationship  might  weaken .   The  meaningfulness  of  our  work  should  be  related  to  job  satisfaction ,  but  only  if  overwhelm  is  low .   Conceptually ,  we  could  represent  that  like  this .   In  the  social  sciences ,  this  is  what  we  call  moderation ,  because  overwhelm  is  going  to  moderate  that  relationship  between  meaningfulness  and  job  satisfaction .  But  more  widely ,  this  is  known  as  an  interaction .   When  we  find  a  significant  interaction ,  we  need  to  visualize  it  in  order  to  understand  what's  going  on .   To  do  that ,  we  often  need  to  look  at  simple  slopes .

A  simple  slope  describes  the  relationship  between  the  predictor  and  the  outcome  at  a  particular  value  of  the  moderator .   In  this  plot ,  we're  taking  a  look  at  the  relationship  between  meaningfulness  and  job  satisfaction  at  three  different  values  of  overwhelm .   The  red  line  is  that  relationship  when  overwhelm  is  low .  The  blue  line  is  when  overwhelm  is  at  its  mean ,  and  the  purple  line  is  when  overwhelm  is  high .   Just  as  we  would  expect ,  the  relationship  between  meaningfulness  and  job  satisfaction  is  the  strongest When  overwhelm  is  low  and  won't  overwhelm  is  high ,  that  relationship  weakens .

Being  able  to  visualize  simple  slopes  is  a  really  essential  part  of  fitting  and  understanding  models  that  involve  interactions .  But  in  order  to  publish  these  results ,  we  also  often  need  details  about  the  values  of  those  simple  slopes  and  their  statistical  significance  at  different  values  at  the  moderator .  Just  like  I've  shown  here  for  high  and  low  values  of  overwhelm .

We  can  also  take  things  a  step  further  beyond  simple  moderation .   This  clip  also  mentions  that  meaningfulness  might  result  in  greater  job  satisfaction  because  it  tends  to  lead  to  greater  motivation  at  work .   There  might  be  a  cause  and  effect  pathway  here ,  and  this  is  what  we  would  call  mediation .  But  again ,  overwhelm  needs  to  be  low  in  order  for  these  benefits  to  play  out .   We  might  expect  that  overwhelm  needs  to  be  low  in  order  for  this  first  effect  to  be  present .   We  would  call  this  first  stage  moderated  mediation .  Or  we  might  think  that  low  overwhelm  is  more  important  for  the  second  effect  to  be  present We  would  call  this  second  stage  moderated  mediation .

In  these  moderated  mediation  models ,  if  we  find  a  significant  interaction ,  we  still  need  to  probe  that  and  assess  significance  at  different  values  at  the  moderator .  But  this  time ,  we're  interested  in  plotting  and  testing  this  entire  effect  of  meaningfulness  on  job  satisfaction  through  motivation .   We  call  this  the  indirect  effect We're  going  to  see  an  example  of  this  in  our  demo  in  just  a  few  minutes .

These  types  of  questions  come  up  all  the  time ,  not  only  in  social  science  research ,  but  also  in  other  areas .   Given  their  popularity ,  it's  no  surprise  that  we've  had  a  lot  of  requests  from  JMP  users  to  incorporate  quick  and  easy  ways  of  fitting  and  visualizing  these  types  of  models .   A  lot  of  these  user  requests  mentioned  moderation ,  mediation  and  simple  slopes .  The  Jason  Nieman  Plot  is  an  extension  of  the  simple  Slopes  plot  that  I  showed  earlier ,  and  I'll  get  to  that  in  a  few  minutes .  But  basically  these  are  all  different  jargony  ways  of  asking  for  the  same  functionality .

You'll  notice  that  a  lot  of  these  requests  mention  the  process  macro .   The  process  macro  is  a  very  widely  used  tool  for  fitting  these  types  of  models .   It  provides  easy  model  fitting  and  a  lot  of  numeric  output  about  these  models .  But  right  now ,  it  doesn't  provide  visualizations .   The  burden  would  be  on  the  user  to  take  this  numeric  output  and  create  a  graph  with  it  elsewhere .   That  can  be  very  cumbersome  and  error  prone .   This  is  a  really  important  drawback  because  these  graphs  are  essential  for  understanding  interactions .

Just  to  give  you  a  sense  of  how  difficult  it  is  for  the  user  to  create  these  graphs  on  their  own ,  these  are  the  formulas  that  underlie  the  two  plots  that  you're  about  to  see  in  the  demo .   Imagine  having  to  code  these  up  yourself .  It  would  be  really  tough .   With  this  add-in ,  we  wanted  to  draw  upon  the  strength  of  the  process  macro  that  make  it  so  popular  so  easy  and  automated  fitting  of  these  models .  But  then  we  also  added  features  that  cannot  be  found  elsewhere  and  that  really  capitalize  on  the  unique  strengths  of  JMP Engaging  visualizations  that  otherwise  would  be  really  tough  for  users  to  make  from  scratch .

Here's  a  quick  summary  of  the  features  of  our  Add- in ,  as  well  as  what  users  are  currently  up  against .  If  they  want  to  fit  these  models  with  the  structural  equation  modeling  platform  JMP  but  without  the  Add- in .   We've  automated  all  the  details  of  model  fitting  and  without  the  adding ,  there's  a  lot  of  data  preprocessing  that's  often  required  and  it  can  be  difficult  to  specify  the  correct  structural  equation  model .

We  also  provide  a  lot  of  numeric  output ,  but  we're  also  going  to  sift  through  that  output  and  do  the  further  calculations  with  it  that  are  needed  to  really  distill  that  output Then ,  as  I  mentioned ,  all  visualizations  are  now  automated  so  users  can  avoid  those  complex  formulas .

Now  I'm  going  to  JMP  over  to  a  demo  using  the  second  stage  moderated  mediation  model  with  the  Add-in .   Here's  the  model  that  we're  going  to  fit .   Within  JMP ,  I'm  going  to  open  up  our ...  Oops,  I  moved  my  bar  here .  Okay I'm  going  to  open  up  our  moderation  mediation Add-in .   I'm  going  to  put  the  second  stage  moderated  mediation  model .

Within  the  user  input  window ,  the  first  thing  we  see  is  these  figures .   Like  I  mentioned ,  a  difficult  aspect  of  fitting  these  types  of  models  can  be  understanding  how  to  make  the  JMP  from  what  we  think  is  going  on  conceptually  to  the  statistical  model  that  needs  to  be  fit .   The  goal  of  these  figures  is  just  to  take  that  burden  away  from  the  user ,  and  the  only  input  that  we  need  from  the  user  is  just  to  select  a  variable  for  each  role .   I'm  going  to  do  that  here .

Then  optionally  any  number  of  covariates  can  be  added .   By  default ,  any  variables  involved  in  an  interaction  term  are  going  to  be  mean  centered .  But  this  can  be  turned  off  or  they  can  be  centered  around  a  user  specified  value .   Then  those  plots  that  I  mentioned  are  only  going  to  be  shown  in  the  output  if  the  interaction  is  significant  at  alpha  0.05 .  But  this  can  also  be  turned  off .

When  I  click  okay  and  I  pull  up  our  output ,  the  first  thing  we  see  is  the  output  from  the  structural  equation  modeling  platform .  But  again ,  this  can  be  a  lot  to  sift  through .   The  goal  of  this  moderation  detail  section  is  to  pull  out  all  the  most  important  parts  of  the  ACM  output  to  do  any  necessary  computations  with  that  output ,  and  then  to  package  everything  into  sentences  that  can  be  easily  understood and   copy  and  paste  it  into  a  publication  or  report .

You'll  see  here  we  get  some  details  about  the  conditional  indirect  effects .   Again ,  these  are  very  similar  to  simple  slopes ,  but  now  we're  calling  them  indirect  because  the  effect  of  meaningfulness  on  job  satisfaction  is  traveling  through  motivation .

The  next  action  here  is  going  to  be  our  Jason  name  and  plot .   This  plot  really  is  the  state  of  the  art  method  for  probing  an  interaction  because  it's  going  to  provide  a  lot  more  detail  than  the  simple  Slopes  plot  that  I  showed  earlier .   Here  on  the  X  axis ,  we  have  the  moderator ,  so  overwhelm  is  on  the  X  axis  and  then  the  Y  axis  is  going  to  be  the  effect  of  meaningfulness  on  job  satisfaction  through  motivation That  indirect  effect  is  what's  changing  as  a  function  of  overwhelm .   We're  looking  at  that  effect  at  each  possible  value  of  overwhelm .

We  can  see  that  that  effect  is  weakening  as  overwhelm  increases .  But  this  plot  can  sometimes  be  kind  of  hard  for  people  to  wrap  their  head  around ,  mainly  because  we  have  an  effect  on  the  Y  axis .   As  in  this  example ,  although  most  of  these  effects  are  positive ,  they're  just  becoming  less  positive  as  overwhelm  is  increasing .   This  can  sometimes  be  a  little  confusing .   To  make  things  even  clearer ,  we  added  graph  flights  to  this  plot .

When  I  hover  over  this  line ,  I'm  going  to  see  a  graph  fit  that  shows  me  the  effect  of  meaningfulness  on  job  satisfaction  at  this  particular  value  of  overwhelm .   We  can  see  that  when  overwhelm  is  low ,  that  is  that  effect  is  strong  and  positive .   Then  as  overwhelm  increases ,  that  effect  is  weakening .  Until  eventually ,  when  overwhelm  is  really  high ,  that  effect  is  basically  flat .   A  really  nice  advantage  of  JMP  is  that  we  were  able  to  add  these  graph  fits  and  really  aid  user  understanding  here .

Another  nice  aspect  of  this  Jason  Neumann  approach  is  that  we  can  calculate  these  significance  boundaries .   This  boundary  is  the  exact  value  of  overwhelm ,  where  this  effect  goes  from  being  statistically  significant ,  which  is  in  blue  to  non-significant ,  which  is  in  red .

Typically  there's  going  to  be  two  significance  boundaries .   You  can  see  up  here  that  they  were  both  calculated ,  but  only  one  appears  in  the  plot .   This  is  because  this  plot  is  only  going  to  show  values  of  the  moderator  that  were  observed  in  the  data  set .   We  did  this  for  extrapolation  control .

Here  we  can  say  that  as  long  as  overwhelm  is  less  than  about  1.25 ,  there's  going  to  be  a  significant  effect  of  meaningfulness  on  job  satisfaction  through  motivation .

Our  final  section  of  output  here  is  going  to  be  a  conditional  indirect  effects  plot .  This  is  a  lot  like  the  simple  slopes  plot  that  I  showed  earlier .   Basically  we're  just  taking  a  few  of  those  graph  plots  and  we're  putting  those  into  a  static  plot .   Same  idea  here .  We  end  up  with  the  same  takeaways ,  but  this  specific  type  of  graph  is  often  needed  for  publication .

Some  features  that  aren't  included  in  the  Add-in  right  now  that  we  would  love  to  add  in  the  future .  The  first  is  bootstrapping .   Right  now  these  confidence  bands  are  calculated  mathematically ,  but  finding  them  with  bootstrapping  is  sometimes  preferable .   We  would  love  to  be  able  to  add  that  in  the  future .   We  love  to  add  more  types  of  models .

The  process  macro  that  I  mentioned  earlier  offers  dozens  and  dozens  of  model  options .  Here  we  only  have  three ,  but  we  did  choose  the  three  most  popular  types  of  these  models .  But  we'd  love  to  be  able  to  add  more  in  the  future .

All  right .   With  that ,  I'm  going  to  go  ahead  and  wrap  up .  Thank  you  so  much  for  your  attention .  You  can  feel  free  to  email  me  with  questions  at  this  address .   I've  also  included  a  link  to  the  JMP  Community  blog  post  that  provides  a  lot  more  detail  than  what  I  had  time  to  get  into  today .   This  is  going  to  go  through  basic  moderation  as  the  running  example ,  which  I  think  will  be  really  applicable  to  anybody  in  any  field  that's  interested  in  testing  and  probing  interactions  with  these  tools Again ,  thank  you  for  your  attention .