---
title: "Practice: Unordered Outcomes"
format: 
  html:
    css: tufte-pset-adapted.css
editor: source
---

::: {.content-visible when-format="html"}

*If you complete this exercise using the Quarto file used to generate this page, you should be able to change the `format:` header above to say `format: pdf`, it will render as a pdf file that includes just the questions and your answers (and not, for example, this text).*

:::

::: {.content-visible when-format="html"}

In this exercise, you will be using data of your choosing to fit models for an unordered outcome and to interpret results. You will need:

- An outcome variable with at least 3 categories that you wish to consider unordered (i.e., nominal level) for the purposes of the assignment. The variable could be something that might look on its face to be a simple ordered variable, as long as you have some a priori reason to suspect that it might not behave entirely as ordered for purposes of this exercise.
- At least four explanatory variables (a categorical variable counts as 1 variable).
- At least one of these explanatory variables should be a dichotomous variable, and at least one variable that you are treating as continuous (interval-level).
-  One variable will be considered your key explanatory variable, and others are covariates in estimating the relationship between that key explanatory variable and the outcome.
- None of the categories of the outcome variable should have fewer than 8 cases per the number of explanatory variables in the model (that is, if you have 4 explanatory variables, you don’t want any categories of the outcome to have fewer than 32 cases). You may need to combine outcome categories for this to happen.


::: 

::::: {.content-visible when-format="pdf"}

```{r}
## dependencies

## open data file

```

:::::

_1. In 3-4 sentences, describe the example you have chosen to use for this exercise. [2] Include:_

- _What is the outcome?_
- _What is the key explanatory variable?_
- _What is the motivating idea for how the explanatory variable and outcome might be related in a way worth your pursuing it?_
- _What covariates are you using, and why have you chosen to include them?_

::: {.content-visible when-format="pdf"}
```{r}
# code here
```
:::

_2.  Provide a tabulation of the nominal outcome variable you will be analyzing in this assignment, with values of the categories labeled so that they are substantively meaningful. [1]_

::: {.content-visible when-format="pdf"}
```{r}
# code here
```
:::

_3. Fit two multinomial logit models: one with only your key explanatory variable (we will call this the "bivariate model") and one with this explanatory variable and all your covariates (we will call this the "full model").  [1]_

::: {.content-visible when-format="pdf"}
```{r}
# code here
```
:::

_4. Compute and interpret odds ratios for the key explanatory variable in both the bivariate and full models estimated above. [2]_

::: {.content-visible when-format="pdf"}
```{r}
# code here
```

YOUR INTERPRETATION HERE

:::


_5. Draw a professional-looking plot that shows how the predicted probabilities of observing the different outcome categories change as (one of) your continuous explanatory variable(s) changes. [3]_

::: {.content-visible when-format="pdf"}
```{r}
# code here
```

YOUR INTERPRETATION HERE

:::

_6.  Write a deft paragraph explaining/interpreting what you think are the most important features of the results from fitting your model. [2]_

::: {.content-visible when-format="pdf"}

YOUR DEFT PARAGRAPH HERE

:::





