diff --git a/Project.toml b/Project.toml index 0c996e6b..d1ba0a2d 100644 --- a/Project.toml +++ b/Project.toml @@ -3,7 +3,7 @@ uuid = "a1dec852-9fe5-11e9-361f-8d9fde67cfa2" keywords = ["lenearmodel", "mixedmodel"] desc = "Mixed-effects models with flexible covariance structure." authors = ["Vladimir Arnautov "] -version = "0.14.4" +version = "0.14.5" [deps] DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" diff --git a/docs/src/api.md b/docs/src/api.md index f1bbeb27..313fe271 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -141,6 +141,11 @@ Metida.hessian Metida.lcontrast ``` +### Metida.nblocks +```@docs +Metida.nblocks +``` + ### Metida.rand ```@docs Metida.rand @@ -148,7 +153,12 @@ Metida.rand ### Metida.rand! ```@docs -Metida.rand +Metida.rand! +``` + +### Metida.raneff +```@docs +Metida.raneff ``` ### Metida.rankx @@ -215,7 +225,7 @@ Metida.confint ### Metida.crossmodelmatrix ```@docs -StatsBase.crossmodelmatrix +Metida.crossmodelmatrix ``` ### Metida.dof @@ -253,21 +263,11 @@ Metida.loglikelihood Metida.modelmatrix ``` -### Metida.nblocks -```@docs -Metida.nblocks -``` - ### Metida.nobs ```@docs Metida.nobs ``` -### Metida.raneff -```@docs -Metida.raneff -``` - ### Metida.response ```@docs Metida.response diff --git a/docs/src/details.md b/docs/src/details.md index 1b6a177a..4ecea801 100644 --- a/docs/src/details.md +++ b/docs/src/details.md @@ -33,7 +33,7 @@ logREML(\theta,\beta) = -\frac{N-p}{2} - \frac{1}{2}\sum_{i=1}^nlog|V_{\theta, i -\frac{1}{2}log|\sum_{i=1}^nX_i'V_{\theta, i}^{-1}X_i|-\frac{1}{2}\sum_{i=1}^n(y_i - X_{i}\beta)'V_{\theta, i}^{-1}(y_i - X_{i}\beta) ``` -Actually ```L(\theta) = -2logREML = L_1(\theta) + L_2(\theta) + \L_3(\theta) + c`` used for optimization, where: +Actually ```L(\theta) = -2logREML = L_1(\theta) + L_2(\theta) + L_3(\theta) + c`` used for optimization, where: ```math L_1(\theta) = \frac{1}{2}\sum_{i=1}^nlog|V_{i}| \\ diff --git a/docs/src/nlopt.md b/docs/src/nlopt.md index 684308b7..5f5aaa0e 100644 --- a/docs/src/nlopt.md +++ b/docs/src/nlopt.md @@ -19,3 +19,9 @@ random = VarEffect(@covstr(formulation|subject), CSH), repeated = VarEffect(@covstr(formulation|subject), VC)) fit!(lmm; solver = :nlopt) ``` + + +NLopt is a free/open-source library for nonlinear optimization, providing a common interface for a number of different free optimization routines available online as well as original implementations of various other algorithms. + + +Optimization with NLopt.jl using gradient-free algirithms is less stable, that why two-step optimization schema used. Results can be slightly different for differens OS and Julia versions. Always look into logs. \ No newline at end of file diff --git a/src/linearalgebra.jl b/src/linearalgebra.jl index 9b0b5da9..05f6963a 100644 --- a/src/linearalgebra.jl +++ b/src/linearalgebra.jl @@ -2,6 +2,8 @@ # Fine """ + mulαβαtinc!(θ::AbstractMatrix, A::AbstractMatrix, B::AbstractMatrix) + θ + A * B * A' Change θ (only upper triangle). B is symmetric. @@ -31,6 +33,8 @@ function mulαβαtinc!(θ::AbstractMatrix{T}, A::AbstractMatrix{T}, B::Abstract end =# """ + mulαβαtinc!(θ::AbstractMatrix, A::AbstractMatrix, B::AbstractMatrix, alpha) + θ + A * B * A' * alpha Change θ (only upper triangle). B is symmetric. @@ -54,6 +58,8 @@ Change θ (only upper triangle). B is symmetric. θ end """ + mulαβαtinc!(θ::AbstractVector{T}, A::AbstractMatrix, B::AbstractMatrix, a::AbstractVector, b::AbstractVector, alpha) where T + θ + A * B * (a - b) * alpha Change θ (only upper triangle). B is symmetric. @@ -114,6 +120,8 @@ use only upper triangle of V end """ + mulαtβinc!(θ::AbstractVector{T}, A::AbstractMatrix, b::AbstractVector) where T + θ + A' * b Change θ.