<!DOCTYPE html>
<!-- Generated by pkgdown: do not edit by hand --><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="rempsyc">
<title>Publication-ready moderations with simple slopes in R â€¢ rempsyc</title>
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png">
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="../deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet">
<script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
<!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Publication-ready moderations with simple slopes in R">
<meta property="og:description" content="rempsyc">
<meta property="og:image" content="https://rempsyc.remi-theriault.com/logo.png">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script><!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]--><!-- Global site tag (gtag.js) - Google Analytics --><script async src="https://www.googletagmanager.com/gtag/js?id=G-274QZTFL23"></script><script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-274QZTFL23');
</script>
</head>
<body>
    <a href="#main" class="visually-hidden-focusable">Skip to contents</a>
    

    <nav class="navbar fixed-top navbar-default navbar-expand-lg bg-light"><div class="container">
    
    <a class="navbar-brand me-2" href="../index.html">rempsyc</a>

    <small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">0.1.1.3</small>

    
    <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div id="navbar" class="collapse navbar-collapse ms-3">
      <ul class="navbar-nav me-auto">
<li class="nav-item">
  <a class="nav-link" href="../index.html">
    <span class="fa fa-home"></span>
     
  </a>
</li>
<li class="active nav-item dropdown">
  <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-tutorials">Tutorials</a>
  <div class="dropdown-menu" aria-labelledby="dropdown-tutorials">
    <h6 class="dropdown-header" data-toc-skip>âˆš STATISTICS</h6>
    <a class="dropdown-item" href="../articles/table.html">APA tables</a>
    <a class="dropdown-item" href="../articles/t-test.html">t tests</a>
    <a class="dropdown-item" href="../articles/contrasts.html">Planned contrasts</a>
    <a class="dropdown-item" href="../articles/moderation.html">Moderations</a>
    <a class="dropdown-item" href="../articles/randomize.html">Randomization</a>
    <h6 class="dropdown-header" data-toc-skip>ðŸ“Š VISUALIZATION</h6>
    <a class="dropdown-item" href="../articles/violin.html">Violin plots</a>
    <a class="dropdown-item" href="../articles/scatter.html">Scatter plots</a>
    <a class="dropdown-item" href="../articles/circles.html">Overlapping circles</a>
    <a class="dropdown-item" href="../articles/assumptions.html">Assumptions</a>
  </div>
</li>
<li class="nav-item">
  <a class="nav-link" href="../reference/index.html">Functions</a>
</li>
<li class="nav-item">
  <a class="nav-link" href="../news/index.html">News</a>
</li>
<li class="nav-item">
  <a class="nav-link" href="../TODOS.html">To-dos</a>
</li>
<li class="nav-item">
  <a class="nav-link" href="../articles/featured.html">Featured In</a>
</li>
      </ul>
<form class="form-inline my-2 my-lg-0" role="search">
        <input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off">
</form>

      <ul class="navbar-nav">
<li class="nav-item">
  <a class="external-link nav-link" href="https://lavaanExtra.remi-theriault.com/" aria-label="lavaanExtra">lavaanExtra</a>
</li>
<li class="nav-item">
  <a class="external-link nav-link" href="https://twitter.com/rempsyc" aria-label="Twitter">
    <span class="fa fa-twitter"></span>
     
  </a>
</li>
<li class="nav-item">
  <a class="external-link nav-link" href="https://github.com/rempsyc/rempsyc/" aria-label="GitHub">
    <span class="fa fa-github"></span>
     
  </a>
</li>
<li class="nav-item">
  <a class="external-link nav-link" href="https://github.com/sponsors/rempsyc" aria-label="Donate">
    <span class="fa fa-coffee"></span>
     
  </a>
</li>
      </ul>
</div>

    
  </div>
</nav><div class="container template-article">



<link href="moderation_files/tabwid-1.1.3/tabwid.css" rel="stylesheet">
<script src="moderation_files/tabwid-1.1.3/tabwid.js"></script><div class="row">
  <main id="main" class="col-md-9"><div class="page-header">
      <img src="../logo.png" class="logo" alt=""><h1>Publication-ready moderations with simple slopes in R</h1>
                        <h4 data-toc-skip class="author">RÃ©mi
ThÃ©riault</h4>
            
            <h4 data-toc-skip class="date">February 8, 2022</h4>
      
      <small class="dont-index">Source: <a href="https://github.com/rempsyc/rempsyc/blob/HEAD/vignettes/moderation.Rmd" class="external-link"><code>vignettes/moderation.Rmd</code></a></small>
      <div class="d-none name"><code>moderation.Rmd</code></div>
    </div>

    
    
<div class="section level2">
<h2 id="getting-started">Getting started<a class="anchor" aria-label="anchor" href="#getting-started"></a>
</h2>
<p>Letâ€™s first load the demo data. This data set comes with base
<code>R</code> (meaning you have it too and can directly type this
command into your <code>R</code> console).</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/head.html" class="external-link">head</a></span><span class="op">(</span><span class="va">mtcars</span><span class="op">)</span></span></code></pre></div>
<pre><code><span><span class="co">##                    mpg cyl disp  hp drat    wt  qsec vs am gear carb</span></span>
<span><span class="co">## Mazda RX4         21.0   6  160 110 3.90 2.620 16.46  0  1    4    4</span></span>
<span><span class="co">## Mazda RX4 Wag     21.0   6  160 110 3.90 2.875 17.02  0  1    4    4</span></span>
<span><span class="co">## Datsun 710        22.8   4  108  93 3.85 2.320 18.61  1  1    4    1</span></span>
<span><span class="co">## Hornet 4 Drive    21.4   6  258 110 3.08 3.215 19.44  1  0    3    1</span></span>
<span><span class="co">## Hornet Sportabout 18.7   8  360 175 3.15 3.440 17.02  0  0    3    2</span></span>
<span><span class="co">## Valiant           18.1   6  225 105 2.76 3.460 20.22  1  0    3    1</span></span></code></pre>
<p>Load the <code>rempsyc</code> package:</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://rempsyc.remi-theriault.com">rempsyc</a></span><span class="op">)</span></span></code></pre></div>
<blockquote>
<p><strong><em>Note:</em></strong> If you havenâ€™t installed this package
yet, you will need to install it via the following command:
<code>install.packages("rempsyc")</code>.</p>
</blockquote>
<p>For moderations and simple slopes, we usually want to standardize (or
at least center) our variables.</p>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">mtcars2</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/lapply.html" class="external-link">lapply</a></span><span class="op">(</span><span class="va">mtcars</span>, <span class="va">scale</span><span class="op">)</span> <span class="op">|&gt;</span> <span class="fu"><a href="https://rdrr.io/r/base/as.data.frame.html" class="external-link">as.data.frame</a></span><span class="op">(</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="simple-moderation-nice_mod">Simple moderation: <code>nice_mod</code><a class="anchor" aria-label="anchor" href="#simple-moderation-nice_mod"></a>
</h2>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">moderations</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/nice_mod.html">nice_mod</a></span><span class="op">(</span></span>
<span>  data <span class="op">=</span> <span class="va">mtcars2</span>,</span>
<span>  response <span class="op">=</span> <span class="st">"mpg"</span>,</span>
<span>  predictor <span class="op">=</span> <span class="st">"gear"</span>,</span>
<span>  moderator <span class="op">=</span> <span class="st">"wt"</span><span class="op">)</span></span>
<span><span class="va">moderations</span></span></code></pre></div>
<pre><code><span><span class="co">##   Dependent Variable Predictor df           B          t            p</span></span>
<span><span class="co">## 1                mpg      gear 28 -0.08718042 -0.7982999 4.314156e-01</span></span>
<span><span class="co">## 2                mpg        wt 28 -0.94959988 -8.6037724 2.383144e-09</span></span>
<span><span class="co">## 3                mpg   gear:wt 28 -0.23559962 -2.1551077 3.989970e-02</span></span>
<span><span class="co">##           sr2     CI_lower   CI_upper</span></span>
<span><span class="co">## 1 0.004805465 0.0000000000 0.02702141</span></span>
<span><span class="co">## 2 0.558188818 0.3142326391 0.80214500</span></span>
<span><span class="co">## 3 0.035022025 0.0003502202 0.09723370</span></span></code></pre>
<p>If we want it to look nice</p>
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="op">(</span><span class="va">my_table</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/nice_table.html">nice_table</a></span><span class="op">(</span><span class="va">moderations</span>, highlight <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
<div class="tabwid">
<style>.cl-2939d26e{table-layout:auto;}.cl-29138438{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-29138439{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2913843a{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-2913843b{font-family:'Times New Roman';font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-292f4aec{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-292f4aed{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-292f71f2{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-292f71f3{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-292f71f4{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-292f71f5{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-292f71f6{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-292f71f7{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-292f71f8{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style>
<table data-quarto-disable-processing="true" class="table cl-2939d26e">
<thead><tr style="overflow-wrap:break-word;">
<th class="cl-292f71f2"><p class="cl-292f4aec"><span class="cl-29138438">Dependent Variable</span></p></th>
<th class="cl-292f71f2"><p class="cl-292f4aec"><span class="cl-29138438">Predictor</span></p></th>
<th class="cl-292f71f2"><p class="cl-292f4aec"><span class="cl-29138439">df</span></p></th>
<th class="cl-292f71f2"><p class="cl-292f4aec"><span class="cl-29138438">Î²</span></p></th>
<th class="cl-292f71f2"><p class="cl-292f4aec"><span class="cl-29138439">t</span></p></th>
<th class="cl-292f71f2"><p class="cl-292f4aec"><span class="cl-29138439">p</span></p></th>
<th class="cl-292f71f2"><p class="cl-292f4aec"><span class="cl-29138439">sr</span><span class="cl-2913843a">2</span></p></th>
<th class="cl-292f71f2"><p class="cl-292f4aec"><span class="cl-29138438">95% CI</span></p></th>
</tr></thead>
<tbody>
<tr style="overflow-wrap:break-word;">
<td rowspan="3" class="cl-292f71f3"><p class="cl-292f4aed"><span class="cl-29138438">mpg</span></p></td>
<td class="cl-292f71f4"><p class="cl-292f4aec"><span class="cl-29138438">gear</span></p></td>
<td class="cl-292f71f4"><p class="cl-292f4aec"><span class="cl-29138438">28</span></p></td>
<td class="cl-292f71f4"><p class="cl-292f4aec"><span class="cl-29138438">-0.09</span></p></td>
<td class="cl-292f71f4"><p class="cl-292f4aec"><span class="cl-29138438">-0.80</span></p></td>
<td class="cl-292f71f4"><p class="cl-292f4aec"><span class="cl-29138438">.431</span></p></td>
<td class="cl-292f71f4"><p class="cl-292f4aec"><span class="cl-29138438">.00</span></p></td>
<td class="cl-292f71f4"><p class="cl-292f4aec"><span class="cl-29138438">[0.00, 0.03]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-292f71f6"><p class="cl-292f4aec"><span class="cl-2913843b">wt</span></p></td>
<td class="cl-292f71f6"><p class="cl-292f4aec"><span class="cl-2913843b">28</span></p></td>
<td class="cl-292f71f6"><p class="cl-292f4aec"><span class="cl-2913843b">-0.95</span></p></td>
<td class="cl-292f71f6"><p class="cl-292f4aec"><span class="cl-2913843b">-8.60</span></p></td>
<td class="cl-292f71f6"><p class="cl-292f4aec"><span class="cl-2913843b">&lt; .001***</span></p></td>
<td class="cl-292f71f6"><p class="cl-292f4aec"><span class="cl-2913843b">.56</span></p></td>
<td class="cl-292f71f6"><p class="cl-292f4aec"><span class="cl-2913843b">[0.31, 0.80]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-292f71f8"><p class="cl-292f4aec"><span class="cl-2913843b">gear Ã— wt</span></p></td>
<td class="cl-292f71f8"><p class="cl-292f4aec"><span class="cl-2913843b">28</span></p></td>
<td class="cl-292f71f8"><p class="cl-292f4aec"><span class="cl-2913843b">-0.24</span></p></td>
<td class="cl-292f71f8"><p class="cl-292f4aec"><span class="cl-2913843b">-2.16</span></p></td>
<td class="cl-292f71f8"><p class="cl-292f4aec"><span class="cl-2913843b">.040*</span></p></td>
<td class="cl-292f71f8"><p class="cl-292f4aec"><span class="cl-2913843b">.04</span></p></td>
<td class="cl-292f71f8"><p class="cl-292f4aec"><span class="cl-2913843b">[0.00, 0.10]</span></p></td>
</tr>
</tbody>
</table>
</div>
<blockquote>
<p><strong><em>Note:</em></strong> The sr2 (semi-partial correlation
squared, <a href="https://rdrr.io/cran/rockchalk/man/getDeltaRsquare.html" class="external-link">also
known as delta R-square</a>) allows us to quantify the unique
contribution (proportion of variance explained) of an independent
variable on the dependent variable, over and above the other variables
in the model. sr2 is often considered a better indicator of the
practical relevance of a variable.</p>
</blockquote>
<div class="section level3">
<h3 id="save-table-to-word">Save table to Word<a class="anchor" aria-label="anchor" href="#save-table-to-word"></a>
</h3>
<p>Letâ€™s save it to word for use in a publication (optional).</p>
<div class="sourceCode" id="cb8"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu">flextable</span><span class="fu">::</span><span class="fu"><a href="https://davidgohel.github.io/flextable/reference/save_as_docx.html" class="external-link">save_as_docx</a></span><span class="op">(</span><span class="va">my_table</span>, path <span class="op">=</span> <span class="st">"moderations.docx"</span><span class="op">)</span></span></code></pre></div>
</div>
</div>
<div class="section level2">
<h2 id="simple-slopes-nice_slopes">Simple slopes: <code>nice_slopes</code><a class="anchor" aria-label="anchor" href="#simple-slopes-nice_slopes"></a>
</h2>
<p>Letâ€™s extract the simple slopes now, including the sr2.</p>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">slopes</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/nice_slopes.html">nice_slopes</a></span><span class="op">(</span></span>
<span>  data <span class="op">=</span> <span class="va">mtcars2</span>,</span>
<span>  response <span class="op">=</span> <span class="st">"mpg"</span>,</span>
<span>  predictor <span class="op">=</span> <span class="st">"gear"</span>,</span>
<span>  moderator <span class="op">=</span> <span class="st">"wt"</span><span class="op">)</span></span>
<span><span class="va">slopes</span></span></code></pre></div>
<pre><code><span><span class="co">##   Dependent Variable Predictor (+/-1 SD) df           B          t          p</span></span>
<span><span class="co">## 1                mpg       gear (LOW-wt) 28  0.14841920  1.0767040 0.29080233</span></span>
<span><span class="co">## 2                mpg      gear (MEAN-wt) 28 -0.08718042 -0.7982999 0.43141565</span></span>
<span><span class="co">## 3                mpg      gear (HIGH-wt) 28 -0.32278004 -1.9035367 0.06729622</span></span>
<span><span class="co">##           sr2 CI_lower   CI_upper</span></span>
<span><span class="co">## 1 0.008741702        0 0.03886052</span></span>
<span><span class="co">## 2 0.004805465        0 0.02702141</span></span>
<span><span class="co">## 3 0.027322839        0 0.08179662</span></span></code></pre>
<div class="sourceCode" id="cb11"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/nice_table.html">nice_table</a></span><span class="op">(</span><span class="va">slopes</span>, highlight <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<div class="tabwid">
<style>.cl-29964a76{table-layout:auto;}.cl-298532d6{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-298532d7{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-298532d8{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-298b73ee{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-298b73ef{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-298b9afe{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-298b9aff{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-298b9b00{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-298b9b01{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-298b9b02{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style>
<table data-quarto-disable-processing="true" class="table cl-29964a76">
<thead><tr style="overflow-wrap:break-word;">
<th class="cl-298b9afe"><p class="cl-298b73ee"><span class="cl-298532d6">Dependent Variable</span></p></th>
<th class="cl-298b9afe"><p class="cl-298b73ee"><span class="cl-298532d6">Predictor (+/-1 </span><span class="cl-298532d7">SD</span><span class="cl-298532d6">)</span></p></th>
<th class="cl-298b9afe"><p class="cl-298b73ee"><span class="cl-298532d7">df</span></p></th>
<th class="cl-298b9afe"><p class="cl-298b73ee"><span class="cl-298532d6">Î²</span></p></th>
<th class="cl-298b9afe"><p class="cl-298b73ee"><span class="cl-298532d7">t</span></p></th>
<th class="cl-298b9afe"><p class="cl-298b73ee"><span class="cl-298532d7">p</span></p></th>
<th class="cl-298b9afe"><p class="cl-298b73ee"><span class="cl-298532d7">sr</span><span class="cl-298532d8">2</span></p></th>
<th class="cl-298b9afe"><p class="cl-298b73ee"><span class="cl-298532d6">95% CI</span></p></th>
</tr></thead>
<tbody>
<tr style="overflow-wrap:break-word;">
<td rowspan="3" class="cl-298b9aff"><p class="cl-298b73ef"><span class="cl-298532d6">mpg</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">gear (LOW-wt)</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">28</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">0.15</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">1.08</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">.291</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">.01</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">[0.00, 0.04]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">gear (MEAN-wt)</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">28</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">-0.09</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">-0.80</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">.431</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">.00</span></p></td>
<td class="cl-298b9b00"><p class="cl-298b73ee"><span class="cl-298532d6">[0.00, 0.03]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-298b9b02"><p class="cl-298b73ee"><span class="cl-298532d6">gear (HIGH-wt)</span></p></td>
<td class="cl-298b9b02"><p class="cl-298b73ee"><span class="cl-298532d6">28</span></p></td>
<td class="cl-298b9b02"><p class="cl-298b73ee"><span class="cl-298532d6">-0.32</span></p></td>
<td class="cl-298b9b02"><p class="cl-298b73ee"><span class="cl-298532d6">-1.90</span></p></td>
<td class="cl-298b9b02"><p class="cl-298b73ee"><span class="cl-298532d6">.067</span></p></td>
<td class="cl-298b9b02"><p class="cl-298b73ee"><span class="cl-298532d6">.03</span></p></td>
<td class="cl-298b9b02"><p class="cl-298b73ee"><span class="cl-298532d6">[0.00, 0.08]</span></p></td>
</tr>
</tbody>
</table>
</div>
<p>In this specific case, the interaction is significant but none of the
simple slopes. This means that although the two slopes are significantly
different from each other, taken individually, the slopes arenâ€™t
significantly different from a straight line.</p>
<p>The neat thing is that you can add as many dependent variables at
once as you want.</p>
<div class="sourceCode" id="cb12"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># Moderations</span></span>
<span><span class="fu"><a href="../reference/nice_mod.html">nice_mod</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">mtcars2</span>,</span>
<span>         response <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"mpg"</span>, <span class="st">"disp"</span>, <span class="st">"hp"</span><span class="op">)</span>,</span>
<span>         predictor <span class="op">=</span> <span class="st">"gear"</span>,</span>
<span>         moderator <span class="op">=</span> <span class="st">"wt"</span><span class="op">)</span> <span class="op">|&gt;</span></span>
<span>  <span class="fu"><a href="../reference/nice_table.html">nice_table</a></span><span class="op">(</span>highlight <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<div class="tabwid">
<style>.cl-29eb5066{table-layout:auto;}.cl-29d7cb40{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-29d7cb41{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-29d7cb42{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-29d7cb43{font-family:'Times New Roman';font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-29e00756{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-29e00757{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-29e02e5c{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-29e02e5d{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-29e02e5e{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-29e02e5f{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-29e02e60{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-29e02e61{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-29e02e62{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-29e02e63{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-29e02e64{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-29e02e65{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-29e02e66{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-29e05562{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style>
<table data-quarto-disable-processing="true" class="table cl-29eb5066">
<thead><tr style="overflow-wrap:break-word;">
<th class="cl-29e02e5c"><p class="cl-29e00756"><span class="cl-29d7cb40">Dependent Variable</span></p></th>
<th class="cl-29e02e5c"><p class="cl-29e00756"><span class="cl-29d7cb40">Predictor</span></p></th>
<th class="cl-29e02e5c"><p class="cl-29e00756"><span class="cl-29d7cb41">df</span></p></th>
<th class="cl-29e02e5c"><p class="cl-29e00756"><span class="cl-29d7cb40">Î²</span></p></th>
<th class="cl-29e02e5c"><p class="cl-29e00756"><span class="cl-29d7cb41">t</span></p></th>
<th class="cl-29e02e5c"><p class="cl-29e00756"><span class="cl-29d7cb41">p</span></p></th>
<th class="cl-29e02e5c"><p class="cl-29e00756"><span class="cl-29d7cb41">sr</span><span class="cl-29d7cb42">2</span></p></th>
<th class="cl-29e02e5c"><p class="cl-29e00756"><span class="cl-29d7cb40">95% CI</span></p></th>
</tr></thead>
<tbody>
<tr style="overflow-wrap:break-word;">
<td rowspan="3" class="cl-29e02e5d"><p class="cl-29e00757"><span class="cl-29d7cb40">mpg</span></p></td>
<td class="cl-29e02e5e"><p class="cl-29e00756"><span class="cl-29d7cb40">gear</span></p></td>
<td class="cl-29e02e5e"><p class="cl-29e00756"><span class="cl-29d7cb40">28</span></p></td>
<td class="cl-29e02e5e"><p class="cl-29e00756"><span class="cl-29d7cb40">-0.09</span></p></td>
<td class="cl-29e02e5e"><p class="cl-29e00756"><span class="cl-29d7cb40">-0.80</span></p></td>
<td class="cl-29e02e5e"><p class="cl-29e00756"><span class="cl-29d7cb40">.431</span></p></td>
<td class="cl-29e02e5e"><p class="cl-29e00756"><span class="cl-29d7cb40">.00</span></p></td>
<td class="cl-29e02e5e"><p class="cl-29e00756"><span class="cl-29d7cb40">[0.00, 0.03]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">wt</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">28</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">-0.95</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">-8.60</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">&lt; .001***</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">.56</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">[0.31, 0.80]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-29e02e62"><p class="cl-29e00756"><span class="cl-29d7cb43">gear Ã— wt</span></p></td>
<td class="cl-29e02e62"><p class="cl-29e00756"><span class="cl-29d7cb43">28</span></p></td>
<td class="cl-29e02e62"><p class="cl-29e00756"><span class="cl-29d7cb43">-0.24</span></p></td>
<td class="cl-29e02e62"><p class="cl-29e00756"><span class="cl-29d7cb43">-2.16</span></p></td>
<td class="cl-29e02e62"><p class="cl-29e00756"><span class="cl-29d7cb43">.040*</span></p></td>
<td class="cl-29e02e62"><p class="cl-29e00756"><span class="cl-29d7cb43">.04</span></p></td>
<td class="cl-29e02e62"><p class="cl-29e00756"><span class="cl-29d7cb43">[0.00, 0.10]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td rowspan="3" class="cl-29e02e63"><p class="cl-29e00757"><span class="cl-29d7cb40">disp</span></p></td>
<td class="cl-29e02e64"><p class="cl-29e00756"><span class="cl-29d7cb40">gear</span></p></td>
<td class="cl-29e02e64"><p class="cl-29e00756"><span class="cl-29d7cb40">28</span></p></td>
<td class="cl-29e02e64"><p class="cl-29e00756"><span class="cl-29d7cb40">-0.07</span></p></td>
<td class="cl-29e02e64"><p class="cl-29e00756"><span class="cl-29d7cb40">-0.70</span></p></td>
<td class="cl-29e02e64"><p class="cl-29e00756"><span class="cl-29d7cb40">.492</span></p></td>
<td class="cl-29e02e64"><p class="cl-29e00756"><span class="cl-29d7cb40">.00</span></p></td>
<td class="cl-29e02e64"><p class="cl-29e00756"><span class="cl-29d7cb40">[0.00, 0.02]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">wt</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">28</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">0.83</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">7.67</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">&lt; .001***</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">.43</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">[0.19, 0.67]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">gear Ã— wt</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">28</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">-0.09</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">-0.81</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">.422</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">.00</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">[0.00, 0.03]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td rowspan="3" class="cl-29e02e66"><p class="cl-29e00757"><span class="cl-29d7cb43">hp</span></p></td>
<td class="cl-29e05562"><p class="cl-29e00756"><span class="cl-29d7cb43">gear</span></p></td>
<td class="cl-29e05562"><p class="cl-29e00756"><span class="cl-29d7cb43">28</span></p></td>
<td class="cl-29e05562"><p class="cl-29e00756"><span class="cl-29d7cb43">0.42</span></p></td>
<td class="cl-29e05562"><p class="cl-29e00756"><span class="cl-29d7cb43">2.65</span></p></td>
<td class="cl-29e05562"><p class="cl-29e00756"><span class="cl-29d7cb43">.013*</span></p></td>
<td class="cl-29e05562"><p class="cl-29e00756"><span class="cl-29d7cb43">.11</span></p></td>
<td class="cl-29e05562"><p class="cl-29e00756"><span class="cl-29d7cb43">[0.00, 0.27]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">wt</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">28</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">0.93</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">5.75</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">&lt; .001***</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">.53</span></p></td>
<td class="cl-29e02e60"><p class="cl-29e00756"><span class="cl-29d7cb43">[0.29, 0.77]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">gear Ã— wt</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">28</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">0.15</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">0.96</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">.346</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">.01</span></p></td>
<td class="cl-29e02e65"><p class="cl-29e00756"><span class="cl-29d7cb40">[0.00, 0.07]</span></p></td>
</tr>
</tbody>
</table>
</div>
<div class="sourceCode" id="cb13"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># Simple slopes</span></span>
<span><span class="fu"><a href="../reference/nice_slopes.html">nice_slopes</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">mtcars2</span>,</span>
<span>            response <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"mpg"</span>, <span class="st">"disp"</span>, <span class="st">"hp"</span><span class="op">)</span>,</span>
<span>            predictor <span class="op">=</span> <span class="st">"gear"</span>,</span>
<span>            moderator <span class="op">=</span> <span class="st">"wt"</span><span class="op">)</span> <span class="op">|&gt;</span> </span>
<span>  <span class="fu"><a href="../reference/nice_table.html">nice_table</a></span><span class="op">(</span>highlight <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<div class="tabwid">
<style>.cl-2a65b13a{table-layout:auto;}.cl-2a522c64{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2a522c65{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2a522c66{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-2a522c67{font-family:'Times New Roman';font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2a5a1a64{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2a5a1a65{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2a5a416a{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2a5a416b{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2a5a416c{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2a5a416d{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2a5a416e{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2a5a416f{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2a5a4170{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2a5a4171{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2a5a4172{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2a5a4173{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2a5a4174{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style>
<table data-quarto-disable-processing="true" class="table cl-2a65b13a">
<thead><tr style="overflow-wrap:break-word;">
<th class="cl-2a5a416a"><p class="cl-2a5a1a64"><span class="cl-2a522c64">Dependent Variable</span></p></th>
<th class="cl-2a5a416a"><p class="cl-2a5a1a64"><span class="cl-2a522c64">Predictor (+/-1 </span><span class="cl-2a522c65">SD</span><span class="cl-2a522c64">)</span></p></th>
<th class="cl-2a5a416a"><p class="cl-2a5a1a64"><span class="cl-2a522c65">df</span></p></th>
<th class="cl-2a5a416a"><p class="cl-2a5a1a64"><span class="cl-2a522c64">Î²</span></p></th>
<th class="cl-2a5a416a"><p class="cl-2a5a1a64"><span class="cl-2a522c65">t</span></p></th>
<th class="cl-2a5a416a"><p class="cl-2a5a1a64"><span class="cl-2a522c65">p</span></p></th>
<th class="cl-2a5a416a"><p class="cl-2a5a1a64"><span class="cl-2a522c65">sr</span><span class="cl-2a522c66">2</span></p></th>
<th class="cl-2a5a416a"><p class="cl-2a5a1a64"><span class="cl-2a522c64">95% CI</span></p></th>
</tr></thead>
<tbody>
<tr style="overflow-wrap:break-word;">
<td rowspan="3" class="cl-2a5a416b"><p class="cl-2a5a1a65"><span class="cl-2a522c64">mpg</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">gear (LOW-wt)</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">28</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">0.15</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">1.08</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.291</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.01</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">[0.00, 0.04]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">gear (MEAN-wt)</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">28</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">-0.09</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">-0.80</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.431</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.00</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">[0.00, 0.03]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">gear (HIGH-wt)</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">28</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">-0.32</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">-1.90</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.067</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.03</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">[0.00, 0.08]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td rowspan="3" class="cl-2a5a416f"><p class="cl-2a5a1a65"><span class="cl-2a522c64">disp</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">gear (LOW-wt)</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">28</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">0.01</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">0.09</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.926</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.00</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">[0.00, 0.00]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">gear (MEAN-wt)</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">28</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">-0.07</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">-0.70</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.492</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.00</span></p></td>
<td class="cl-2a5a416c"><p class="cl-2a5a1a64"><span class="cl-2a522c64">[0.00, 0.02]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">gear (HIGH-wt)</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">28</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">-0.16</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">-0.97</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.339</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.01</span></p></td>
<td class="cl-2a5a416e"><p class="cl-2a5a1a64"><span class="cl-2a522c64">[0.00, 0.03]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td rowspan="3" class="cl-2a5a416f"><p class="cl-2a5a1a65"><span class="cl-2a522c64">hp</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">gear (LOW-wt)</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">28</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">0.27</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">1.34</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.190</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">.03</span></p></td>
<td class="cl-2a5a4170"><p class="cl-2a5a1a64"><span class="cl-2a522c64">[0.00, 0.11]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2a5a4172"><p class="cl-2a5a1a64"><span class="cl-2a522c67">gear (MEAN-wt)</span></p></td>
<td class="cl-2a5a4172"><p class="cl-2a5a1a64"><span class="cl-2a522c67">28</span></p></td>
<td class="cl-2a5a4172"><p class="cl-2a5a1a64"><span class="cl-2a522c67">0.42</span></p></td>
<td class="cl-2a5a4172"><p class="cl-2a5a1a64"><span class="cl-2a522c67">2.65</span></p></td>
<td class="cl-2a5a4172"><p class="cl-2a5a1a64"><span class="cl-2a522c67">.013*</span></p></td>
<td class="cl-2a5a4172"><p class="cl-2a5a1a64"><span class="cl-2a522c67">.11</span></p></td>
<td class="cl-2a5a4172"><p class="cl-2a5a1a64"><span class="cl-2a522c67">[0.00, 0.27]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2a5a4174"><p class="cl-2a5a1a64"><span class="cl-2a522c67">gear (HIGH-wt)</span></p></td>
<td class="cl-2a5a4174"><p class="cl-2a5a1a64"><span class="cl-2a522c67">28</span></p></td>
<td class="cl-2a5a4174"><p class="cl-2a5a1a64"><span class="cl-2a522c67">0.58</span></p></td>
<td class="cl-2a5a4174"><p class="cl-2a5a1a64"><span class="cl-2a522c67">2.33</span></p></td>
<td class="cl-2a5a4174"><p class="cl-2a5a1a64"><span class="cl-2a522c67">.027*</span></p></td>
<td class="cl-2a5a4174"><p class="cl-2a5a1a64"><span class="cl-2a522c67">.09</span></p></td>
<td class="cl-2a5a4174"><p class="cl-2a5a1a64"><span class="cl-2a522c67">[0.00, 0.22]</span></p></td>
</tr>
</tbody>
</table>
</div>
<blockquote>
<p><strong>Pro tip</strong>: Both the <code><a href="../reference/nice_mod.html">nice_mod()</a></code> and
<code><a href="../reference/nice_slopes.html">nice_slopes()</a></code> functions take the same argument, so you can
just copy-paste the first and change the function call to save time!</p>
</blockquote>
</div>
<div class="section level2">
<h2 id="special-cases">Special cases<a class="anchor" aria-label="anchor" href="#special-cases"></a>
</h2>
<div class="section level3">
<h3 id="covariates">Covariates<a class="anchor" aria-label="anchor" href="#covariates"></a>
</h3>
<p>You can also have more complicated models, like with added
covariates.</p>
<div class="section level4">
<h4 id="moderations">Moderations<a class="anchor" aria-label="anchor" href="#moderations"></a>
</h4>
<div class="sourceCode" id="cb14"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/nice_mod.html">nice_mod</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">mtcars2</span>,</span>
<span>         response <span class="op">=</span> <span class="st">"mpg"</span>,</span>
<span>         predictor <span class="op">=</span> <span class="st">"gear"</span>,</span>
<span>         moderator <span class="op">=</span> <span class="st">"wt"</span>,</span>
<span>         covariates <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"am"</span>, <span class="st">"vs"</span><span class="op">)</span><span class="op">)</span> <span class="op">|&gt;</span> </span>
<span>  <span class="fu"><a href="../reference/nice_table.html">nice_table</a></span><span class="op">(</span>highlight <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<div class="tabwid">
<style>.cl-2aacad38{table-layout:auto;}.cl-2a9be6a6{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2a9be6a7{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2a9be6a8{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-2a9be6a9{font-family:'Times New Roman';font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2aa27552{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2aa27553{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2aa29c4e{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2aa29c4f{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2aa29c50{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2aa29c51{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2aa29c52{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2aa29c53{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2aa29c54{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2aa29c55{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style>
<table data-quarto-disable-processing="true" class="table cl-2aacad38">
<thead><tr style="overflow-wrap:break-word;">
<th class="cl-2aa29c4e"><p class="cl-2aa27552"><span class="cl-2a9be6a6">Dependent Variable</span></p></th>
<th class="cl-2aa29c4e"><p class="cl-2aa27552"><span class="cl-2a9be6a6">Predictor</span></p></th>
<th class="cl-2aa29c4e"><p class="cl-2aa27552"><span class="cl-2a9be6a7">df</span></p></th>
<th class="cl-2aa29c4e"><p class="cl-2aa27552"><span class="cl-2a9be6a6">Î²</span></p></th>
<th class="cl-2aa29c4e"><p class="cl-2aa27552"><span class="cl-2a9be6a7">t</span></p></th>
<th class="cl-2aa29c4e"><p class="cl-2aa27552"><span class="cl-2a9be6a7">p</span></p></th>
<th class="cl-2aa29c4e"><p class="cl-2aa27552"><span class="cl-2a9be6a7">sr</span><span class="cl-2a9be6a8">2</span></p></th>
<th class="cl-2aa29c4e"><p class="cl-2aa27552"><span class="cl-2a9be6a6">95% CI</span></p></th>
</tr></thead>
<tbody>
<tr style="overflow-wrap:break-word;">
<td rowspan="5" class="cl-2aa29c4f"><p class="cl-2aa27553"><span class="cl-2a9be6a6">mpg</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">gear</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">26</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">-0.11</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">-0.88</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">.388</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">.00</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">[0.00, 0.02]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">wt</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">26</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">-0.70</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">-5.07</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">&lt; .001***</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">.15</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">[0.02, 0.28]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">am</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">26</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">0.13</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">0.86</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">.399</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">.00</span></p></td>
<td class="cl-2aa29c50"><p class="cl-2aa27552"><span class="cl-2a9be6a6">[0.00, 0.02]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">vs</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">26</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">0.32</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">3.24</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">.003**</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">.06</span></p></td>
<td class="cl-2aa29c52"><p class="cl-2aa27552"><span class="cl-2a9be6a9">[0.00, 0.14]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2aa29c55"><p class="cl-2aa27552"><span class="cl-2a9be6a9">gear Ã— wt</span></p></td>
<td class="cl-2aa29c55"><p class="cl-2aa27552"><span class="cl-2a9be6a9">26</span></p></td>
<td class="cl-2aa29c55"><p class="cl-2aa27552"><span class="cl-2a9be6a9">-0.25</span></p></td>
<td class="cl-2aa29c55"><p class="cl-2aa27552"><span class="cl-2a9be6a9">-2.56</span></p></td>
<td class="cl-2aa29c55"><p class="cl-2aa27552"><span class="cl-2a9be6a9">.017*</span></p></td>
<td class="cl-2aa29c55"><p class="cl-2aa27552"><span class="cl-2a9be6a9">.04</span></p></td>
<td class="cl-2aa29c55"><p class="cl-2aa27552"><span class="cl-2a9be6a9">[0.00, 0.09]</span></p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section level4">
<h4 id="simple-slopes">Simple slopes<a class="anchor" aria-label="anchor" href="#simple-slopes"></a>
</h4>
<div class="sourceCode" id="cb15"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/nice_slopes.html">nice_slopes</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">mtcars2</span>,</span>
<span>            response <span class="op">=</span> <span class="st">"mpg"</span>,</span>
<span>            predictor <span class="op">=</span> <span class="st">"gear"</span>,</span>
<span>            moderator <span class="op">=</span> <span class="st">"wt"</span>,</span>
<span>            covariates <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"am"</span>, <span class="st">"vs"</span><span class="op">)</span><span class="op">)</span> <span class="op">|&gt;</span> </span>
<span>  <span class="fu"><a href="../reference/nice_table.html">nice_table</a></span><span class="op">(</span>highlight <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<div class="tabwid">
<style>.cl-2b037212{table-layout:auto;}.cl-2af0eb10{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2af0eb11{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2af0eb12{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-2af0eb13{font-family:'Times New Roman';font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2af88af0{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2af88af1{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2af88af2{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2af88af3{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2af88af4{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2af88af5{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2af88af6{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2af88af7{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style>
<table data-quarto-disable-processing="true" class="table cl-2b037212">
<thead><tr style="overflow-wrap:break-word;">
<th class="cl-2af88af2"><p class="cl-2af88af0"><span class="cl-2af0eb10">Dependent Variable</span></p></th>
<th class="cl-2af88af2"><p class="cl-2af88af0"><span class="cl-2af0eb10">Predictor (+/-1 </span><span class="cl-2af0eb11">SD</span><span class="cl-2af0eb10">)</span></p></th>
<th class="cl-2af88af2"><p class="cl-2af88af0"><span class="cl-2af0eb11">df</span></p></th>
<th class="cl-2af88af2"><p class="cl-2af88af0"><span class="cl-2af0eb10">Î²</span></p></th>
<th class="cl-2af88af2"><p class="cl-2af88af0"><span class="cl-2af0eb11">t</span></p></th>
<th class="cl-2af88af2"><p class="cl-2af88af0"><span class="cl-2af0eb11">p</span></p></th>
<th class="cl-2af88af2"><p class="cl-2af88af0"><span class="cl-2af0eb11">sr</span><span class="cl-2af0eb12">2</span></p></th>
<th class="cl-2af88af2"><p class="cl-2af88af0"><span class="cl-2af0eb10">95% CI</span></p></th>
</tr></thead>
<tbody>
<tr style="overflow-wrap:break-word;">
<td rowspan="3" class="cl-2af88af3"><p class="cl-2af88af1"><span class="cl-2af0eb10">mpg</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">gear (LOW-wt)</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">26</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">0.14</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">0.89</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">.383</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">.00</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">[0.00, 0.02]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">gear (MEAN-wt)</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">26</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">-0.11</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">-0.88</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">.388</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">.00</span></p></td>
<td class="cl-2af88af4"><p class="cl-2af88af0"><span class="cl-2af0eb10">[0.00, 0.02]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2af88af7"><p class="cl-2af88af0"><span class="cl-2af0eb13">gear (HIGH-wt)</span></p></td>
<td class="cl-2af88af7"><p class="cl-2af88af0"><span class="cl-2af0eb13">26</span></p></td>
<td class="cl-2af88af7"><p class="cl-2af88af0"><span class="cl-2af0eb13">-0.36</span></p></td>
<td class="cl-2af88af7"><p class="cl-2af88af0"><span class="cl-2af0eb13">-2.25</span></p></td>
<td class="cl-2af88af7"><p class="cl-2af88af0"><span class="cl-2af0eb13">.033*</span></p></td>
<td class="cl-2af88af7"><p class="cl-2af88af0"><span class="cl-2af0eb13">.03</span></p></td>
<td class="cl-2af88af7"><p class="cl-2af88af0"><span class="cl-2af0eb13">[0.00, 0.08]</span></p></td>
</tr>
</tbody>
</table>
</div>
<p>In this case, only the third row is significant, which means that
those who are high on the <code>wt</code> variable (above one standard
deviation) have significantly lower <code>mpg</code> the higher their
gear. We can plot this in the more traditional way:</p>
<div class="sourceCode" id="cb16"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># First need to define model for plot function</span></span>
<span><span class="va">mod</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">mpg</span> <span class="op">~</span> <span class="va">gear</span> <span class="op">*</span> <span class="va">wt</span> <span class="op">+</span> <span class="va">am</span> <span class="op">+</span> <span class="va">vs</span>, data <span class="op">=</span> <span class="va">mtcars2</span><span class="op">)</span></span>
<span></span>
<span><span class="co"># Plot the model</span></span>
<span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://interactions.jacob-long.com" class="external-link">interactions</a></span><span class="op">)</span></span>
<span><span class="fu"><a href="https://interactions.jacob-long.com/reference/interact_plot.html" class="external-link">interact_plot</a></span><span class="op">(</span><span class="va">mod</span>, pred <span class="op">=</span> <span class="st">"gear"</span>, modx <span class="op">=</span> <span class="st">"wt"</span>, interval <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<p><img src="moderation_files/figure-html/unnamed-chunk-11-1.png" width="70%"></p>
<blockquote>
<p><strong><em>Note:</em></strong> If you havenâ€™t installed this package
yet, you will need to install it via the following command:
<code>install.packages(interactions)</code>. Furthermore, know that this
plot can be heavily customized with available arguments for publication
purposes, but I wonâ€™t be going into these details here.</p>
</blockquote>
</div>
</div>
<div class="section level3">
<h3 id="three-way-interaction">Three-way interaction<a class="anchor" aria-label="anchor" href="#three-way-interaction"></a>
</h3>
<p>Letâ€™s make a three-way interaction for example.</p>
<p>Note that for the simple slopes, for now, the second moderator needs
to be a dichotomic variable (and the first moderator a continuous
variable). Weâ€™ll reset the am variable for this purpose for now.</p>
<div class="sourceCode" id="cb17"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">mtcars2</span><span class="op">$</span><span class="va">am</span> <span class="op">&lt;-</span> <span class="va">mtcars</span><span class="op">$</span><span class="va">am</span></span></code></pre></div>
<div class="section level4">
<h4 id="moderations-1">Moderations<a class="anchor" aria-label="anchor" href="#moderations-1"></a>
</h4>
<div class="sourceCode" id="cb18"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/nice_mod.html">nice_mod</a></span><span class="op">(</span>response <span class="op">=</span> <span class="st">"mpg"</span>,</span>
<span>         predictor <span class="op">=</span> <span class="st">"gear"</span>,</span>
<span>         moderator <span class="op">=</span> <span class="st">"disp"</span>,</span>
<span>         moderator2 <span class="op">=</span> <span class="st">"am"</span>,</span>
<span>         data <span class="op">=</span> <span class="va">mtcars2</span><span class="op">)</span> <span class="op">|&gt;</span> </span>
<span>  <span class="fu"><a href="../reference/nice_table.html">nice_table</a></span><span class="op">(</span>highlight <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<div class="tabwid">
<style>.cl-2c13cdaa{table-layout:auto;}.cl-2c010c06{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2c010c07{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2c010c08{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-2c010c09{font-family:'Times New Roman';font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2c096f04{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2c096f05{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2c099614{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c099615{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c099616{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c099617{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c099618{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c099619{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c09961a{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c09961b{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style>
<table data-quarto-disable-processing="true" class="table cl-2c13cdaa">
<thead><tr style="overflow-wrap:break-word;">
<th class="cl-2c099614"><p class="cl-2c096f04"><span class="cl-2c010c06">Dependent Variable</span></p></th>
<th class="cl-2c099614"><p class="cl-2c096f04"><span class="cl-2c010c06">Predictor</span></p></th>
<th class="cl-2c099614"><p class="cl-2c096f04"><span class="cl-2c010c07">df</span></p></th>
<th class="cl-2c099614"><p class="cl-2c096f04"><span class="cl-2c010c06">Î²</span></p></th>
<th class="cl-2c099614"><p class="cl-2c096f04"><span class="cl-2c010c07">t</span></p></th>
<th class="cl-2c099614"><p class="cl-2c096f04"><span class="cl-2c010c07">p</span></p></th>
<th class="cl-2c099614"><p class="cl-2c096f04"><span class="cl-2c010c07">sr</span><span class="cl-2c010c08">2</span></p></th>
<th class="cl-2c099614"><p class="cl-2c096f04"><span class="cl-2c010c06">95% CI</span></p></th>
</tr></thead>
<tbody>
<tr style="overflow-wrap:break-word;">
<td rowspan="7" class="cl-2c099615"><p class="cl-2c096f05"><span class="cl-2c010c06">mpg</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">gear</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">24</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">-0.43</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">-0.68</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">.500</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">.00</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">[0.00, 0.02]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">disp</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">24</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">-3.04</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">-3.16</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">.004**</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">.06</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">[0.00, 0.14]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">am</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">24</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">-0.21</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">-0.35</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">.731</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">.00</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">[0.00, 0.01]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">gear Ã— disp</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">24</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">-1.09</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">-1.09</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">.287</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">.01</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">[0.00, 0.03]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">gear Ã— am</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">24</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">1.34</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">2.41</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">.024*</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">.04</span></p></td>
<td class="cl-2c099618"><p class="cl-2c096f04"><span class="cl-2c010c09">[0.00, 0.09]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">disp Ã— am</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">24</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">-0.07</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">-0.08</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">.936</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">.00</span></p></td>
<td class="cl-2c099616"><p class="cl-2c096f04"><span class="cl-2c010c06">[0.00, 0.00]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2c09961b"><p class="cl-2c096f04"><span class="cl-2c010c09">gear Ã— disp Ã— am</span></p></td>
<td class="cl-2c09961b"><p class="cl-2c096f04"><span class="cl-2c010c09">24</span></p></td>
<td class="cl-2c09961b"><p class="cl-2c096f04"><span class="cl-2c010c09">1.90</span></p></td>
<td class="cl-2c09961b"><p class="cl-2c096f04"><span class="cl-2c010c09">2.21</span></p></td>
<td class="cl-2c09961b"><p class="cl-2c096f04"><span class="cl-2c010c09">.037*</span></p></td>
<td class="cl-2c09961b"><p class="cl-2c096f04"><span class="cl-2c010c09">.03</span></p></td>
<td class="cl-2c09961b"><p class="cl-2c096f04"><span class="cl-2c010c09">[0.00, 0.08]</span></p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section level4">
<h4 id="simple-slopes-1">Simple slopes<a class="anchor" aria-label="anchor" href="#simple-slopes-1"></a>
</h4>
<div class="sourceCode" id="cb19"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/nice_slopes.html">nice_slopes</a></span><span class="op">(</span>data <span class="op">=</span> <span class="va">mtcars2</span>,</span>
<span>            response <span class="op">=</span> <span class="st">"mpg"</span>,</span>
<span>            predictor <span class="op">=</span> <span class="st">"gear"</span>,</span>
<span>            moderator <span class="op">=</span> <span class="st">"disp"</span>,</span>
<span>            moderator2 <span class="op">=</span> <span class="st">"am"</span><span class="op">)</span> <span class="op">|&gt;</span> </span>
<span>  <span class="fu"><a href="../reference/nice_table.html">nice_table</a></span><span class="op">(</span>highlight <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<div class="tabwid">
<style>.cl-2c93827a{table-layout:auto;}.cl-2c7d8cf4{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2c7d8cf5{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2c7d8cf6{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-2c7d8cf7{font-family:'Times New Roman';font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2c866518{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2c866519{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2c868c1e{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c868c1f{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c868c20{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c868c21{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c868c22{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c868c23{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c868c24{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2c868c25{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style>
<table data-quarto-disable-processing="true" class="table cl-2c93827a">
<thead><tr style="overflow-wrap:break-word;">
<th class="cl-2c868c1e"><p class="cl-2c866518"><span class="cl-2c7d8cf4">Dependent Variable</span></p></th>
<th class="cl-2c868c1e"><p class="cl-2c866518"><span class="cl-2c7d8cf4">am</span></p></th>
<th class="cl-2c868c1e"><p class="cl-2c866518"><span class="cl-2c7d8cf4">Predictor (+/-1 </span><span class="cl-2c7d8cf5">SD</span><span class="cl-2c7d8cf4">)</span></p></th>
<th class="cl-2c868c1e"><p class="cl-2c866518"><span class="cl-2c7d8cf5">df</span></p></th>
<th class="cl-2c868c1e"><p class="cl-2c866518"><span class="cl-2c7d8cf4">Î²</span></p></th>
<th class="cl-2c868c1e"><p class="cl-2c866518"><span class="cl-2c7d8cf5">t</span></p></th>
<th class="cl-2c868c1e"><p class="cl-2c866518"><span class="cl-2c7d8cf5">p</span></p></th>
<th class="cl-2c868c1e"><p class="cl-2c866518"><span class="cl-2c7d8cf5">sr</span><span class="cl-2c7d8cf6">2</span></p></th>
<th class="cl-2c868c1e"><p class="cl-2c866518"><span class="cl-2c7d8cf4">95% CI</span></p></th>
</tr></thead>
<tbody>
<tr style="overflow-wrap:break-word;">
<td rowspan="6" class="cl-2c868c1f"><p class="cl-2c866519"><span class="cl-2c7d8cf4">mpg</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">0.00</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">gear (LOW-disp)</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">24</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">1.11</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">1.57</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">.131</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">.02</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">[0.00, 0.05]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">0.00</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">gear (MEAN-disp)</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">24</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">-1.53</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">-1.49</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">.148</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">.01</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">[0.00, 0.05]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">0.00</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">gear (HIGH-disp)</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">24</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">-4.16</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">-1.56</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">.131</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">.02</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">[0.00, 0.05]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">1.00</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">gear (LOW-disp)</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">24</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">-0.00</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">-0.01</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">.990</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">.00</span></p></td>
<td class="cl-2c868c20"><p class="cl-2c866518"><span class="cl-2c7d8cf4">[0.00, 0.00]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2c868c23"><p class="cl-2c866518"><span class="cl-2c7d8cf7">1.00</span></p></td>
<td class="cl-2c868c23"><p class="cl-2c866518"><span class="cl-2c7d8cf7">gear (MEAN-disp)</span></p></td>
<td class="cl-2c868c23"><p class="cl-2c866518"><span class="cl-2c7d8cf7">24</span></p></td>
<td class="cl-2c868c23"><p class="cl-2c866518"><span class="cl-2c7d8cf7">1.17</span></p></td>
<td class="cl-2c868c23"><p class="cl-2c866518"><span class="cl-2c7d8cf7">2.59</span></p></td>
<td class="cl-2c868c23"><p class="cl-2c866518"><span class="cl-2c7d8cf7">.016*</span></p></td>
<td class="cl-2c868c23"><p class="cl-2c866518"><span class="cl-2c7d8cf7">.04</span></p></td>
<td class="cl-2c868c23"><p class="cl-2c866518"><span class="cl-2c7d8cf7">[0.00, 0.10]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2c868c25"><p class="cl-2c866518"><span class="cl-2c7d8cf7">1.00</span></p></td>
<td class="cl-2c868c25"><p class="cl-2c866518"><span class="cl-2c7d8cf7">gear (HIGH-disp)</span></p></td>
<td class="cl-2c868c25"><p class="cl-2c866518"><span class="cl-2c7d8cf7">24</span></p></td>
<td class="cl-2c868c25"><p class="cl-2c866518"><span class="cl-2c7d8cf7">2.34</span></p></td>
<td class="cl-2c868c25"><p class="cl-2c866518"><span class="cl-2c7d8cf7">2.71</span></p></td>
<td class="cl-2c868c25"><p class="cl-2c866518"><span class="cl-2c7d8cf7">.012*</span></p></td>
<td class="cl-2c868c25"><p class="cl-2c866518"><span class="cl-2c7d8cf7">.05</span></p></td>
<td class="cl-2c868c25"><p class="cl-2c866518"><span class="cl-2c7d8cf7">[0.00, 0.11]</span></p></td>
</tr>
</tbody>
</table>
</div>
<p>2## Complex models: <code>nice_lm</code> For more complicated models
not supported by <code>nice_mod</code>, one can define the model in the
traditional way and feed it to <code>nice_lm</code> and
<code>nice_lm_slopes</code> instead. They support multiple
<code>lm</code> models as well.</p>
</div>
</div>
<div class="section level3">
<h3 id="nice_lm">
<code>nice_lm</code><a class="anchor" aria-label="anchor" href="#nice_lm"></a>
</h3>
<div class="sourceCode" id="cb20"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">model1</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">mpg</span> <span class="op">~</span> <span class="va">cyl</span> <span class="op">+</span> <span class="va">wt</span> <span class="op">*</span> <span class="va">hp</span>, <span class="va">mtcars2</span><span class="op">)</span></span>
<span><span class="va">model2</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">qsec</span> <span class="op">~</span> <span class="va">disp</span> <span class="op">+</span> <span class="va">drat</span> <span class="op">*</span> <span class="va">carb</span>, <span class="va">mtcars2</span><span class="op">)</span></span>
<span><span class="va">my.models</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="va">model1</span>, <span class="va">model2</span><span class="op">)</span></span>
<span><span class="fu"><a href="../reference/nice_lm.html">nice_lm</a></span><span class="op">(</span><span class="va">my.models</span><span class="op">)</span> <span class="op">|&gt;</span> </span>
<span>  <span class="fu"><a href="../reference/nice_table.html">nice_table</a></span><span class="op">(</span>highlight <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<div class="tabwid">
<style>.cl-2ce2e2a2{table-layout:auto;}.cl-2cd19376{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2cd19377{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2cd19378{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-2cd19379{font-family:'Times New Roman';font-size:12pt;font-weight:bold;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2cd88410{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2cd88411{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2cd8ab16{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2cd8ab17{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2cd8ab18{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2cd8ab19{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2cd8ab1a{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2cd8ab1b{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2cd8ab1c{background-color:rgba(217, 217, 217, 1.00);vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2cd8ab1d{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2cd8ab1e{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2cd8ab1f{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2cd8ab20{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style>
<table data-quarto-disable-processing="true" class="table cl-2ce2e2a2">
<thead><tr style="overflow-wrap:break-word;">
<th class="cl-2cd8ab16"><p class="cl-2cd88410"><span class="cl-2cd19376">Dependent Variable</span></p></th>
<th class="cl-2cd8ab16"><p class="cl-2cd88410"><span class="cl-2cd19376">Predictor</span></p></th>
<th class="cl-2cd8ab16"><p class="cl-2cd88410"><span class="cl-2cd19377">df</span></p></th>
<th class="cl-2cd8ab16"><p class="cl-2cd88410"><span class="cl-2cd19377">b</span></p></th>
<th class="cl-2cd8ab16"><p class="cl-2cd88410"><span class="cl-2cd19377">t</span></p></th>
<th class="cl-2cd8ab16"><p class="cl-2cd88410"><span class="cl-2cd19377">p</span></p></th>
<th class="cl-2cd8ab16"><p class="cl-2cd88410"><span class="cl-2cd19377">sr</span><span class="cl-2cd19378">2</span></p></th>
<th class="cl-2cd8ab16"><p class="cl-2cd88410"><span class="cl-2cd19376">95% CI</span></p></th>
</tr></thead>
<tbody>
<tr style="overflow-wrap:break-word;">
<td rowspan="4" class="cl-2cd8ab17"><p class="cl-2cd88411"><span class="cl-2cd19376">mpg</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">cyl</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">27</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">-0.11</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">-0.72</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">.479</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">.00</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">[0.00, 0.01]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">wt</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">27</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">-0.62</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">-5.70</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">&lt; .001***</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">.14</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">[0.02, 0.25]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">hp</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">27</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">-0.29</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">-2.40</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">.023*</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">.02</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">[0.00, 0.06]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2cd8ab1c"><p class="cl-2cd88410"><span class="cl-2cd19379">wt Ã— hp</span></p></td>
<td class="cl-2cd8ab1c"><p class="cl-2cd88410"><span class="cl-2cd19379">27</span></p></td>
<td class="cl-2cd8ab1c"><p class="cl-2cd88410"><span class="cl-2cd19379">0.29</span></p></td>
<td class="cl-2cd8ab1c"><p class="cl-2cd88410"><span class="cl-2cd19379">3.23</span></p></td>
<td class="cl-2cd8ab1c"><p class="cl-2cd88410"><span class="cl-2cd19379">.003**</span></p></td>
<td class="cl-2cd8ab1c"><p class="cl-2cd88410"><span class="cl-2cd19379">.04</span></p></td>
<td class="cl-2cd8ab1c"><p class="cl-2cd88410"><span class="cl-2cd19379">[0.00, 0.10]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td rowspan="4" class="cl-2cd8ab1d"><p class="cl-2cd88411"><span class="cl-2cd19376">qsec</span></p></td>
<td class="cl-2cd8ab1e"><p class="cl-2cd88410"><span class="cl-2cd19376">disp</span></p></td>
<td class="cl-2cd8ab1e"><p class="cl-2cd88410"><span class="cl-2cd19376">27</span></p></td>
<td class="cl-2cd8ab1e"><p class="cl-2cd88410"><span class="cl-2cd19376">-0.43</span></p></td>
<td class="cl-2cd8ab1e"><p class="cl-2cd88410"><span class="cl-2cd19376">-1.97</span></p></td>
<td class="cl-2cd8ab1e"><p class="cl-2cd88410"><span class="cl-2cd19376">.059</span></p></td>
<td class="cl-2cd8ab1e"><p class="cl-2cd88410"><span class="cl-2cd19376">.07</span></p></td>
<td class="cl-2cd8ab1e"><p class="cl-2cd88410"><span class="cl-2cd19376">[0.00, 0.20]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">drat</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">27</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">-0.33</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">-1.53</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">.138</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">.04</span></p></td>
<td class="cl-2cd8ab18"><p class="cl-2cd88410"><span class="cl-2cd19376">[0.00, 0.14]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">carb</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">27</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">-0.51</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">-3.32</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">.003**</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">.20</span></p></td>
<td class="cl-2cd8ab1a"><p class="cl-2cd88410"><span class="cl-2cd19379">[0.00, 0.41]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2cd8ab20"><p class="cl-2cd88410"><span class="cl-2cd19376">drat Ã— carb</span></p></td>
<td class="cl-2cd8ab20"><p class="cl-2cd88410"><span class="cl-2cd19376">27</span></p></td>
<td class="cl-2cd8ab20"><p class="cl-2cd88410"><span class="cl-2cd19376">-0.23</span></p></td>
<td class="cl-2cd8ab20"><p class="cl-2cd88410"><span class="cl-2cd19376">-1.08</span></p></td>
<td class="cl-2cd8ab20"><p class="cl-2cd88410"><span class="cl-2cd19376">.289</span></p></td>
<td class="cl-2cd8ab20"><p class="cl-2cd88410"><span class="cl-2cd19376">.02</span></p></td>
<td class="cl-2cd8ab20"><p class="cl-2cd88410"><span class="cl-2cd19376">[0.00, 0.09]</span></p></td>
</tr>
</tbody>
</table>
</div>
<p>The same applies to simple slopes, this time we use the
<code>nice_lm_slopes</code> function. It supports multiple
<code>lm</code> models as well, but the predictor and moderator need to
be the same for these models (the dependent variable can change).</p>
</div>
<div class="section level3">
<h3 id="nice_lm_slopes">
<code>nice_lm_slopes</code><a class="anchor" aria-label="anchor" href="#nice_lm_slopes"></a>
</h3>
<div class="sourceCode" id="cb21"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">model1</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">mpg</span> <span class="op">~</span> <span class="va">gear</span> <span class="op">*</span> <span class="va">wt</span>, <span class="va">mtcars2</span><span class="op">)</span></span>
<span><span class="va">model2</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/stats/lm.html" class="external-link">lm</a></span><span class="op">(</span><span class="va">disp</span> <span class="op">~</span> <span class="va">gear</span> <span class="op">*</span> <span class="va">wt</span>, <span class="va">mtcars2</span><span class="op">)</span></span>
<span><span class="va">my.models</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="va">model1</span>, <span class="va">model2</span><span class="op">)</span></span>
<span><span class="fu"><a href="../reference/nice_lm_slopes.html">nice_lm_slopes</a></span><span class="op">(</span><span class="va">my.models</span>, predictor <span class="op">=</span> <span class="st">"gear"</span>, moderator <span class="op">=</span> <span class="st">"wt"</span><span class="op">)</span> <span class="op">|&gt;</span> </span>
<span>  <span class="fu"><a href="../reference/nice_table.html">nice_table</a></span><span class="op">(</span>highlight <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<div class="tabwid">
<style>.cl-2d490f1e{table-layout:auto;}.cl-2d34ee1c{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2d34ee1d{font-family:'Times New Roman';font-size:12pt;font-weight:normal;font-style:italic;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;}.cl-2d34ee1e{font-family:'Times New Roman';font-size:7.2pt;font-weight:normal;font-style:normal;text-decoration:none;color:rgba(0, 0, 0, 1.00);background-color:transparent;position: relative;bottom:3.6pt;}.cl-2d3b7cb4{margin:0;text-align:center;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2d3b7cb5{margin:0;text-align:left;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);padding-bottom:5pt;padding-top:5pt;padding-left:5pt;padding-right:5pt;line-height: 2;background-color:transparent;}.cl-2d3bcaca{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2d3bcacb{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2d3bcacc{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2d3bcacd{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2d3bcace{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0 solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2d3bcacf{background-color:transparent;vertical-align: middle;border-bottom: 0.5pt solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}.cl-2d3bcad0{background-color:transparent;vertical-align: middle;border-bottom: 0 solid rgba(0, 0, 0, 1.00);border-top: 0.5pt solid rgba(0, 0, 0, 1.00);border-left: 0 solid rgba(0, 0, 0, 1.00);border-right: 0 solid rgba(0, 0, 0, 1.00);margin-bottom:0;margin-top:0;margin-left:0;margin-right:0;}</style>
<table data-quarto-disable-processing="true" class="table cl-2d490f1e">
<thead><tr style="overflow-wrap:break-word;">
<th class="cl-2d3bcaca"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">Dependent Variable</span></p></th>
<th class="cl-2d3bcaca"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">Predictor (+/-1 </span><span class="cl-2d34ee1d">SD</span><span class="cl-2d34ee1c">)</span></p></th>
<th class="cl-2d3bcaca"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1d">df</span></p></th>
<th class="cl-2d3bcaca"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1d">b</span></p></th>
<th class="cl-2d3bcaca"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1d">t</span></p></th>
<th class="cl-2d3bcaca"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1d">p</span></p></th>
<th class="cl-2d3bcaca"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1d">sr</span><span class="cl-2d34ee1e">2</span></p></th>
<th class="cl-2d3bcaca"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">95% CI</span></p></th>
</tr></thead>
<tbody>
<tr style="overflow-wrap:break-word;">
<td rowspan="3" class="cl-2d3bcacb"><p class="cl-2d3b7cb5"><span class="cl-2d34ee1c">mpg</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">gear (LOW-wt)</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">28</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">0.15</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">1.08</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.291</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.01</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">[0.00, 0.04]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">gear (MEAN-wt)</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">28</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">-0.09</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">-0.80</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.431</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.00</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">[0.00, 0.03]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">gear (HIGH-wt)</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">28</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">-0.32</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">-1.90</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.067</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.03</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">[0.00, 0.08]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td rowspan="3" class="cl-2d3bcacf"><p class="cl-2d3b7cb5"><span class="cl-2d34ee1c">disp</span></p></td>
<td class="cl-2d3bcad0"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">gear (LOW-wt)</span></p></td>
<td class="cl-2d3bcad0"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">28</span></p></td>
<td class="cl-2d3bcad0"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">0.01</span></p></td>
<td class="cl-2d3bcad0"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">0.09</span></p></td>
<td class="cl-2d3bcad0"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.926</span></p></td>
<td class="cl-2d3bcad0"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.00</span></p></td>
<td class="cl-2d3bcad0"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">[0.00, 0.00]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">gear (MEAN-wt)</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">28</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">-0.07</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">-0.70</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.492</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.00</span></p></td>
<td class="cl-2d3bcacc"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">[0.00, 0.02]</span></p></td>
</tr>
<tr style="overflow-wrap:break-word;">
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">gear (HIGH-wt)</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">28</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">-0.16</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">-0.97</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.339</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">.01</span></p></td>
<td class="cl-2d3bcace"><p class="cl-2d3b7cb4"><span class="cl-2d34ee1c">[0.00, 0.03]</span></p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section level3">
<h3 id="thanks-for-checking-in">Thanks for checking in<a class="anchor" aria-label="anchor" href="#thanks-for-checking-in"></a>
</h3>
<p>Make sure to check out this page again if you use the code after a
time or if you encounter errors, as I periodically update or improve the
code. Feel free to contact me for comments, questions, or requests to
improve this function at <a href="https://github.com/rempsyc/rempsyc/issues" class="external-link uri">https://github.com/rempsyc/rempsyc/issues</a>. See all
tutorials here: <a href="https://remi-theriault.com/tutorials" class="external-link uri">https://remi-theriault.com/tutorials</a>.</p>
</div>
</div>
  </main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
    </nav></aside>
</div>



    <footer><div class="pkgdown-footer-left">
  <p></p>
<p>Developed by <a href="https://remi-theriault.com" class="external-link">RÃ©mi ThÃ©riault</a>.</p>
</div>

<div class="pkgdown-footer-right">
  <p></p>
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.9000.</p>
</div>

    </footer>
</div>

  

  

  </body>
</html>
