-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
PharmCat
committed
Jan 27, 2021
1 parent
12907e9
commit bc51a68
Showing
18 changed files
with
270 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "Metida" | ||
uuid = "a1dec852-9fe5-11e9-361f-8d9fde67cfa2" | ||
authors = ["Vladimir Arnautov <[email protected]>"] | ||
version = "0.2.0" | ||
version = "0.2.1" | ||
|
||
[deps] | ||
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,53 @@ | ||
## Details | ||
|
||
### V | ||
#### Model | ||
|
||
In matrix notation a mixed effect model can be represented as: | ||
|
||
```math | ||
y = X\beta + Zu + \epsilon | ||
``` | ||
|
||
#### V | ||
|
||
```math | ||
V_{i} = Z_{i}GZ_i'+R_{i} | ||
``` | ||
|
||
### REML | ||
#### Henderson's «mixed model equations» | ||
|
||
```math | ||
\begin{pmatrix}X'R^{-1}X&X'R^{-1}Z\\Z'R^{-1}X&Z'R^{-1}Z+G_{-1}\end{pmatrix} \begin{pmatrix}\widehat{\beta} \\ \widehat{u} \end{pmatrix}= \begin{pmatrix}X'R^{-1}y\\Z'R^{-1}y\end{pmatrix} | ||
``` | ||
|
||
The solution to the mixed model equations is a maximum likelihood estimate when the distribution of the errors is normal. PROC MIXED in SAS / MIXED SPSS used restricted maximum likelihood (REML) approach by default. REML equation by: Henderson, 1959; Laird et.al. 1982; Jennrich 1986; Lindstrom & Bates, 1988; Gurka et.al 2006. | ||
|
||
#### REML | ||
|
||
```math | ||
logREML(\theta,\beta) = -\frac{N-p}{2} - \frac{1}{2}\sum_{i=1}^nlog|V_{i}|- | ||
-\frac{1}{2}log|\sum_{i=1}^nX_i'V_i^{-1}X_i|-\frac{1}{2}\sum_{i=1}^n(y_i - X_{i}\beta)'V_i^{-1}(y_i - X_{i}\beta) | ||
``` | ||
|
||
### Beta | ||
#### Beta (β) | ||
|
||
```math | ||
\beta = {(\sum_{i=1}^n X_{i}'V_i^{-1}X_{i})}^{-1}(\sum_{i=1}^n X_{i}'V_i^{-1}y_{i}) | ||
``` | ||
|
||
### Sweep | ||
#### F | ||
|
||
```math | ||
F = \frac{\beta'L'(LCL')^{-1}L\beta}{rank(LCL')} | ||
``` | ||
|
||
#### Variance covariance matrix of β | ||
|
||
```math | ||
C = (\sum_{i=1}^{n} X_i'V_i^{-1}X_i)^{-1} | ||
``` | ||
|
||
#### Sweep | ||
|
||
Details see: https://github.com/joshday/SweepOperator.jl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
bc51a68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
bc51a68
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/28795
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: