Skip to content

Commit

Permalink
1208 closes #23
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanrongen committed Aug 12, 2024
1 parent 8e5ff87 commit 4722a62
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 2 deletions.

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions materials/cs5_practical_model-comparisons.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,72 @@ exec(open('setup_files/setup.py').read())
## R

### Libraries

```{r}
#| eval: false
# A collection of R packages designed for data science
library(tidyverse)
# Converts stats functions to a tidyverse-friendly format
library(rstatix)
# Creates diagnostic plots using ggplot2
library(ggResidpanel)
# Helper functions for tidying data
library(broom)
```

### Functions

```{r}
#| eval: false
#| warning: false
# Calculates the Akaike Information Criterion
stats::AIC()
# Performs a backwards step-wise elimination process
stats::step()
```

## Python

### Libraries

```{python}
#| eval: false
# A fundamental package for scientific computing in Python
import numpy as np
# A Python data analysis and manipulation tool
import pandas as pd
# Simple yet exhaustive stats functions.
import pingouin as pg
# Python equivalent of `ggplot2`
from plotnine import *
# Statistical models, conducting tests and statistical data exploration
import statsmodels.api as sm
# Convenience interface for specifying models using formula strings and DataFrames
import statsmodels.formula.api as smf
```

### Functions

```{python}
#| eval: false
# Reads in a .csv file
pandas.read_csv()
# Creates a model from a formula and data frame
statsmodels.formula.api.ols()
```

:::
:::
:::

Expand Down

0 comments on commit 4722a62

Please sign in to comment.