@@ -5,8 +5,8 @@ Perform a variation of the likelihood ratio test for univariate variance compone
55Molenberghs and Verbeke 2007 with model1 and model0 being the full and nested models, respectively.
66"""
77function lrt (
8- model1 :: MRVCModel ,
9- model0 :: MRVCModel
8+ model1 :: VCModel ,
9+ model0 :: VCModel
1010 )
1111 df = length (model1. V) - length (model0. V)
1212 @assert df > 0
@@ -19,18 +19,16 @@ function lrt(
1919end
2020
2121"""
22- h2(model::MRVCModel )
22+ h2(model::VCModel )
2323
2424Calculate heritability estimates and their standard errors, assuming that all variance components
2525capture genetic effects except the last term. Also return total heritability from sum of individual
2626contributions and its standard error.
2727"""
28- function h2 (
29- model :: MRVCModel{T}
30- ) where T <: BlasReal
28+ function h2 (model:: VCModel )
3129 m, d = length (model. Σ), size (model. Σ[1 ], 1 )
32- h2s = zeros (T , m, d)
33- ses = zeros (T , m, d)
30+ h2s = zeros (eltype (model . Y) , m, d)
31+ ses = zeros (eltype (model . Y) , m, d)
3432 tot = sum ([model. Σ[l] for l in 1 : m])
3533 idx = findvar (d)
3634 s = ◺ (d)
@@ -65,17 +63,15 @@ function findvar(d::Int)
6563end
6664
6765"""
68- rg(model::MRVCModel )
66+ rg(model::VCModel )
6967
7068Calculate genetic/residual correlation estimates and their standard errors.
7169"""
72- function rg (
73- model :: MRVCModel{T}
74- ) where T <: BlasReal
70+ function rg (model:: VCModel )
7571 m, d = length (model. Σ), size (model. Σ[1 ], 1 )
7672 @assert d > 1
77- rgs = [zeros (T , d, d) for _ in 1 : m]
78- ses = [ones (T , d, d) for _ in 1 : m]
73+ rgs = [zeros (eltype (model . Y) , d, d) for _ in 1 : m]
74+ ses = [ones (eltype (model . Y) , d, d) for _ in 1 : m]
7975 idx = findvar (d)
8076 s = ◺ (d)
8177 for i in 1 : m
0 commit comments