Skip to content

Commit

Permalink
remove diagnostic plots from template
Browse files Browse the repository at this point in the history
  • Loading branch information
atheobold committed May 24, 2024
1 parent e0fc867 commit 1668d5f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 102 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"hash": "794423df19ecd1238ae6f9244b1c5fce",
"hash": "6cdd1e15ad83397d8ad4b828dcfb56ae",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"Your Title Goes Here! Make it fun!\"\nauthor: \"Your Name Here!\"\nformat: \n html:\n code-tools: true\neditor: visual\nembed-resources: true\nexecute: \n echo: false\n eval: false\n message: false\n warning: false\n---\n\n::: {.cell}\n\n:::\n\n\n# Introduction\n\n## Data Description\n\n## Research Question(s)\n\n# Methods\n\n## Variables\n\n## Data Visualizations\n\n\n::: {.cell layout-nrow=\"2\" layout-align=\"center\"}\n\n:::\n\n\n## Description of Relationships\n\n# Findings\n\n## One-Way ANOVA of <RESPONSE VARIABLE> and <EXPLANATORY VARIABLE>\n\n\n::: {.cell}\n\n:::\n\n\n## One-Way ANOVA of <RESPONSE VARIABLE> and <EXPLANATORY VARIABLE>\n\n\n::: {.cell}\n\n:::\n\n\n## Additive Two-Way ANOVA of <RESPONSE VARIABLE>, <EXPLANATORY VARIABLE>, AND <EXPLANATORY VARIABLE>\n\n\n::: {.cell}\n\n:::\n\n\n## Model Validity\n\n\n::: {.cell layout-nrow=\"1\"}\n\n:::\n\n::: {.cell layout-nrow=\"1\"}\n\n:::\n\n\n# Study Limitations\n\n# Conclusions\n",
"supporting": [],
"markdown": "---\ntitle: \"Your Title Goes Here! Make it fun!\"\nauthor: \"Your Name Here!\"\nformat: \n html:\n code-tools: true\neditor: visual\nembed-resources: true\nexecute: \n echo: false\n eval: false\n message: false\n warning: false\n---\n\n::: {.cell}\n\n:::\n\n\n# Introduction\n\n## Data Description\n\n## Research Question(s)\n\n# Methods\n\n## Variables\n\n## Data Visualizations\n\n\n::: {.cell layout-nrow=\"2\" layout-align=\"center\"}\n\n:::\n\n\n## Description of Relationships\n\n# Findings\n\n## One-Way ANOVA of <RESPONSE VARIABLE> and <EXPLANATORY VARIABLE>\n\n\n::: {.cell}\n\n:::\n\n\n## One-Way ANOVA of <RESPONSE VARIABLE> and <EXPLANATORY VARIABLE>\n\n\n::: {.cell}\n\n:::\n\n\n## Additive Two-Way ANOVA of <RESPONSE VARIABLE>, <EXPLANATORY VARIABLE>, AND <EXPLANATORY VARIABLE>\n\n\n::: {.cell}\n\n:::\n\n\n## Model Validity\n\n# Study Limitations\n\n# Conclusions\n",
"supporting": [
"final_project_template-313_files"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
Expand Down
59 changes: 4 additions & 55 deletions docs/project/final-project/final_project_template-313.html
Original file line number Diff line number Diff line change
Expand Up @@ -4939,7 +4939,7 @@ <h2 class="anchored" data-anchor-id="data-visualizations">Data Visualizations</h
<div>

</div>
<div class="cell quarto-layout-panel" data-layout-align="center" data-layout-nrow="2">
<div class="cell quarto-layout-panel" data-layout-nrow="2" data-layout-align="center">

</div>
</section>
Expand All @@ -4960,18 +4960,6 @@ <h2 class="anchored" data-anchor-id="additive-two-way-anova-of-and">Additive Two
</section>
<section id="model-validity" class="level2">
<h2 class="anchored" data-anchor-id="model-validity">Model Validity</h2>
<div>

</div>
<div class="cell quarto-layout-panel" data-layout-nrow="1">

</div>
<div>

</div>
<div class="cell quarto-layout-panel" data-layout-nrow="1">

</div>
</section>
</section>
<section id="study-limitations" class="level1">
Expand Down Expand Up @@ -5501,48 +5489,9 @@ <h1>Conclusions</h1>
<span id="cb1-80"><a href="#cb1-80" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-81"><a href="#cb1-81" aria-hidden="true" tabindex="-1"></a><span class="fu">## Model Validity</span></span>
<span id="cb1-82"><a href="#cb1-82" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-85"><a href="#cb1-85" aria-hidden="true" tabindex="-1"></a><span class="in">```{r}</span></span>
<span id="cb1-86"><a href="#cb1-86" aria-hidden="true" tabindex="-1"></a><span class="co">#| label: distribution-of-residuals</span></span>
<span id="cb1-87"><a href="#cb1-87" aria-hidden="true" tabindex="-1"></a><span class="co">#| layout-nrow: 1</span></span>
<span id="cb1-88"><a href="#cb1-88" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-89"><a href="#cb1-89" aria-hidden="true" tabindex="-1"></a><span class="co"># Residuals of first one-way ANOVA </span></span>
<span id="cb1-90"><a href="#cb1-90" aria-hidden="true" tabindex="-1"></a>broom<span class="sc">::</span><span class="fu">augment</span>(my_model) <span class="sc">%&gt;%</span> </span>
<span id="cb1-91"><a href="#cb1-91" aria-hidden="true" tabindex="-1"></a> <span class="fu">ggplot</span>(<span class="at">mapping =</span> <span class="fu">aes</span>(<span class="at">x =</span> .resid)) <span class="sc">+</span></span>
<span id="cb1-92"><a href="#cb1-92" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_histogram</span>() <span class="sc">+</span></span>
<span id="cb1-93"><a href="#cb1-93" aria-hidden="true" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">x =</span> <span class="st">&quot;Residual&quot;</span>)</span>
<span id="cb1-94"><a href="#cb1-94" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-95"><a href="#cb1-95" aria-hidden="true" tabindex="-1"></a><span class="co"># Residuals of second one-way ANOVA </span></span>
<span id="cb1-96"><a href="#cb1-96" aria-hidden="true" tabindex="-1"></a>broom<span class="sc">::</span><span class="fu">augment</span>(my_model) <span class="sc">%&gt;%</span> </span>
<span id="cb1-97"><a href="#cb1-97" aria-hidden="true" tabindex="-1"></a> <span class="fu">ggplot</span>(<span class="at">mapping =</span> <span class="fu">aes</span>(<span class="at">x =</span> .resid)) <span class="sc">+</span></span>
<span id="cb1-98"><a href="#cb1-98" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_histogram</span>() <span class="sc">+</span></span>
<span id="cb1-99"><a href="#cb1-99" aria-hidden="true" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">x =</span> <span class="st">&quot;Residual&quot;</span>)</span>
<span id="cb1-100"><a href="#cb1-100" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span>
<span id="cb1-101"><a href="#cb1-101" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-104"><a href="#cb1-104" aria-hidden="true" tabindex="-1"></a><span class="in">```{r}</span></span>
<span id="cb1-105"><a href="#cb1-105" aria-hidden="true" tabindex="-1"></a><span class="co">#| label: residuals-versus-fitted</span></span>
<span id="cb1-106"><a href="#cb1-106" aria-hidden="true" tabindex="-1"></a><span class="co">#| layout-nrow: 1</span></span>
<span id="cb1-107"><a href="#cb1-107" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-108"><a href="#cb1-108" aria-hidden="true" tabindex="-1"></a><span class="co"># Residuals versus fitted for first one-way ANOVA </span></span>
<span id="cb1-109"><a href="#cb1-109" aria-hidden="true" tabindex="-1"></a>broom<span class="sc">::</span><span class="fu">augment</span>(my_model) <span class="sc">%&gt;%</span> </span>
<span id="cb1-110"><a href="#cb1-110" aria-hidden="true" tabindex="-1"></a> <span class="fu">ggplot</span>(<span class="at">mapping =</span> <span class="fu">aes</span>(<span class="at">y =</span> .resid, <span class="at">x =</span> <span class="st">`</span><span class="at">&lt;NAME OF EXPLANATORY VARIABLE&gt;</span><span class="st">`</span>)) <span class="sc">+</span></span>
<span id="cb1-111"><a href="#cb1-111" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_jitter</span>() <span class="sc">+</span> </span>
<span id="cb1-112"><a href="#cb1-112" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_hline</span>(<span class="at">yintercept =</span> <span class="dv">0</span>, <span class="at">color =</span> <span class="st">&quot;red&quot;</span>, <span class="at">linewidth =</span> <span class="dv">3</span>) <span class="sc">+</span></span>
<span id="cb1-113"><a href="#cb1-113" aria-hidden="true" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">x =</span> <span class="st">&quot;&lt;NAME OF EXPLANATORY VARIABLE&gt;&quot;</span>, </span>
<span id="cb1-114"><a href="#cb1-114" aria-hidden="true" tabindex="-1"></a> <span class="at">y =</span> <span class="st">&quot;Residuals&quot;</span>)</span>
<span id="cb1-115"><a href="#cb1-115" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-116"><a href="#cb1-116" aria-hidden="true" tabindex="-1"></a><span class="co"># Residuals versus fitted for second one-way ANOVA </span></span>
<span id="cb1-117"><a href="#cb1-117" aria-hidden="true" tabindex="-1"></a>broom<span class="sc">::</span><span class="fu">augment</span>(my_model) <span class="sc">%&gt;%</span> </span>
<span id="cb1-118"><a href="#cb1-118" aria-hidden="true" tabindex="-1"></a> <span class="fu">ggplot</span>(<span class="at">mapping =</span> <span class="fu">aes</span>(<span class="at">y =</span> .resid, <span class="at">x =</span> <span class="st">`</span><span class="at">&lt;NAME OF EXPLANATORY VARIABLE&gt;</span><span class="st">`</span>)) <span class="sc">+</span></span>
<span id="cb1-119"><a href="#cb1-119" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_jitter</span>() <span class="sc">+</span> </span>
<span id="cb1-120"><a href="#cb1-120" aria-hidden="true" tabindex="-1"></a> <span class="fu">geom_hline</span>(<span class="at">yintercept =</span> <span class="dv">0</span>, <span class="at">color =</span> <span class="st">&quot;red&quot;</span>, <span class="at">linewidth =</span> <span class="dv">3</span>) <span class="sc">+</span></span>
<span id="cb1-121"><a href="#cb1-121" aria-hidden="true" tabindex="-1"></a> <span class="fu">labs</span>(<span class="at">x =</span> <span class="st">&quot;&lt;NAME OF EXPLANATORY VARIABLE&gt;&quot;</span>, </span>
<span id="cb1-122"><a href="#cb1-122" aria-hidden="true" tabindex="-1"></a> <span class="at">y =</span> <span class="st">&quot;Residuals&quot;</span>)</span>
<span id="cb1-123"><a href="#cb1-123" aria-hidden="true" tabindex="-1"></a><span class="in">```</span></span>
<span id="cb1-124"><a href="#cb1-124" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-125"><a href="#cb1-125" aria-hidden="true" tabindex="-1"></a><span class="fu"># Study Limitations</span></span>
<span id="cb1-126"><a href="#cb1-126" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-127"><a href="#cb1-127" aria-hidden="true" tabindex="-1"></a><span class="fu"># Conclusions</span></span>
</code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb1-83"><a href="#cb1-83" aria-hidden="true" tabindex="-1"></a><span class="fu"># Study Limitations</span></span>
<span id="cb1-84"><a href="#cb1-84" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb1-85"><a href="#cb1-85" aria-hidden="true" tabindex="-1"></a><span class="fu"># Conclusions</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div></div></div></div></div>
</div> <!-- /content -->
<footer class="footer">
Expand Down
6 changes: 3 additions & 3 deletions docs/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@
"href": "project/final-project/final-project-directions.html",
"title": "Final Project Guidelines",
"section": "",
"text": "For this project, you are expected to use a two-way ANOVA to investigate the relationship between one numerical response variable and two categorical explanatory variables. You are permitted to use the same dataset as your Midterm Project, so long as there are at least two categorical variables to choose from.\n\n\n\n\n\n\nDiscretizing numerical variables\n\n\n\nIf you would like to analyze a discrete numerical variable (e.g., number of pets) as a categorical variable, you will need to convert that variable into a categorical variable in R as R assumes all variables with numbers should be numerical.\nYou will need Dr. Theobold’s help to perform this task. Dr. Theobold will work with you to convert your variable as long as you request help before Thursday, March 7 at 4pm.",
"text": "For this project, you are expected to use a two-way ANOVA to investigate the relationship between one numerical response variable and two categorical explanatory variables. You are permitted to use the same dataset as your Midterm Project, so long as there are at least two categorical variables to choose from.\n\n\n\n\n\n\nDiscretizing numerical variables\n\n\n\nIf you would like to analyze a discrete numerical variable (e.g., number of pets) as a categorical variable, you will need to convert that variable into a categorical variable in R as R assumes all variables with numbers should be numerical.\nYou will need Dr. Theobold’s help to perform this task. Dr. Theobold will work with you to convert your variable as long as you request help before Friday, May 31 at 4pm.",
"crumbs": [
"Projects",
"Final Project Description"
Expand All @@ -641,7 +641,7 @@
"href": "project/final-project/final-project-directions.html#your-task",
"title": "Final Project Guidelines",
"section": "",
"text": "For this project, you are expected to use a two-way ANOVA to investigate the relationship between one numerical response variable and two categorical explanatory variables. You are permitted to use the same dataset as your Midterm Project, so long as there are at least two categorical variables to choose from.\n\n\n\n\n\n\nDiscretizing numerical variables\n\n\n\nIf you would like to analyze a discrete numerical variable (e.g., number of pets) as a categorical variable, you will need to convert that variable into a categorical variable in R as R assumes all variables with numbers should be numerical.\nYou will need Dr. Theobold’s help to perform this task. Dr. Theobold will work with you to convert your variable as long as you request help before Thursday, March 7 at 4pm.",
"text": "For this project, you are expected to use a two-way ANOVA to investigate the relationship between one numerical response variable and two categorical explanatory variables. You are permitted to use the same dataset as your Midterm Project, so long as there are at least two categorical variables to choose from.\n\n\n\n\n\n\nDiscretizing numerical variables\n\n\n\nIf you would like to analyze a discrete numerical variable (e.g., number of pets) as a categorical variable, you will need to convert that variable into a categorical variable in R as R assumes all variables with numbers should be numerical.\nYou will need Dr. Theobold’s help to perform this task. Dr. Theobold will work with you to convert your variable as long as you request help before Friday, May 31 at 4pm.",
"crumbs": [
"Projects",
"Final Project Description"
Expand Down Expand Up @@ -696,7 +696,7 @@
"href": "project/final-project/final-project-directions.html#model-validity",
"title": "Final Project Guidelines",
"section": "3.3 Model Validity",
"text": "3.3 Model Validity\n\nEvaluate the LINE conditions of both one-way ANOVA models\n\n\n\n\n\n\n\nCondition violations\n\n\n\nIf you find through the study design and / or your visualizations that certain model conditions are violated, you are expected to do your best to remedy these violations. If you need help figuring out how to do this, email Dr. Theobold before Thursday, March 7 at 4pm!\n\n\n\nBased on your analysis of the conditions, describe whether you believe the tests you performed are “reliable.”",
"text": "3.3 Model Validity\n\nEvaluate the LINE conditions of both one-way ANOVA models\n\n\n\n\n\n\n\nCondition violations\n\n\n\nIf you find through the study design and / or your visualizations that certain model conditions are violated, you are expected to do your best to remedy these violations. If you need help figuring out how to do this, email Dr. Theobold before Friday, May 31 at 4pm!\n\n\n\nBased on your analysis of the conditions, describe whether you believe the tests you performed are “reliable.”",
"crumbs": [
"Projects",
"Final Project Description"
Expand Down
6 changes: 3 additions & 3 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</url>
<url>
<loc>https://atheobold.github.io/stat-313-website/project/final-project/final-project-directions.html</loc>
<lastmod>2024-05-08T02:19:42.137Z</lastmod>
<lastmod>2024-05-24T01:49:46.455Z</lastmod>
</url>
<url>
<loc>https://atheobold.github.io/stat-313-website/slides/week6-day1.html</loc>
Expand Down Expand Up @@ -334,7 +334,7 @@
</url>
<url>
<loc>https://atheobold.github.io/stat-313-website/project/final-project/final_project_template-313.html</loc>
<lastmod>2024-05-08T02:19:42.137Z</lastmod>
<lastmod>2024-05-24T01:49:02.126Z</lastmod>
</url>
<url>
<loc>https://atheobold.github.io/stat-313-website/project/final-project-help/twa-model-selection-process.html</loc>
Expand Down Expand Up @@ -378,6 +378,6 @@
</url>
<url>
<loc>https://atheobold.github.io/stat-313-website/project/midterm-project/midterm-project-contract.html</loc>
<lastmod>2024-05-22T14:58:52.199Z</lastmod>
<lastmod>2024-05-24T01:50:05.010Z</lastmod>
</url>
</urlset>
38 changes: 0 additions & 38 deletions project/final-project/final_project_template-313.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -80,44 +80,6 @@ library(ggridges)

## Model Validity

```{r}
#| label: distribution-of-residuals
#| layout-nrow: 1
# Residuals of first one-way ANOVA
broom::augment(my_model) %>%
ggplot(mapping = aes(x = .resid)) +
geom_histogram() +
labs(x = "Residual")
# Residuals of second one-way ANOVA
broom::augment(my_model) %>%
ggplot(mapping = aes(x = .resid)) +
geom_histogram() +
labs(x = "Residual")
```

```{r}
#| label: residuals-versus-fitted
#| layout-nrow: 1
# Residuals versus fitted for first one-way ANOVA
broom::augment(my_model) %>%
ggplot(mapping = aes(y = .resid, x = `<NAME OF EXPLANATORY VARIABLE>`)) +
geom_jitter() +
geom_hline(yintercept = 0, color = "red", linewidth = 3) +
labs(x = "<NAME OF EXPLANATORY VARIABLE>",
y = "Residuals")
# Residuals versus fitted for second one-way ANOVA
broom::augment(my_model) %>%
ggplot(mapping = aes(y = .resid, x = `<NAME OF EXPLANATORY VARIABLE>`)) +
geom_jitter() +
geom_hline(yintercept = 0, color = "red", linewidth = 3) +
labs(x = "<NAME OF EXPLANATORY VARIABLE>",
y = "Residuals")
```

# Study Limitations

# Conclusions

0 comments on commit 1668d5f

Please sign in to comment.