Skip to content

Commit e5ee12a

Browse files
committed
Merge branch 'main' of github.com:RePsychLing/MixedModelsSim.jl into db/plutonotebook
2 parents 94749fc + 23ea639 commit e5ee12a

File tree

8 files changed

+49
-34
lines changed

8 files changed

+49
-34
lines changed

.github/workflows/Documenter.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Documenter
2+
on:
3+
push:
4+
branches: [main]
5+
tags: [v*]
6+
pull_request:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
jobs:
11+
Documenter:
12+
name: Documentation
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: julia-actions/setup-julia@v1
17+
with:
18+
version: 1.6-nightly
19+
- uses: julia-actions/julia-buildpkg@latest
20+
- uses: julia-actions/julia-docdeploy@latest
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/Tier1.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ name: Tier1
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
paths-ignore:
77
- 'LICENSE.md'
88
- 'README.md'
9+
- 'docs/*'
910
pull_request:
1011
branches:
11-
- master
12+
- main
1213
paths-ignore:
1314
- 'LICENSE.md'
1415
- 'README.md'
16+
- 'docs/*'
1517
release:
1618
types:
1719
- created
@@ -34,10 +36,3 @@ jobs:
3436
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3537
- uses: julia-actions/[email protected]
3638
if: startsWith(matrix.os, 'Ubuntu')
37-
env:
38-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
39-
- uses: julia-actions/julia-docdeploy@releases/v1
40-
if: startsWith(matrix.os, 'Ubuntu')
41-
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/Tier2.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ name: Tier2
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
paths-ignore:
77
- 'LICENSE.md'
88
- 'README.md'
9+
- 'docs/*'
910
pull_request:
1011
branches:
11-
- master
12+
- main
1213
paths-ignore:
1314
- 'LICENSE.md'
1415
- 'README.md'
16+
- 'docs/*'
1517
release:
1618
types:
1719
- created
@@ -21,7 +23,7 @@ jobs:
2123
strategy:
2224
fail-fast: false
2325
matrix:
24-
julia-version: [nightly]
26+
julia-version: [1.5, nightly]
2527
julia-arch: [x64, x86]
2628
os: [ubuntu-18.04, macos-10.15, windows-2019]
2729
exclude:

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MixedModelsSim"
22
uuid = "d5ae56c5-23ca-4a1f-b505-9fc4796fc1fe"
33
authors = ["Phillip Alday", "Douglas Bates", "Lisa DeBruine", "Reinhold Kliegl"]
4-
version = "0.2.0"
4+
version = "0.2.1"
55

66
[deps]
77
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://RePsychLing.github.io/MixedModelsSim.jl/dev)
77
![T1-url][T1-img]
88
![T2-url][T2-img]
9-
[![Codecov](https://codecov.io/gh/RePsychLing/MixedModelsSim.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/RePsychLing/MixedModelsSim.jl)
9+
[![Codecov](https://codecov.io/gh/RePsychLing/MixedModelsSim.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/RePsychLing/MixedModelsSim.jl)
1010

1111
This package provides some utility functions for generating experimental designs, especially those with crossed factors.
1212

1313
## Installation
1414

1515
`MixedModelsSim` is registered in the Julia package registry and can be installed via the pkg REPL:
1616
```julia
17-
(@v1.4) pkg> add MixedModelsSim
17+
(@v1.5) pkg> add MixedModelsSim
1818
```
1919

2020
## Purpose

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ MixedModelsSim = "d5ae56c5-23ca-4a1f-b505-9fc4796fc1fe"
1010
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1111

1212
[compat]
13-
Documenter = "0.23, 0.24, 0.25"
13+
Documenter = "0.26"
1414
julia = "1.5"

docs/make.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
using Documenter, MixedModelsSim
1+
using Documenter
2+
using MixedModelsSim
23

3-
makedocs(;
4-
modules = [MixedModelsSim],
5-
format = Documenter.HTML(assets = String[]),
6-
pages = ["Home" => "index.md"
7-
"Full Example" => "simulation.md"],
8-
repo = "https://github.com/RePsychLing/MixedModelsSim.jl/blob/{commit}{path}#L{line}",
4+
makedocs(
5+
root = joinpath(dirname(pathof(MixedModelsSim)), "..", "docs"),
96
sitename = "MixedModelsSim.jl",
7+
doctest = true,
108
authors = "Phillip Alday, Douglas Bates, Lisa DeBruine, Reinhold Kliegl",
11-
source = joinpath("..", "docs", "src"),
12-
build = joinpath("..", "docs", "build"),
9+
pages = [
10+
"index.md",
11+
"simulation.md",
12+
],
1313
)
1414

1515
deploydocs(; repo = "github.com/RePsychLing/MixedModelsSim.jl", push_preview = true)

src/utilities.jl

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ end
158158
"""
159159
create_re(sigmas...; corrmat=Matrix{Float64}(I, length(sigmas), length(sigmas))
160160
161-
Create the covariance matrix for a random effect from the standard deviations and correlation matrix.
161+
Create the covariance factor for a random effect from the standard deviations and correlation matrix.
162162
163163
The `sigmas` should be specified in the same order as the random slopes in the
164164
output of `VarCorr(m)`.
@@ -167,18 +167,13 @@ The correlation matrix defaults to the identiy matrix, i.e. no correlation betwe
167167
random effects.
168168
169169
!!! note
170-
The return value is the lower Cholesky of the covariance matrix, which is what
170+
The return value is the lower Cholesky factor of the covariance matrix, which is what
171171
[`update!`](@ref) requires.
172172
"""
173173
function create_re(sigmas...; corrmat=nothing)
174-
dim = length(sigmas)
175-
ss = diagm([sigmas...])
174+
ss = Diagonal([sigmas...])
176175

177-
if isnothing(corrmat)
178-
LowerTriangular(ss)
179-
else
180-
cholesky(ss * corrmat * ss).L
181-
end
176+
isnothing(corrmat) ? LowerTriangular(ss) : ss * cholesky(Symmetric(corrmat, :L)).L
182177
end
183178

184179

0 commit comments

Comments
 (0)