diff --git a/src/likelihoods/gamma.jl b/src/likelihoods/gamma.jl index bf632d4..4492a9d 100644 --- a/src/likelihoods/gamma.jl +++ b/src/likelihoods/gamma.jl @@ -6,9 +6,9 @@ Gamma likelihood with fixed shape `α`. ```math p(y|f) = \\operatorname{Gamma}(y | α, l(f)) ``` -On calling, this would return a gamma distribution with shape `α` and scale `l(f)`. +On calling, this would return a Gamma distribution with shape `α` and scale `invlink(f)`. """ -struct GammaLikelihood{T<:Real,Tl<:AbstractLink} <: AbstractLikelihood +struct GammaLikelihood{Tl<:AbstractLink,T<:Real} <: AbstractLikelihood α::T # shape parameter invlink::Tl end diff --git a/test/likelihoods/gamma.jl b/test/likelihoods/gamma.jl index 1c5141e..1aeb73e 100644 --- a/test/likelihoods/gamma.jl +++ b/test/likelihoods/gamma.jl @@ -1,7 +1,7 @@ @testset "GammaLikelihood" begin for args in ((), (1.0,), (exp,), (ExpLink(),), (1.0, exp), (1.0, ExpLink())) lik = GammaLikelihood(args...) - @test lik isa GammaLikelihood{Float64,ExpLink} + @test lik isa GammaLikelihood{ExpLink,Float64} @test lik.α == 1 end