Skip to content

Commit

Permalink
(re)moved MixedModelsExt traces (#243)
Browse files Browse the repository at this point in the history
* (re)moved MixedModelsExt traces

* fix julia1.10 bug, it was non-stable rng unittest

* remove lmm docs in make.jl

* feel free to include this test, once UnfoldSim.jl is through review...

* fix ref error
  • Loading branch information
behinger authored Jan 13, 2025
1 parent 015b6fa commit 639abf4
Show file tree
Hide file tree
Showing 33 changed files with 48 additions and 2,068 deletions.
1 change: 1 addition & 0 deletions .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
GKSwstype: "100" # https://discourse.julialang.org/t/generation-of-documentation-fails-qt-qpa-xcb-could-not-connect-to-display/60988

- name: Update UnfoldDocs
if: github.ref == 'refs/heads/main'
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.UNFOLDDOCSPAT }}
Expand Down
6 changes: 1 addition & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Unfold"
uuid = "181c99d8-e21b-4ff3-b70b-c233eddec679"
authors = ["Benedikt Ehinger <science@benediktehinger.de>"]
version = "0.7.9"
version = "0.8.0-dev"

[deps]
BSplineKit = "093aae92-e908-43d7-9660-e50ee39d5a0a"
Expand All @@ -22,7 +22,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MLBase = "f0e99cf1-93fa-52ec-9ecc-5026115318e0"
Missings = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
MixedModels = "ff71e718-51f3-5ec2-a782-8ffcbfa3c316"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
PooledArrays = "2dfb63ee-cc39-5dd5-95bd-886bf059d720"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Expand All @@ -44,14 +43,12 @@ TypedTables = "9d95f2ec-7b3d-5a63-8d20-e2491e220bb9"
BSplineKit = "093aae92-e908-43d7-9660-e50ee39d5a0a"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
MixedModels = "ff71e718-51f3-5ec2-a782-8ffcbfa3c316"
RobustModels = "d6ea1423-9682-4bbd-952f-b1577cbf8c98"

[extensions]
UnfoldBSplineKitExt = "BSplineKit"
UnfoldCUDAExt = "CUDA"
UnfoldKrylovExt = ["Krylov", "CUDA"]
UnfoldMixedModelsExt = "MixedModels"
UnfoldRobustModelsExt = "RobustModels"

[compat]
Expand All @@ -73,7 +70,6 @@ LinearAlgebra = "1"
Logging = "1"
MLBase = "0.9"
Missings = "1"
MixedModels = "4"
OrderedCollections = "1"
PooledArrays = "1"
ProgressMeter = "1"
Expand Down
3 changes: 0 additions & 3 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ makedocs(
"Tutorials" => [
"rERP (mass univariate)" => "tutorials/lm_mu.md",
"rERP (overlap correction)" => "tutorials/lm_overlap.md",
"lmmERP (mass univariate)" => "tutorials/lmm_mu.md",
"lmmERP (overlap correction)" => "tutorials/lmm_overlap.md",
],
"HowTo" => [
"Multiple events" => "HowTo/multiple_events.md",
Expand All @@ -37,7 +35,6 @@ makedocs(
"Marginal effects (must read re: splines)" => "generated/HowTo/effects.md",
"Alternative Solvers (Robust, GPU, B2B)" => "HowTo/custom_solvers.md",
#"Time domain basis functions"=>"generated/HowTo/timesplines.md",
"P-values for mixedModels" => "HowTo/lmm_pvalues.md",
"Save and load Unfold models" => "generated/HowTo/unfold_io.md",
"Duration-scaled basisfunctions (Hassall-style)" => "generated/HowTo/FIRduration.md",
"🐍 Import EEG with PyMNE.jl" => "HowTo/pymne.md",
Expand Down
102 changes: 0 additions & 102 deletions docs/src/HowTo/lmm_pvalues.md

This file was deleted.

28 changes: 26 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Unfold Documentation

If you want to follow the **tutorials**, best to start with the [mass-univariate approach](@ref lm_massunivariate), which should be familiar to you if you did ERPs before. Then the [overlap-correction tutorial](@ref lm_overlap), [mixed mass univariate](@ref lmm_massunivariate), [mixed overlap (tricky!)](@ref lmm_overlap). If you are then not satisfied, check out more advanced topics: [effects-interface (aka what to do after fitting)](@ref effects), or non-linear effects.
If you want to follow the **tutorials**, best to start with the [mass-univariate approach](@ref lm_massunivariate), which should be familiar to you if you did ERPs before. Then the [overlap-correction tutorial](@ref lm_overlap). If you are then not satisfied, check out more advanced topics: [effects-interface (aka what to do after fitting)](@ref effects), or non-linear effects.

In case you want to understand the tools better, check out our **explanations**.

Expand All @@ -17,8 +17,32 @@ There are four main model types
1. Timeexpansion **No**, Mixed **Yes** : `fit(UnfoldModel, [Any=>(fLMM, -0.1:0.01:0.5)], evts, data_epoch)`
1. Timeexpansion **Yes**, Mixed **Yes**: `fit(UnfoldModel, [Any=>(fLMM, basisfunction)], evts, data)`

## rERP model

```julia
using Unfold
using UnfoldSim
data, evts = UnfoldSim.predef_eeg()

f = @formula 0 ~ 1 + condition
basisfunction = firbasis= (-0.1,0.5), sfreq = 100)
fit(UnfoldModel, [Any=>(f, basisfunction)], evts, data)
nothing #hide
```

## MixedModels

It is also possible to fit Linear Mixed Models using the sister-package `UnfoldMixedModels.jl`

```julia
using UnfoldMixedModels
using UnfoldSim
data, evts = UnfoldSim.predef_eeg(10;return_epoched=true) # 10 subjects
data = reshape(data,size(data,1),:) # concatenate subjects

times = range(-0.1,0.5,size(data,1)) # arbitrary time-vector

fLMM = @formula 0 ~ 1 + condition + (1|subject) + (1|item)
basisfunction = firbasis= (-0.1,0.5), sfreq = 100))
fit(UnfoldModel, [Any=>(f, times)], evts, data)
nothing #hide
```
9 changes: 0 additions & 9 deletions docs/src/references/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
In Julia 1.9 Package Extensions were introduced. Unfold.jl is making use of them in four ways.
Prior to using some functionality, you have to add + load specific package(s) for the functionality to be available. The reason for this is, that if you don't need e.g. GPU-support, you also will not need to install it.

## MixedModels

To use formulas like `@formula(0~1+condition+(1+condition|subject))` you have to load MixedModels. e.g.

```julia
using MixedModels
using Unfold
```

## GPU: Krylov,CUDA

To use gpu support as described in @Ref(custom_solvers) you have to:
Expand Down
83 changes: 0 additions & 83 deletions docs/src/tutorials/lmm_mu.md

This file was deleted.

79 changes: 0 additions & 79 deletions docs/src/tutorials/lmm_overlap.md

This file was deleted.

Loading

0 comments on commit 639abf4

Please sign in to comment.