Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
PharmCat committed Mar 1, 2021
1 parent 0b2727e commit 714bd6c
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 12 deletions.
5 changes: 5 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

[`fit!`](@ref)

### Metida.CovarianceType
```@docs
Metida.CovarianceType
```

### Metida.ScaledIdentity
```@docs
Metida.ScaledIdentity
Expand Down
2 changes: 2 additions & 0 deletions docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ MixedModels result:
```@example lmmexample
fm = @formula(response ~ 1 + factor*time + (1 + time|subject&factor))
mm = fit(MixedModel, fm, rds, REML=true)
println(mm) #hide
```

### Example 2 - Two random factors (Penicillin data)
Expand All @@ -66,6 +67,7 @@ MixedModels:
fm2 = @formula(diameter ~ 1 + (1|plate) + (1|sample))
mm = fit(MixedModel, fm2, df, REML=true)
println(mm) #hide
```

### Example 3 - Repeated ARMA/AR/ARH
Expand Down
6 changes: 5 additions & 1 deletion docs/src/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Metida.jl work with small and medium datasets. Model fitting is based on varianc

Blocks depend on subjects. If you have only one random effect block is equivalent to subject. If you have more than one random effect blocks will be made as non-crossing combination for all subject variables.

* Q3: model not converging!
* Q3: Why model does not converge?

Optimization of REML function can depend on many factors. In some cases covariance parameters can be correlated (ill-conditioned/singular covariance matrix). So hypersurface in the maximum area can be very flat, that why the result can be different for different starting values (or for different software even REML is near equal). Also, some models can not be fitted for specific data at all. If the model not fitted try to check how meaningful and reasonable is the model or try to guess more robust initial conditions.

* Q2: Is model fitting is correct?

Use 'lmm.log' to see warnings and errors. If you have warnings and error maybe this model is overspecified. Try to change variance structure or guess more robust initial conditions.
10 changes: 6 additions & 4 deletions docs/src/instanduse.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ Metida.fit!
#### Step 1: make CustomCovarianceStruct

```@docs
Metida.CustomCovarianceStruct
Metida.CovmatMethod
```

#### Step 2: make CustomCovarianceType
See: [`Metida.CovmatMethod`](@ref)

```@docs
Metida.CustomCovarianceType
#### Step 2: make custom CovarianceType

```
CovarianceType(cm::AbstractCovmatMethod)
```

#### Step 3 Fit your model
Expand Down
5 changes: 0 additions & 5 deletions docs/src/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,6 @@ fit!(lmm)
| 7 | plate σ² | 0.716908 | | |
| 7 | sample σ² | 3.73092 | | |
| 7 | Residual σ²| 0.302415 | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |

## Section 3: Validation with bioequivalence datasets with Metida & SPSS

Expand Down
2 changes: 1 addition & 1 deletion src/Metida.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ TOEP, Toeplitz,
TOEPP, ToeplitzParameterized,
TOEPH, HeterogeneousToeplitz,
TOEPHP, HeterogeneousToeplitzParameterized,
CovmatMethod,
CovarianceType, CovmatMethod,
fit!, LMM, VarEffect, theta, logreml, m2logreml, thetalength, dof_satter, dof_contain, rankx, caic,
gmatrix, rmatrix, vmatrix!,
AbstractCovarianceType, AbstractCovmatMethod, MetidaModel
Expand Down
2 changes: 1 addition & 1 deletion src/varstruct.jl
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ end
"""
CovarianceType(cm::AbstractCovmatMethod)
Make custom covariance type with CustomCovarianceStruct.
Make custom covariance type with CovmatMethod.
"""
CovarianceType(cm::AbstractCovmatMethod) = CovarianceType(:FUNC, cm)

Expand Down

0 comments on commit 714bd6c

Please sign in to comment.