Skip to content

Commit

Permalink
Adding a little 'frequentists vs MMI' to the start of the stats modul…
Browse files Browse the repository at this point in the history
…e to make it simpler to dive right in on each dedicated topic
  • Loading branch information
njlyon0 committed May 28, 2024
1 parent 5274ea8 commit de8f944
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
4 changes: 2 additions & 2 deletions _freeze/mod_stats/execute-results/html.json

Large diffs are not rendered by default.

Binary file modified _freeze/mod_stats/figure-html/mem-explore-graph-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 26 additions & 1 deletion mod_stats.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,31 @@ library(tidyverse)
library(lmerTest)
```

## Hypothesis Framing Aside

Before we dive in, we should discuss two of the ways in which you can frame your hypothesis and the differences in interpretation and appropriate statistical tool(s) that follow from that choice. We'll restrict our conversation here to **two alternate modes of thinking about your hypothesis: frequentist statistics versus multi-model inference.**

Note that this is something of a false dichotomy as tools from both worlds can be/are frequently used to complement one another. However, many graduate students are trained by instructors with strong feelings about one method _in opposition to_ the other so it is worthwhile to consider these two paths separately even if you wind up using components of both in your own work.

::::{.panel-tabset}
### Frequentist Inference

Hypotheses here are a question of <u>whether a variable has a "significant" effect on another</u>. "Significant" has a very precise meaning in this context that has to do with _p_-values. Fundamentally, these methods focus on whether the observed relationship in the data is likely to be observed by chance alone or not. Strong effects are less likely--though not impossible--to be observed due to random chance.

If your hypothesis can be summarized as something along the lines of 'we hypothesize that X affects Y' then frequentist inference may be a more appropriate methodology.

For the purposes of SSECR, **our discussion of frequentist inference will focus on <u>mixed-effect models</u>**.

### Multi-Model Inference

Hyoptheses here are a question of <u>which variables explain the _most_ variation in the data</u>. Methods in this framing are unconcerned--or at least less concerned than in frequentist inference--with the probability associated with a particular variable. Intead, these methods focus on which of a set of user-defined candidate models explains most of the noise in the data _even when that best model does not necessarily explain much of that variation in absolute terms_.

If your hypothesis can be summarized as something along the lines of 'we hypothesize that models including X explain more of the variation in Y than those that do not' then multi-model inference may be a more appropriate methodology.

For the purposes of SSECR, **our discussion of multi-model inference will focus on <u>comparing model strengths with AIC</u>**.

::::

## Mixed-Effects Models

In any statistical test there is at least one response variable (a.k.a. "dependent" variable) and some number of explanatory variables (a.k.a. "independent" variables). However, in biology our experiments often involve repeated sampling over time or at the same locations. These variables (time or site) are neither response nor explanatory variables but we might reasonably conclude that they affect our response and/or explanatory variables.
Expand Down Expand Up @@ -118,7 +143,7 @@ tarantula_df <- read.csv(file = file.path("data", "tarantulas.csv"))
str(tarantula_df)
```

With our data in hand, we now want to run some statistical tests and--hopefully--get some endorphine-inducingly small _p_ values. If we choose to simply ignore our possible random effects, we could fit a linear regression.
With our data in hand, we now want to run some statistical tests and--hopefully--get some endorphine-inducingly small _p_-values. If we choose to simply ignore our possible random effects, we could fit a linear regression.

```{r mem-lm}
# Fit model
Expand Down

0 comments on commit de8f944

Please sign in to comment.