Skip to content

Commit 74c902a

Browse files
committed
md ws fixes
1 parent a69dadc commit 74c902a

File tree

8 files changed

+38
-38
lines changed

8 files changed

+38
-38
lines changed

docs/src/tutorials/concept.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ Available loss functions are
4949
- [`SemRidge`](@ref): ridge regularization
5050

5151
## The optimizer part aka `SemOptimizer`
52-
The optimizer part of a model connects to the numerical optimization backend used to fit the model.
53-
It can be used to control options like the optimization algorithm, linesearch, stopping criteria, etc.
52+
The optimizer part of a model connects to the numerical optimization backend used to fit the model.
53+
It can be used to control options like the optimization algorithm, linesearch, stopping criteria, etc.
5454
There are currently two available backends, [`SemOptimizerOptim`](@ref) connecting to the [Optim.jl](https://github.com/JuliaNLSolvers/Optim.jl) backend, and [`SemOptimizerNLopt`](@ref) connecting to the [NLopt.jl](https://github.com/JuliaOpt/NLopt.jl) backend.
5555
For more information about the available options see also the tutorials about [Using Optim.jl](@ref) and [Using NLopt.jl](@ref), as well as [Constrained optimization](@ref).
5656

docs/src/tutorials/construction/build_by_parts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ end
4040
4141
partable = ParameterTable(
4242
graph,
43-
latent_vars = latent_vars,
43+
latent_vars = latent_vars,
4444
observed_vars = observed_vars)
4545
```
4646

docs/src/tutorials/fitting/fitting.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ model_fit = sem_fit(model)
77

88
# output
99

10-
Fitted Structural Equation Model
11-
===============================================
12-
--------------------- Model -------------------
10+
Fitted Structural Equation Model
11+
===============================================
12+
--------------------- Model -------------------
1313

14-
Structural Equation Model
15-
- Loss Functions
14+
Structural Equation Model
15+
- Loss Functions
1616
SemML
17-
- Fields
18-
observed: SemObservedData
19-
implied: RAM
20-
optimizer: SemOptimizerOptim
17+
- Fields
18+
observed: SemObservedData
19+
implied: RAM
20+
optimizer: SemOptimizerOptim
2121

22-
------------- Optimization result -------------
22+
------------- Optimization result -------------
2323

2424
* Status: success
2525

docs/src/tutorials/meanstructure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ end
4040
4141
partable = ParameterTable(
4242
graph,
43-
latent_vars = latent_vars,
43+
latent_vars = latent_vars,
4444
observed_vars = observed_vars)
4545
```
4646

@@ -78,7 +78,7 @@ end
7878

7979
partable = ParameterTable(
8080
graph,
81-
latent_vars = latent_vars,
81+
latent_vars = latent_vars,
8282
observed_vars = observed_vars)
8383
```
8484

docs/src/tutorials/regularization/regularization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Setup
44

5-
For ridge regularization, you can simply use `SemRidge` as an additional loss function
5+
For ridge regularization, you can simply use `SemRidge` as an additional loss function
66
(for example, a model with the loss functions `SemML` and `SemRidge` corresponds to ridge-regularized maximum likelihood estimation).
77

88
For lasso, elastic net and (far) beyond, we provide the `ProximalSEM` package. You can install it and load it alongside `StructuralEquationModels`:
@@ -39,7 +39,7 @@ using ProximalOperators
3939
## `SemOptimizerProximal`
4040

4141
`ProximalSEM` provides a new "building block" for the optimizer part of a model, called `SemOptimizerProximal`.
42-
It connects our package to the [`ProximalAlgorithms.jl`](https://github.com/JuliaFirstOrder/ProximalAlgorithms.jl) optimization backend, providing so-called proximal optimization algorithms.
42+
It connects our package to the [`ProximalAlgorithms.jl`](https://github.com/JuliaFirstOrder/ProximalAlgorithms.jl) optimization backend, providing so-called proximal optimization algorithms.
4343
Those can handle, amongst other things, various forms of regularization.
4444

4545
It can be used as
@@ -87,7 +87,7 @@ end
8787
8888
partable = ParameterTable(
8989
graph,
90-
latent_vars = latent_vars,
90+
latent_vars = latent_vars,
9191
observed_vars = observed_vars
9292
)
9393

docs/src/tutorials/specification/graph_interface.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Graph interface
22

3-
## Workflow
3+
## Workflow
44
As discussed before, when using the graph interface, you can specify your model as a graph
55

66
```julia
@@ -17,7 +17,7 @@ latent_vars = ...
1717

1818
partable = ParameterTable(
1919
graph,
20-
latent_vars = latent_vars,
20+
latent_vars = latent_vars,
2121
observed_vars = observed_vars)
2222

2323
model = Sem(
@@ -32,7 +32,7 @@ In general, there are two different types of parameters: **directed** and **indi
3232
We allow multiple variables on both sides of an arrow, for example `x → [y z]` or `[a b] → [c d]`. The later specifies element wise edges; that is its the same as `a → c; b → d`. If you want edges corresponding to the cross-product, we have the double lined arrow `[a b] ⇒ [c d]`, corresponding to `a → c; a → d; b → c; b → d`. The undirected arrows ↔ (element-wise) and ⇔ (crossproduct) behave the same way.
3333

3434
!!! note "Unicode symbols in julia"
35-
The `` symbol is a unicode symbol allowed in julia (among many others; see this [list](https://docs.julialang.org/en/v1/manual/unicode-input/)). You can enter it in the julia REPL or the vscode IDE by typing `\to` followed by hitting `tab`. Similarly,
35+
The `` symbol is a unicode symbol allowed in julia (among many others; see this [list](https://docs.julialang.org/en/v1/manual/unicode-input/)). You can enter it in the julia REPL or the vscode IDE by typing `\to` followed by hitting `tab`. Similarly,
3636
- `` = `\leftarrow`,
3737
- `` = `\leftrightarrow`,
3838
- `` = `\Rightarrow`,
@@ -54,7 +54,7 @@ graph = @StenoGraph begin
5454
ξ₃ fixed(1.0)*ξ₃
5555
end
5656
```
57-
would
57+
would
5858
- fix the directed effects from `ξ₁` to `x1` and from `ξ₂` to `x2` to `1`
5959
- leave the directed effect from `ξ₃` to `x7` free but instead restrict the variance of `ξ₃` to `1`
6060
- give the effect from `ξ₁` to `x3` the label `:a` (which can be convenient later if you want to retrieve information from your model about that specific parameter)
@@ -66,7 +66,7 @@ As you saw above and in the [A first model](@ref) example, the graph object need
6666
```julia
6767
partable = ParameterTable(
6868
graph,
69-
latent_vars = latent_vars,
69+
latent_vars = latent_vars,
7070
observed_vars = observed_vars)
7171
```
7272

@@ -85,7 +85,7 @@ The variable names (`:x1`) have to be symbols, the syntax `:something` creates a
8585
_(latent_vars) _(latent_vars)
8686
end
8787
```
88-
creates undirected effects coresponding to
88+
creates undirected effects coresponding to
8989
1. the variances of all observed variables and
9090
2. the variances plus covariances of all latent variables
9191
So if you want to work with a subset of variables, simply specify a vector of symbols `somevars = [...]`, and inside the graph specification, refer to them as `_(somevars)`.

docs/src/tutorials/specification/parameter_table.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ As lavaan also uses parameter tables to store model specifications, we are worki
55

66
## Convert from and to RAMMatrices
77

8-
To convert a RAMMatrices object to a ParameterTable, simply use `partable = ParameterTable(rammatrices)`.
8+
To convert a RAMMatrices object to a ParameterTable, simply use `partable = ParameterTable(rammatrices)`.
99
To convert an object of type `ParameterTable` to RAMMatrices, you can use `ram_matrices = RAMMatrices(partable)`.

docs/src/tutorials/specification/ram_matrices.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# RAMMatrices interface
22

3-
Models can also be specified by an object of type `RAMMatrices`.
3+
Models can also be specified by an object of type `RAMMatrices`.
44
The RAM (reticular action model) specification corresponds to three matrices; the `A` matrix containing all directed parameters, the `S` matrix containing all undirected parameters, and the `F` matrix filtering out latent variables from the model implied covariance.
55

66
The model implied covariance matrix for the observed variables of a SEM is then computed as
@@ -56,9 +56,9 @@ A =[0 0 0 0 0 0 0 0 0 0 0 1.0 0 0
5656
θ = Symbol.(, 1:31)
5757

5858
spec = RAMMatrices(;
59-
A = A,
60-
S = S,
61-
F = F,
59+
A = A,
60+
S = S,
61+
F = F,
6262
params = θ,
6363
colnames = [:x1, :x2, :x3, :y1, :y2, :y3, :y4, :y5, :y6, :y7, :y8, :ind60, :dem60, :dem65]
6464
)
@@ -71,9 +71,9 @@ model = Sem(
7171

7272
Let's look at this step by step:
7373

74-
First, we specify the `A`, `S` and `F`-Matrices.
75-
For a free parameter, we write a `Symbol` like `:θ1` (or any other symbol we like) to the corresponding place in the respective matrix, to constrain parameters to be equal we just use the same `Symbol` in the respective entries.
76-
To fix a parameter (as in the `A`-Matrix above), we just write down the number we want to fix it to.
74+
First, we specify the `A`, `S` and `F`-Matrices.
75+
For a free parameter, we write a `Symbol` like `:θ1` (or any other symbol we like) to the corresponding place in the respective matrix, to constrain parameters to be equal we just use the same `Symbol` in the respective entries.
76+
To fix a parameter (as in the `A`-Matrix above), we just write down the number we want to fix it to.
7777
All other entries are 0.
7878

7979
Second, we specify a vector of symbols containing our parameters:
@@ -82,14 +82,14 @@ Second, we specify a vector of symbols containing our parameters:
8282
θ = Symbol.(, 1:31)
8383
```
8484

85-
Third, we construct an object of type `RAMMatrices`, passing our matrices and parameters, as well as the column names of our matrices.
85+
Third, we construct an object of type `RAMMatrices`, passing our matrices and parameters, as well as the column names of our matrices.
8686
Those are quite important, as they will be used to rearrange your data to match it to your `RAMMatrices` specification.
8787

8888
```julia
8989
spec = RAMMatrices(;
90-
A = A,
91-
S = S,
92-
F = F,
90+
A = A,
91+
S = S,
92+
F = F,
9393
params = θ,
9494
colnames = [:x1, :x2, :x3, :y1, :y2, :y3, :y4, :y5, :y6, :y7, :y8, :ind60, :dem60, :dem65]
9595
)
@@ -109,7 +109,7 @@ According to the RAM, model implied mean values of the observed variables are co
109109
```math
110110
\mu = F(I-A)^{-1}M
111111
```
112-
where `M` is a vector of mean parameters. To estimate the means of the observed variables in our example (and set the latent means to `0`), we would specify the model just as before but add
112+
where `M` is a vector of mean parameters. To estimate the means of the observed variables in our example (and set the latent means to `0`), we would specify the model just as before but add
113113

114114
```julia
115115
...
@@ -128,5 +128,5 @@ spec = RAMMatrices(;
128128

129129
## Convert from and to ParameterTables
130130

131-
To convert a RAMMatrices object to a ParameterTable, simply use `partable = ParameterTable(ram_matrices)`.
131+
To convert a RAMMatrices object to a ParameterTable, simply use `partable = ParameterTable(ram_matrices)`.
132132
To convert an object of type `ParameterTable` to RAMMatrices, you can use `ram_matrices = RAMMatrices(partable)`.

0 commit comments

Comments
 (0)