Skip to content

Commit

Permalink
init 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
palday committed Jun 27, 2024
1 parent 5890198 commit 6582f75
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 58 deletions.
4 changes: 2 additions & 2 deletions AoGPlots.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Creating multi-panel plots"

This notebook shows creating a multi-panel plot similar to Figure 2 of @Fuehner2021.

The data are available from the SMLP2023 example datasets.
The data are available from the SMLP2024 example datasets.

```{julia}
#| code-fold: true
Expand All @@ -14,7 +14,7 @@ using CairoMakie # for displaying static plots
using DataFrames
using Statistics
using StatsBase
using SMLP2023: dataset
using SMLP2024: dataset
CairoMakie.activate!(; type="svg") # use SVG (other options include PNG)
```
Expand Down
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "SMLP2023"
uuid = "dc5ec7c6-28fd-4523-b102-f28df6bb352f"
authors = ["Phillip Alday <[email protected]>", "Douglas Bates <[email protected]>", "Reinhold Kliegl <[email protected]>", "Julius Krumbiegel <[email protected]>"]
name = "SMLP2024"
uuid = "3c8ca5f6-7797-4ff8-8247-191023d8f95a"
authors = ["Phillip Alday <[email protected]>", "Douglas Bates <[email protected]>", "Reinhold Kliegl <[email protected]>"]
version = "0.1.0"

[deps]
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# SMLP2023
# SMLP2024

SMLP2023: Advanced methods in frequentist statistics with Julia
SMLP2024: Advanced methods in frequentist statistics with Julia

The rendered website version of the course materials is available [here](https://repsychling.github.io/SMLP2023/).
The rendered website version of the course materials is available [here](https://repsychling.github.io/SMLP2024/).

This repository uses [Quarto](https://quarto.org). To be able to render all the pages, you will need an appropriate Jupyter kernel installed and the local environment instantiated.

```sh
~/SMLP2023$ julia
~/SMLP2024$ julia

julia> using Pkg

Expand All @@ -23,14 +23,14 @@ julia> installkernel("julia", "--threads=auto", "--project=@.")
"~/.local/share/jupyter/kernels/julia-1.9"

julia> Pkg.activate(".")
Activating project at `~/SMLP2023`
Activating project at `~/SMLP2024`

julia> Pkg.instantiate()
< lots of output >

julia> exit()

~/SMLP2023$ quarto preview
~/SMLP2024$ quarto preview

< lots of output >

Expand Down
10 changes: 5 additions & 5 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project:
type: website
title: "SMLP2023"
title: "SMLP2024"
execute-dir: project
output-dir: _build/
render:
Expand Down Expand Up @@ -56,9 +56,9 @@ format:
fig-height: 6

website:
title: "SMLP2023: Advanced Frequentist Track"
site-url: https://RePsychLing.github.io/SMLP2023
repo-url: https://github.com/RePsychLing/SMLP2023
title: "SMLP2024: Advanced Frequentist Track"
site-url: https://RePsychLing.github.io/SMLP2024
repo-url: https://github.com/RePsychLing/SMLP2024
repo-actions: [edit, issue]
# reader-mode: true
navbar:
Expand All @@ -69,7 +69,7 @@ website:
# - about.qmd
right:
- icon: github
href: https://github.com/RePsychLing/SMLP2023
href: https://github.com/RePsychLing/SMLP2024
page-navigation: true
back-to-top-navigation: true
sidebar:
Expand Down
2 changes: 1 addition & 1 deletion arrow.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The columns can be of different types including numeric values, character string

An Arrow file can be read or written from R, Python, Julia and many other languages. Somewhat confusingly in R and Python the name `feather`, which refers to an earlier version of the storage format, is used in some function names like `read_feather`.

Internally, the SMLP2023 package uses Arrow to store all of its datasets.
Internally, the SMLP2024 package uses Arrow to store all of its datasets.

# The Emotikon data

Expand Down
2 changes: 1 addition & 1 deletion bootstrap.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ using DataFrames
using MixedModels
using MixedModelsMakie
using Random
using SMLP2023: dataset
using SMLP2024: dataset
using AlgebraOfGraphics: AlgebraOfGraphics as AoG
CairoMakie.activate!(; type="svg") # use SVG (other options include PNG)
Expand Down
2 changes: 1 addition & 1 deletion contrasts_fggk21.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ using DataFrames
using DataFrameMacros
using MixedModels
using ProgressMeter
using SMLP2023: dataset
using SMLP2024: dataset
using Statistics
using StatsBase
Expand Down
2 changes: 1 addition & 1 deletion contrasts_kwdyz11.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jupyter: julia-1.9
using Chain
using DataFrames
using MixedModels
using SMLP2023: dataset
using SMLP2024: dataset
using StatsBase
using StatsModels
Expand Down
2 changes: 1 addition & 1 deletion fggk21.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ using ProgressMeter
using Random
using Statistics
using StatsBase
using SMLP2023: dataset
using SMLP2024: dataset
ProgressMeter.ijulia_behavior(:clear)
CairoMakie.activate!(; type="svg")
Expand Down
2 changes: 1 addition & 1 deletion glmm.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ using DataFrameMacros
using DataFrames
using MixedModels
using MixedModelsMakie
using SMLP2023: dataset
using SMLP2024: dataset
CairoMakie.activate!(; type="svg")
Expand Down
6 changes: 3 additions & 3 deletions index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ subtitle: "Advanced methods in frequentist statistics with Julia"
author: "Phillip Alday, Reinhold Kliegl and Douglas Bates"
---

This site provides materials for the **Advanced frequentist methods** stream of the [Summer School on Statistical Methods](https://vasishth.github.io/smlp2023/) to be held at the University of Potsdam, 11-15 September, 2023.
This site provides materials for the **Advanced frequentist methods** stream of the [Summer School on Statistical Methods](https://vasishth.github.io/smlp2024/) to be held at the University of Potsdam, 11-15 September, 2024.

# Installation of tools prior to the course

Expand All @@ -16,11 +16,11 @@ Because most students in the course will have more experience with [R](https://r
We will assume that you have git installed and are able to clone a repository from github.
If not, [Happy Git with R](https://happygitwithr.com/) is a good place to learn about git for data science.

This website is built using [quarto](https://quarto.org), described below, from the [repository](https://github.com/RePsychLing/SMLP2023).
This website is built using [quarto](https://quarto.org), described below, from the [repository](https://github.com/RePsychLing/SMLP2024).
Clone this repository with, e.g.

```sh
git clone https://github.com/RePsychLing/SMLP2023
git clone https://github.com/RePsychLing/SMLP2024
```

## Julia Programming Language
Expand Down
2 changes: 1 addition & 1 deletion kb07.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ using DataFrames
using MixedModels
using ProgressMeter
using Random
using SMLP2023: dataset
using SMLP2024: dataset
CairoMakie.activate!(; type="svg")
Expand Down
30 changes: 15 additions & 15 deletions kkl15.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ This comparison is of interest because a few years after the publication of @Kli

Here we also include two additional experimental manipulations of target size and orientation of cue rectangle. A similar analysis was reported in the parsimonious mixed-model paper [@Bates2015]; it was also used in a paper of GAMMs [@Baayen2017]. Data and R scripts of those analyses are also available in [R-package RePsychLing](https://github.com/dmbates/RePsychLing/tree/master/data/).

The analysis is based on log-transformed reaction times `lrt`, indicated by a _boxcox()_ check of model residuals.
The analysis is based on log-transformed reaction times `lrt`, indicated by a _boxcox()_ check of model residuals.

In this vignette we focus on the reduction of model complexity. And we start with a quote:
In this vignette we focus on the reduction of model complexity. And we start with a quote:

“Neither the [maximal] nor the [minimal] linear mixed models are appropriate for most repeated measures analysis. Using the [maximal] model is generally wasteful and costly in terms of statiscal power for testing hypotheses. On the other hand, the [minimal] model fails to account for nontrivial correlation among repeated measurements. This results in inflated [T]ype I error rates when non-negligible correlation does in fact exist. We can usually find middle ground, a covariance model that adequately accounts for correlation but is more parsimonious than the [maximal] model. Doing so allows us full control over [T]ype I error rates without needlessly sacrificing power.”

Expand All @@ -41,7 +41,7 @@ using MixedModels
using MixedModelsMakie
using ProgressMeter
using Random
using SMLP2023: dataset
using SMLP2024: dataset
using StatsBase
ProgressMeter.ijulia_behavior(:clear)
Expand Down Expand Up @@ -135,15 +135,15 @@ contrasts = Dict(

```{julia}
m_max_rt = let
form = @formula rt ~ 1 + CTR * size * cardinal +
form = @formula rt ~ 1 + CTR * size * cardinal +
(1 + CTR * size * cardinal | Subj)
fit(MixedModel, form, dat; contrasts)
end
```

```{julia}
m_cpx_rt = let
form = @formula rt ~ 1 + CTR * size * cardinal +
form = @formula rt ~ 1 + CTR * size * cardinal +
(1 + CTR + size + cardinal | Subj)
fit(MixedModel, form, dat; contrasts)
end
Expand Down Expand Up @@ -174,7 +174,7 @@ This is the maximum LMM for the design.

```{julia}
m_max = let
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
(1 + CTR * size * cardinal | Subj)
fit(MixedModel, form, dat; contrasts)
end
Expand All @@ -201,7 +201,7 @@ Force CPs to zero.

```{julia}
m_zcp1 = let
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
zerocorr(1 + CTR * size * cardinal | Subj)
fit(MixedModel, form, dat; contrasts)
end
Expand All @@ -225,7 +225,7 @@ Take out VC for interactions.

```{julia}
m_zcp1_rdc = let
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
zerocorr(1 + CTR + size + cardinal | Subj)
fit(MixedModel, form, dat; contrasts)
end
Expand All @@ -252,7 +252,7 @@ gof_summary = let
mods = eval.(nms)
lrt = MixedModels.likelihoodratiotest(m_zcp1_rdc, m_zcp1, m_max)
DataFrame(;
name = nms,
name = nms,
dof=dof.(mods),
deviance=round.(deviance.(mods), digits=0),
AIC=round.(aic.(mods),digits=0),
Expand All @@ -271,7 +271,7 @@ Extend zcp-reduced LMM with CPs

```{julia}
m_prm1 = let
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
(1 + CTR + size + cardinal | Subj)
fit(MixedModel, form, dat; contrasts)
end
Expand Down Expand Up @@ -299,7 +299,7 @@ gof_summary = let
mods = eval.(nms)
lrt = MixedModels.likelihoodratiotest(m_prm1, m_zcp1, m_max)
DataFrame(;
name = nms,
name = nms,
dof=dof.(mods),
deviance=round.(deviance.(mods), digits=0),
AIC=round.(aic.(mods),digits=0),
Expand All @@ -319,7 +319,7 @@ Take out interaction VCs.

```{julia}
m_cpx = let
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
(1 + CTR + size + cardinal | Subj)
fit(MixedModel, form, dat; contrasts)
end
Expand All @@ -330,7 +330,7 @@ Take out interaction VCs.

```{julia}
m_zcp2 = let
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
form = @formula log(rt) ~ 1 + CTR * size * cardinal +
zerocorr(1 + CTR + size + cardinal | Subj)
fit(MixedModel, form, dat; contrasts)
end
Expand All @@ -344,7 +344,7 @@ gof_summary = let
mods = eval.(nms)
lrt = MixedModels.likelihoodratiotest(m_zcp2, m_cpx, m_max)
DataFrame(;
name = nms,
name = nms,
dof=dof.(mods),
deviance=round.(deviance.(mods), digits=0),
AIC=round.(aic.(mods),digits=0),
Expand Down Expand Up @@ -553,7 +553,7 @@ draw(
data(tbl) *
mapping(
[:β02, :β03, :β04] .=> "Experimental effect size [ms]";
color=dims(1) =>
color=dims(1) =>
renamer(["spatial effect", "object effect", "attraction effect"]) =>
"Experimental effects",
) *
Expand Down
4 changes: 2 additions & 2 deletions kwdyz11.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ using Distributions
using MixedModels
using MixedModelsMakie
using Random
using SMLP2023: dataset
using SMLP2024: dataset
using StatsBase
CairoMakie.activate!(; type="svg")
Expand Down Expand Up @@ -351,7 +351,7 @@ draw(
data(tbl) *
mapping(
[:σ1, :σ2, :σ3, :σ4] .=> "Standard deviations [ms]";
color=dims(1) =>
color=dims(1) =>
renamer(append!(["Grand mean"],["spatial", "object", "attraction"] .* " effect")) =>
"Variance components",
) *
Expand Down
2 changes: 1 addition & 1 deletion largescaledesigned.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using DataFrames
using Effects
using MixedModels
using MixedModelsMakie
using SMLP2023: dataset
using SMLP2024: dataset
using StandardizedPredictors
using StatsBase
Expand Down
4 changes: 2 additions & 2 deletions mrk17.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using CategoricalArrays
using DataFrames
using MixedModels
using MixedModelsMakie
using SMLP2023: dataset
using SMLP2024: dataset
using Statistics: mean, std
```

Expand Down Expand Up @@ -118,7 +118,7 @@ using CategoricalArrays
using DataFrames
using MixedModels
using MixedModelsMakie
using SMLP2023: dataset
using SMLP2024: dataset
using Statistics: mean, std
```
Expand Down
2 changes: 1 addition & 1 deletion pkg.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Julia packages can be configured (in a file called `Project.toml`) on a per-proj
The packaged sources and compiled versions are stored in a central location, e.g. `~/.julia/packages` and `~/.julia/compiled` on Linux systems, but the configuration of packages to be used can be local to a project.
The `Pkg` package is used to modify the local project's configuration.
(An alternative is "package mode" in the read-eval-print-loop or REPL, which we will show at the summer school.)
Start julia in the directory of the cloned `SMLP2023` repository
Start julia in the directory of the cloned `SMLP2024` repository
```{julia}
#| eval: false
using Pkg # there's a package called 'Pkg' to manipulate package configs
Expand Down
2 changes: 1 addition & 1 deletion profiling.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ using CairoMakie
using MixedModels
using MixedModelsMakie
using Random
using SMLP2023: dataset
using SMLP2024: dataset
CairoMakie.activate!(; type="svg")
import ProgressMeter
Expand Down
6 changes: 3 additions & 3 deletions sleepstudy.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ using MixedModelsMakie # diagnostic plots
using ProgressMeter
using Random # random number generators
using RCall # call R from Julia
using SMLP2023
using SMLP2023: dataset
using SMLP2024
using SMLP2024: dataset
ProgressMeter.ijulia_behavior(:clear)
CairoMakie.activate!(; type="svg")
```

The `sleepstudy` data are one of the datasets available with the `MixedModels` package. It is re-exported by the `SMLP2023` package's `dataset` function.
The `sleepstudy` data are one of the datasets available with the `MixedModels` package. It is re-exported by the `SMLP2024` package's `dataset` function.

```{julia}
sleepstudy = dataset("sleepstudy")
Expand Down
Loading

0 comments on commit 6582f75

Please sign in to comment.