Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "MixedModelsSim"
uuid = "d5ae56c5-23ca-4a1f-b505-9fc4796fc1fe"
authors = ["Phillip Alday", "Douglas Bates", "Lisa DeBruine", "Reinhold Kliegl"]
version = "0.2.11"
version = "0.2.12"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -14,9 +14,9 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

[compat]
LinearAlgebra = "1"
MixedModels = "4"
MixedModels = "4.22, 5"
PooledArrays = "0.5, 1"
PrettyTables = "0.11, 0.12, 1, 2"
Statistics = "1"
Tables = "1.0"
julia = "1.6"
julia = "1.10"
15 changes: 5 additions & 10 deletions docs/src/simulation_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,9 @@ rng = StableRNG(42);

Run nsims iterations:
```@example Main
kb07_sim = parametricbootstrap(rng, nsims, kb07_m; use_threads = false);
kb07_sim = parametricbootstrap(rng, nsims, kb07_m);
```

**Try**: Run the code above with or without `use_threads = true`. Did performance get better or worse? Check out the help information `parametricbootstrap` to see why!

The returned value `kb07_sim` contains the results of the bootstrapping procedure, which we can convert to a dataframe

```@example Main
Expand Down Expand Up @@ -221,7 +219,7 @@ new_beta[2:4] = kb07_m.β[2:4] / 2

Run simulations:
```@example Main
kb07_sim_half = parametricbootstrap(StableRNG(42), nsims, kb07_m; β = new_beta, use_threads = false);
kb07_sim_half = parametricbootstrap(StableRNG(42), nsims, kb07_m; β = new_beta);
```

### Power calculation
Expand Down Expand Up @@ -485,8 +483,7 @@ Run nsims iterations:
sim1 = parametricbootstrap(rng, nsims, m1;
β = new_beta,
σ = new_sigma,
θ = new_theta,
use_threads = false);
θ = new_theta);
```

### Power calculation
Expand Down Expand Up @@ -644,8 +641,7 @@ Run nsims iterations:
fake_kb07_sim = parametricbootstrap(rng, nsims, fake_kb07_m,
β = new_beta,
σ = new_sigma,
θ = new_theta,
use_threads = false);
θ = new_theta);
```

### Power calculation
Expand Down Expand Up @@ -765,8 +761,7 @@ nothing # hide
β = new_beta,
σ = new_sigma,
θ = new_theta,
use_threads = false,
hide_progress=true);
progress=false);

# Power calculation
local ptbl = power_table(fake_sim)
Expand Down
2 changes: 1 addition & 1 deletion test/power.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dat = simdat_crossed(StableRNG(42), subj_n, item_n;
form = @formula(dv ~ 1 + age + pet + cond + time + (1 | subj) + (1 | item));
cont = Dict(nm => HelmertCoding() for nm in (:age, :pet, :cond, :time));
fm1 = fit(MixedModel, form, dat; contrasts=cont, REML=false, progress=false);
sim = parametricbootstrap(StableRNG(42), 10, fm1; use_threads=false, hide_progress=true);
sim = parametricbootstrap(StableRNG(42), 10, fm1; progress=false);

@testset "power_table" begin
pt = power_table(sim)
Expand Down
Loading