Skip to content

Commit 07ff992

Browse files
committed
fix docs
1 parent e7564f9 commit 07ff992

File tree

6 files changed

+26
-20
lines changed

6 files changed

+26
-20
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ jobs:
6060
- uses: actions/checkout@v2
6161
- uses: julia-actions/setup-julia@v1
6262
with:
63-
version: '1.8'
63+
version: '1'
6464
- run: |
6565
julia --project=docs -e '
6666
using Pkg
67-
Pkg.add("Documenter")
68-
Pkg.add(url = "https://github.com/Hua-Zhou/MultiResponseVarianceComponentModels.jl.git")'
67+
Pkg.develop(PackageSpec(path=pwd()))
68+
Pkg.instantiate()'
6969
- run: |
7070
julia --project=docs -e '
7171
using Documenter: doctest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Manifest.toml
22
*.jl.*.mem
33
.DS_Store
4+
docs/build

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
MultiResponseVarianceComponentModels = "95bd6349-d788-4b5f-978d-e543c2eb4d7d"

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ using MultiResponseVarianceComponentModels
33

44
makedocs(
55
modules = [MultiResponseVarianceComponentModels],
6-
sitename = "MRVCs.jl",
6+
sitename = "MRVCModels.jl",
77
format = Documenter.HTML(
88
prettyurls = get(ENV, "CI", nothing) == "true",
99
assets = String[],

docs/src/examples.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,20 @@ Y = X * B + reshape(Ωchol.L * randn(n * d), n, d)
3333
# Maximum likelihood estimation
3434
```@repl 1
3535
model = MultiResponseVarianceComponentModel(Y, X, V)
36-
@time fit!(model, verbose = true)
36+
@timev fit!(model, verbose = true)
3737
```
3838

3939
For residual maximum likelihood estimation, you can instead type:
4040
```julia
41-
@time fit!(model, reml = true, verbose = true)
41+
@timev fit!(model, reml = true, verbose = true)
4242
```
4343

4444
Then variance components and mean effects estimates can be accessed through
4545
```@repl 1
4646
model.Σ
4747
model.B
48+
hcat(vec(B), vec(model.B))
49+
reduce(hcat, [hcat(vec(Σ[i]), vec(model.Σ[i])) for i in 1:m])
4850
```
4951

5052
# Standard errors

src/MultiResponseVarianceComponentModels.jl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,16 @@ struct MultiResponseVarianceComponentModel{T <: BlasReal}
4242
storage_d_d_1 :: Matrix{T}
4343
storage_d_d_2 :: Matrix{T}
4444
storage_d_d_3 :: Matrix{T}
45-
storage_d_d_4 :: Matrix{T}
46-
storage_d_d_5 :: Matrix{T}
47-
storage_d_d_6 :: Matrix{T}
48-
storage_d_d_7 :: Matrix{T}
45+
storage_d_d_4 :: Matrix{T} # for manopt.jl
46+
storage_d_d_5 :: Matrix{T} # for manopt.jl
47+
storage_d_d_6 :: Matrix{T} # for manopt.jl
48+
storage_d_d_7 :: Matrix{T} # for manopt.jl
4949
storage_p_p :: Matrix{T}
5050
storage_nd_nd :: Matrix{T}
5151
storage_pd_pd :: Matrix{T}
52-
storages_nd_nd :: Vector{Matrix{T}}
53-
Bcov :: Matrix{T}
54-
Σcov :: Matrix{T}
52+
storages_nd_nd :: Vector{Matrix{T}} # for fisher_Σ!
53+
Bcov :: Matrix{T} # for fisher_B!
54+
Σcov :: Matrix{T} # for fisher_Σ!
5555
logl :: Vector{T}
5656
end
5757

@@ -93,16 +93,16 @@ function MultiResponseVarianceComponentModel(
9393
storage_d_d_1 = Matrix{T}(undef, d, d)
9494
storage_d_d_2 = Matrix{T}(undef, d, d)
9595
storage_d_d_3 = Matrix{T}(undef, d, d)
96-
storage_d_d_4 = Matrix{T}(undef, d, d) # for manopt.jl
97-
storage_d_d_5 = Matrix{T}(undef, d, d) # for manopt.jl
98-
storage_d_d_6 = Matrix{T}(undef, d, d) # for manopt.jl
99-
storage_d_d_7 = Matrix{T}(undef, d, d) # for manopt.jl
96+
storage_d_d_4 = Matrix{T}(undef, d, d)
97+
storage_d_d_5 = Matrix{T}(undef, d, d)
98+
storage_d_d_6 = Matrix{T}(undef, d, d)
99+
storage_d_d_7 = Matrix{T}(undef, d, d)
100100
storage_p_p = Matrix{T}(undef, p, p)
101101
storage_nd_nd = Matrix{T}(undef, nd, nd)
102102
storage_pd_pd = Matrix{T}(undef, pd, pd)
103-
storages_nd_nd = [Matrix{T}(undef, nd, nd) for _ in 1:m] # for fisher_Σ!
104-
Bcov = Matrix{T}(undef, pd, pd) # for fisher_B!
105-
Σcov = Matrix{T}(undef, m * (binomial(d, 2) + d), m * (binomial(d, 2) + d)) # for fisher_Σ!
103+
storages_nd_nd = [Matrix{T}(undef, nd, nd) for _ in 1:m]
104+
Bcov = Matrix{T}(undef, pd, pd)
105+
Σcov = Matrix{T}(undef, m * (binomial(d, 2) + d), m * (binomial(d, 2) + d))
106106
logl = zeros(T, 1)
107107
MultiResponseVarianceComponentModel{T}(
108108
Y, Xmat, V,

0 commit comments

Comments
 (0)