Skip to content

Commit e603914

Browse files
committed
v0.3.3
1 parent 7c5daf4 commit e603914

3 files changed

Lines changed: 12 additions & 17 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MultiResponseVarianceComponentModels"
22
uuid = "95bd6349-d788-4b5f-978d-e543c2eb4d7d"
33
authors = ["Hua Zhou <huazhou@ucla.edu> and Minsoo Kim <mmkim1210@gmail.com>"]
4-
version = "0.3.2"
4+
version = "0.3.3"
55

66
[deps]
77
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"

src/parse.jl

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Perform a variation of the likelihood ratio test for univariate variance compone
55
Molenberghs and Verbeke 2007 with model1 and model0 being the full and nested models, respectively.
66
"""
77
function 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(
1919
end
2020

2121
"""
22-
h2(model::MRVCModel)
22+
h2(model::VCModel)
2323
2424
Calculate heritability estimates and their standard errors, assuming that all variance components
2525
capture genetic effects except the last term. Also return total heritability from sum of individual
2626
contributions 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)
6563
end
6664

6765
"""
68-
rg(model::MRVCModel)
66+
rg(model::VCModel)
6967
7068
Calculate 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

test/missing_test.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ using Test
1515
@test Y_imputed == [3.0 7.5 9.0 13.0; 2.0 7.5 10.0 14.0; 3.0 7.0 11.0 13.5; 4.0 8.0 12.0 13.5]
1616
end
1717

18-
end
19-
18+
end

0 commit comments

Comments
 (0)