Skip to content

Commit

Permalink
delete dates from labs, render week 10 slides not rendering correctly…
Browse files Browse the repository at this point in the history
…, render site due to index not being updated
  • Loading branch information
atheobold committed Mar 29, 2024
1 parent 0a7eb44 commit 9eecb2e
Show file tree
Hide file tree
Showing 142 changed files with 16,959 additions and 3,026 deletions.
4 changes: 2 additions & 2 deletions _freeze/critique/critique-2/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"hash": "7f372c1e58c005995fcef2c1bca8426c",
"hash": "d554846cd1ce962e4a5fe17d8c98b92f",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"Statistical Critique 2: Exploring p-values\"\nsubtitle: \"Due March 4, 2024 by 5pm\"\nformat: \n html:\n table-of-contents: true\n toc-depth: 2\n number-sections: true\n number-depth: 1\neditor: visual\n---\n\n\n![](images/significant.jpeg)\n\n## Assignment Details\n\nIn your second statistical critique, you will focus on critiquing another key aspect of any statistical argument---statistical significance. No doubt you have seen $p$-values in a previous statistical course and / or disciplinary course, and this week you're adding to that knowledge. For this critique you will compare the model you selected in your Midterm Project with what model you would have chosen based on a statistical test.\n\nThis critique involves coding! You can find a template for critique on [Posit Cloud](https://posit.cloud/).\n\n# Part Zero: p-values in Multiple Linear Regression\n\nFor the first step of this critique, you are required to read about how p-values can be used in the context of multiple linear regression: [Extending to Multiple Linear Regression](../weeks/chapters/week-8-reading-mlr.qmd \"Extending to Multiple Linear Regression\")\n\n# Part One: Revisiting the Midterm Project\n\nFor the first part of this critique, you are going to revisit the model you selected for your Midterm Project. You need to copy-and-paste the code you wrote in your Midterm Project to create your 2-3 visualizations. After these visualizations, you should write a 2-3 sentence justification as to *why* you chose the model you did in your Midterm Project.\n\n# Part Two: Using p-values Instead\n\nFor this second part, you are tasked with testing what regression model you would have chosen if you had used p-values to make your decision. Regardless of the model you chose for your Midterm Project, you will fit the **most complex** regression model. If you used two numerical explanatory variables, the most complex model has **both** variables included. If you used one numerical and one categorical explanatory variable, the most complex model is the different slopes (interaction) model.\n\n### For two numerical explanatory variables\n\n1. fit a multiple linear regression with **both** variables included:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nmy_model <- lm(bill_length_mm ~ body_mass_g + flipper_length_mm, \n data = penguins)\n```\n:::\n\n\n2. run an ANOVA to test if each variable should be included:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nanova(my_model)\n```\n:::\n\n\n### For one numerical and one categorical explanatory variable\n\n1. fit a different slopes multiple linear regression:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nmy_model <- lm(bill_length_mm ~ flipper_length_mm * species, \n data = penguins)\n```\n:::\n\n\n2. run an ANOVA to test for different slopes\n\n\n::: {.cell}\n\n```{.r .cell-code}\nanova(my_model)\n```\n:::\n\n\n<!-- # Part Three: Learning More about Misuses of $p$-values -->\n\n<!-- For this section, you are required to: -->\n\n<!-- 1. read the American Statistical Association's statement on $p$-values and statistical significance -->\n\n<!-- 2. note what misinterpretations you believe apply your excerpt (from Part One) **and** why -->\n\n<!-- ::: callout-tip -->\n\n<!-- # Justification -->\n\n<!-- Note, you are required to *justify* why you believe the selected misinterpretations apply to your article's statistical argument(s). -->\n\n<!-- ::: -->\n\n# Part Three: Learning More about the Backlash Against $p$-values\n\n> \"The p-value was never intended to be a substitute for scientific reasoning.\" Ron Wasserstein, Executive Director of the American Statistical Association\n\nIssues with the use of $p$-values had gotten so problematic that the American Statistical Association (ASA)[^1] put out a statement in 2016 titled, [\"The ASA Statement on Statistical Significance and $p$-Values\"](https://www.amstat.org/asa/files/pdfs/P-ValueStatement.pdf). This statement includes six principles which address misconceptions and misuse of the $p$-value.\n\n[^1]: This is my professional organization.\n\nIn March of 2019, Valentin Amrhein, Sander Greenland, Blake McShane and more than 800 signatories published an article in Nature [calling for an end to \"statistical significance\"](https://www.nature.com/articles/d41586-019-00857-9). The article details how, on top of the many common misunderstandings about hypothesis testing and $p$-values, there is an incentive for researchers to \"cherry pick\" only the results that are \"statistically significant\" while dismissing those that aren't. There are two problems with this system:\n\n1. it incentivizes researchers to do whatever it takes to obtain \"significant\" p-values, even through dishonest means\n2. it dismisses the importance of results where no \"significant\" effects are found\n\n<!-- > \"Over time it appears the p-value has become a gatekeeper for whether work is publishable. This apparent editorial bias leads to the 'file-drawer effect,' in which research with statistically significant outcomes are much more likely to get published, while other work that might well be just as important scientifically is never seen in print. It also leads to practices called by such names as 'p-hacking' and 'data dredging' that emphasize the search for small p-values over other statistical and scientific reasoning.\" -->\n\n<!-- > -->\n\n<!-- > Jessica Utts, President of the American Statistical Association -->\n\nFor Part Three, you are going to inspect what the publication requirements are for journal the article you selected (in Week 1) was published in. \n\n:::{.callout-tip}\n# Statistics in Your Field\nYou are revisiting (again) the article you chose in Week 1 for the \"Statistics in your Field\" assignment! \n:::\n\nFirst, go to the website for the journal where your article was published. Now, find their criteria for publication. If you are having a difficult time finding these criteria, it may be simpler to Google \"*title of journal* publication criteria,\" substituting the name of your journal.\n\nSearch through the criteria and see what the requirements are for (1) the \"significance\" of the findings and (2) the availability of the data and / or analyses. Describe what you find!\n\n::: callout-tip\nFeel free to type out what you find while searching the journal or simply copy-and-paste the criteria you find listed on their website.\n:::\n\n# Part Four: Lessons Learned\n\nNow that you have explored the use of p-values for model selection and publication criteria, write down **two** things you have learned that you will take with you.\n",
"markdown": "---\ntitle: \"Statistical Critique 2: Exploring p-values\"\nformat: \n html:\n table-of-contents: true\n toc-depth: 2\n number-sections: true\n number-depth: 1\neditor: visual\n---\n\n\n![](images/significant.jpeg)\n\n## Assignment Details\n\nIn your second statistical critique, you will focus on critiquing another key aspect of any statistical argument---statistical significance. No doubt you have seen $p$-values in a previous statistical course and / or disciplinary course, and this week you're adding to that knowledge. For this critique you will compare the model you selected in your Midterm Project with what model you would have chosen based on a statistical test.\n\nThis critique involves coding! You can find a template for critique on [Posit Cloud](https://posit.cloud/).\n\n# Part Zero: p-values in Multiple Linear Regression\n\nFor the first step of this critique, you are required to read about how p-values can be used in the context of multiple linear regression: [Extending to Multiple Linear Regression](../weeks/chapters/week-8-reading-mlr.qmd \"Extending to Multiple Linear Regression\")\n\n# Part One: Revisiting the Midterm Project\n\nFor the first part of this critique, you are going to revisit the model you selected for your Midterm Project. You need to copy-and-paste the code you wrote in your Midterm Project to create your 2-3 visualizations. After these visualizations, you should write a 2-3 sentence justification as to *why* you chose the model you did in your Midterm Project.\n\n# Part Two: Using p-values Instead\n\nFor this second part, you are tasked with testing what regression model you would have chosen if you had used p-values to make your decision. Regardless of the model you chose for your Midterm Project, you will fit the **most complex** regression model. If you used two numerical explanatory variables, the most complex model has **both** variables included. If you used one numerical and one categorical explanatory variable, the most complex model is the different slopes (interaction) model.\n\n### For two numerical explanatory variables\n\n1. fit a multiple linear regression with **both** variables included:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nmy_model <- lm(bill_length_mm ~ body_mass_g + flipper_length_mm, \n data = penguins)\n```\n:::\n\n\n2. run an ANOVA to test if each variable should be included:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nanova(my_model)\n```\n:::\n\n\n### For one numerical and one categorical explanatory variable\n\n1. fit a different slopes multiple linear regression:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nmy_model <- lm(bill_length_mm ~ flipper_length_mm * species, \n data = penguins)\n```\n:::\n\n\n2. run an ANOVA to test for different slopes\n\n\n::: {.cell}\n\n```{.r .cell-code}\nanova(my_model)\n```\n:::\n\n\n<!-- # Part Three: Learning More about Misuses of $p$-values -->\n\n<!-- For this section, you are required to: -->\n\n<!-- 1. read the American Statistical Association's statement on $p$-values and statistical significance -->\n\n<!-- 2. note what misinterpretations you believe apply your excerpt (from Part One) **and** why -->\n\n<!-- ::: callout-tip -->\n\n<!-- # Justification -->\n\n<!-- Note, you are required to *justify* why you believe the selected misinterpretations apply to your article's statistical argument(s). -->\n\n<!-- ::: -->\n\n# Part Three: Learning More about the Backlash Against $p$-values\n\n> \"The p-value was never intended to be a substitute for scientific reasoning.\" Ron Wasserstein, Executive Director of the American Statistical Association\n\nIssues with the use of $p$-values had gotten so problematic that the American Statistical Association (ASA)[^1] put out a statement in 2016 titled, [\"The ASA Statement on Statistical Significance and $p$-Values\"](https://www.amstat.org/asa/files/pdfs/P-ValueStatement.pdf). This statement includes six principles which address misconceptions and misuse of the $p$-value.\n\n[^1]: This is my professional organization.\n\nIn March of 2019, Valentin Amrhein, Sander Greenland, Blake McShane and more than 800 signatories published an article in Nature [calling for an end to \"statistical significance\"](https://www.nature.com/articles/d41586-019-00857-9). The article details how, on top of the many common misunderstandings about hypothesis testing and $p$-values, there is an incentive for researchers to \"cherry pick\" only the results that are \"statistically significant\" while dismissing those that aren't. There are two problems with this system:\n\n1. it incentivizes researchers to do whatever it takes to obtain \"significant\" p-values, even through dishonest means\n2. it dismisses the importance of results where no \"significant\" effects are found\n\n<!-- > \"Over time it appears the p-value has become a gatekeeper for whether work is publishable. This apparent editorial bias leads to the 'file-drawer effect,' in which research with statistically significant outcomes are much more likely to get published, while other work that might well be just as important scientifically is never seen in print. It also leads to practices called by such names as 'p-hacking' and 'data dredging' that emphasize the search for small p-values over other statistical and scientific reasoning.\" -->\n\n<!-- > -->\n\n<!-- > Jessica Utts, President of the American Statistical Association -->\n\nFor Part Three, you are going to inspect what the publication requirements are for journal the article you selected (in Week 1) was published in.\n\n::: callout-tip\n# Statistics in Your Field\n\nYou are revisiting (again) the article you chose in Week 1 for the \"Statistics in your Field\" assignment!\n:::\n\nFirst, go to the website for the journal where your article was published. Now, find their criteria for publication. If you are having a difficult time finding these criteria, it may be simpler to Google \"*title of journal* publication criteria,\" substituting the name of your journal.\n\nSearch through the criteria and see what the requirements are for (1) the \"significance\" of the findings and (2) the availability of the data and / or analyses. Describe what you find!\n\n::: callout-tip\nFeel free to type out what you find while searching the journal or simply copy-and-paste the criteria you find listed on their website.\n:::\n\n# Part Four: Lessons Learned\n\nNow that you have explored the use of p-values for model selection and publication criteria, write down **two** things you have learned that you will take with you.\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
Expand Down
8 changes: 5 additions & 3 deletions _freeze/labs/lab-1/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"hash": "90fda53ebdc205ed529529fb22e68be6",
"hash": "6a23caebccb8846818a09dd99cb213a1",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"Lab 1: Welcome to Posit Cloud!\"\nauthor: \"Your Name Here!\"\ndate: \"January 9, 2024\"\nformat: html\neditor: visual\nexecute: \n echo: true\n eval: false\n---\n\n\n# Quarto\n\nThis is a Quarto document!\n\nQuarto is a software that allows you to interweave text and R code to create HTML, PDF, and Microsoft Word documents\n\nThere are two ways to view a Quarto document, (1) as the \"Source\" file, or (2) as the \"Visual\" file. We will **only** use the Visual option in this class, as it allows you to interact with Quarto similar to how you interact with Word.\n\n## Formatting your Document\n\nSimilar to a Word Doc, there are a variety of ways you can spice up a Quarto document! Let's explore a few.\n\n**Question 1:** Using the formatting options, make a numbered list of your top three favorite animals.\n\n**Question 2:** Using the formatting options, insert an image of your favorite animal.\n\n**Question 3:** Now, change the \"Formatting your Document\" section name to the name of your favorite animal. Make sure your header is a level 1 -- use the Header 1 formatting option!\n\n## R Code\n\nYou can differentiate the R code within a Quarto file from the body of the document, based on the gray boxes that start with an `{r}.`\n\nHere is an example of an R code chunk:\n\n\n\n\n\nNotice in the line after the `{r}` there are two lines that start with `#|` – this is the symbol that declares options for a code chunk. The `#| label:` allows us to specify a name for a code chunk, I typically choose a name that tells me what the code chunk does (e.g., load-packages, clean-data). The `#| include: false` option at the beginning of the code chunk controls how the code output looks in our final rendered document.\n\nThis code chunk has two things we want to pay attention to:\n\n1. The `library(tidyverse)` code loads in an R package called the \"tidyverse\". This is code you will have in **every** lab assignment for this class!\n\n2. Code comments which are denoted by a `#` symbol. Code comments are a way for you (and me) to write what the code is doing, without R thinking what we are writing is code it should execute.\n\n## Rendering\n\nWhen you click the **Render** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.\n\n**Question 4:** Do you see the above code chunk when you knit the document? Why do you think this is the case?\n\n## Including Code Output\n\nYou can include code output in your knitted document:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nglimpse(mpg)\n```\n:::\n\n\n**Question 5:** What do you think the above code does? What type of output does it give you?\\\n*Hint: You have saw this type of output on Tuesday!\\\n*\n\n## Including Plots\n\nYou can also embed plots in the rendered document.\n\nHere is an example of a plot.\n\n\n::: {.cell}\n\n:::\n\n\n**Question 6**: What do you think the `echo: false` option does in the above code chunk?\n\n**Question 7:** What do you think the `mapping = aes(y = manufacturer, x = hwy))` code does?\n\n**Question 8:** What do you think the `labs(x = \"Highway Miles Per Gallon\", y = \"Car Manufacturer\")` code does?\n",
"supporting": [],
"markdown": "---\ntitle: \"Lab 1: Welcome to Posit Cloud!\"\nauthor: \"Your Name Here!\"\nformat: html\neditor: visual\nembed-resources: true\nexecute: \n echo: true\n eval: false\n---\n\n\n# Quarto\n\nThis is a Quarto document!\n\nQuarto is a software that allows you to interweave text and R code to create HTML, PDF, and Microsoft Word documents\n\nThere are two ways to view a Quarto document, (1) as the \"Source\" file, or (2) as the \"Visual\" file. We will **only** use the Visual option in this class, as it allows you to interact with Quarto similar to how you interact with Word.\n\n## Formatting your Document\n\nSimilar to a Word Doc, there are a variety of ways you can spice up a Quarto document! Let's explore a few.\n\n**Question 1:** Using the formatting options, make a numbered list of your top three favorite animals.\n\n**Question 2:** Using the formatting options, insert an image of your favorite animal.\n\n**Question 3:** Now, change the \"Formatting your Document\" section name to the name of your favorite animal. Make sure your header is a level 1 -- use the Header 1 formatting option!\n\n## R Code\n\nYou can differentiate the R code within a Quarto file from the body of the document, based on the gray boxes that start with an `{r}.`\n\nHere is an example of an R code chunk:\n\n\n\n\n\nNotice in the line after the `{r}` there are two lines that start with `#|` – this is the symbol that declares options for a code chunk. The `#| label:` allows us to specify a name for a code chunk, I typically choose a name that tells me what the code chunk does (e.g., load-packages, clean-data). The `#| include: false` option at the beginning of the code chunk controls how the code output looks in our final rendered document.\n\nThis code chunk has two things we want to pay attention to:\n\n1. The `library(tidyverse)` code loads in an R package called the \"tidyverse\". This is code you will have in **every** lab assignment for this class!\n\n2. Code comments which are denoted by a `#` symbol. Code comments are a way for you (and me) to write what the code is doing, without R thinking what we are writing is code it should execute.\n\n## Rendering\n\nWhen you click the **Render** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.\n\n**Question 4:** Do you see the above code chunk when you knit the document? Why do you think this is the case?\n\n## Including Code Output\n\nYou can include code output in your knitted document:\n\n\n::: {.cell}\n\n```{.r .cell-code}\nglimpse(mpg)\n```\n:::\n\n\n**Question 5:** What do you think the above code does? What type of output does it give you?\\\n*Hint: You have saw this type of output on Tuesday!\\\n*\n\n## Including Plots\n\nYou can also embed plots in the rendered document.\n\nHere is an example of a plot.\n\n\n::: {.cell}\n\n:::\n\n\n**Question 6**: What do you think the `echo: false` option does in the above code chunk?\n\n**Question 7:** What do you think the `mapping = aes(y = manufacturer, x = hwy))` code does?\n\n**Question 8:** What do you think the `labs(x = \"Highway Miles Per Gallon\", y = \"Car Manufacturer\")` code does?\n",
"supporting": [
"lab-1_files"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
Expand Down
Loading

0 comments on commit 9eecb2e

Please sign in to comment.