Skip to content

Commit

Permalink
test, minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PharmCat committed Oct 20, 2021
1 parent a62ff0c commit 1ef2e71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/reml.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function fillzeroutri!(a::AbstractArray{T}) where T
tr = UpperTriangular(a)
fill!(tr, zero(T))
end
#=
function logerror!(e, lmm)
if isa(e, DomainError)
lmmlog!(lmm, LMMLogMsg(:ERROR, "DomainError ($(e.val), $(e.msg)) during REML calculation."))
Expand All @@ -40,6 +41,7 @@ function logerror!(e, lmm)
lmmlog!(lmm, LMMLogMsg(:ERROR, "Unknown error during REML calculation."))
end
end
=#
################################################################################
# REML without provided β
################################################################################
Expand Down
5 changes: 3 additions & 2 deletions src/rmat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ function rmatp_toephp!(mx, θ, rz, p)
nothing
end
################################################################################
#=
Base.@propagate_inbounds function edistance(i::AbstractVector{T1}, j::AbstractVector{T2}) where T1 where T2
length(i) == length(j) || error("length i not equal j")
sum = zero(promote_type(T1, T2))
Expand All @@ -181,8 +182,8 @@ end
end
return sqrt(sum)
end

function edistance(mx::AbstractMatrix{T}, i::Int, j::Int) where T
=#
Base.@propagate_inbounds function edistance(mx::AbstractMatrix{T}, i::Int, j::Int) where T
sum = zero(T)
for c = 1:size(mx, 2)
sum += (mx[i,c] - mx[j,c])^2
Expand Down
2 changes: 2 additions & 0 deletions test/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ include("testdata.jl")
@test t3table.pval[4] 0.7852154468081014 atol=1E-6
ct = Metida.contrast(lmm, [0 0 1 0 0 0; 0 0 0 1 0 0; 0 0 0 0 1 0])
@test t3table.pval[3] ct.pval[1]
est = Metida.estimate(lmm, [0,0,0,0,0,1]; level = 0.9)
@test_nowarn Base.show(io, est)
############################################################################
# AI like algo
Metida.fit!(lmm; aifirst = true, init = Metida.theta(lmm))
Expand Down

2 comments on commit 1ef2e71

@PharmCat
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

v0.11.0

  • rename anova to typeiii
  • New keywords for fit
  • Threads with Polyester
  • estimate() function
  • sweep logdet round-off error correction (negative values)
  • minor output changes
  • varlink function - square and identity
  • fix contrast construction for model with no intercept
  • experimental contrast function
  • C gradient in ModelResult
  • docs
  • test
  • drop missings

@JuliaRegistrator
Copy link

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/47177

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:

git tag -a v0.11.0 -m "<description of version>" 1ef2e71bf24aaa6a012b52ef17768187145160fb
git push origin v0.11.0

Please sign in to comment.