1
1
2
2
# StudentT distribution
3
3
4
- export StudentT
4
+ export StudentT, HalfStudentT
5
5
6
6
@parameterized StudentT (ν) ≪ Lebesgue (ℝ)
7
7
8
8
@kwstruct StudentT (ν)
9
+ @kwstruct StudentT (ν,μ)
10
+ @kwstruct StudentT (ν,σ)
11
+ @kwstruct StudentT (ν,μ,σ)
9
12
10
- StudentT (nt:: NamedTuple{(:ν,:μ,:σ)} ) = Affine (nt , StudentT ())
11
- StudentT (nt:: NamedTuple{(:ν,:μ,:ω)} ) = Affine (nt , StudentT ())
12
- StudentT (nt:: NamedTuple{(:ν,:σ,)} ) = Affine (nt , StudentT ())
13
- StudentT (nt:: NamedTuple{(:ν,:ω,)} ) = Affine (nt , StudentT ())
14
- StudentT (nt:: NamedTuple{(:ν,:μ,)} ) = Affine (nt , StudentT ())
13
+ StudentT (nt:: NamedTuple{(:ν,:μ,:σ)} ) = Affine (NamedTuple {(:μ,:σ)} (nt) , StudentT (ν = nt . ν ))
14
+ StudentT (nt:: NamedTuple{(:ν,:μ,:ω)} ) = Affine (NamedTuple {(:μ,:ω)} (nt) , StudentT (ν = nt . ν ))
15
+ StudentT (nt:: NamedTuple{(:ν,:σ,)} ) = Affine (NamedTuple {(:σ,)} (nt) , StudentT (ν = nt . ν ))
16
+ StudentT (nt:: NamedTuple{(:ν,:ω,)} ) = Affine (NamedTuple {(:ω,)} (nt) , StudentT (ν = nt . ν ))
17
+ StudentT (nt:: NamedTuple{(:ν,:μ,)} ) = Affine (NamedTuple {(:μ,)} (nt) , StudentT (ν = nt . ν ))
15
18
16
19
@affinepars StudentT
17
20
@@ -37,11 +40,10 @@ TV.as(::StudentT) = asℝ
37
40
38
41
Base. rand (rng:: AbstractRNG , T:: Type , μ:: StudentT{(:ν,)} ) = rand (rng, Dists. TDist (μ. ν))
39
42
40
- distproxy (d:: StudentT{(:ν, :μ, :σ )} ) = Dists. LocationScale (d . μ, d . σ, Dists . TDist (d. ν) )
43
+ distproxy (d:: StudentT{(:ν,)} ) = Dists. TDist (d. ν)
41
44
42
45
@half StudentT
43
- @kwstruct StudentT ()
44
46
45
- HalfStudentT (ν,σ) = HalfStudentT (ν= ν,σ= σ)
47
+ HalfStudentT (ν, σ) = HalfStudentT (( ν= ν, σ= σ) )
46
48
47
49
asparams (:: Type{<:StudentT} , :: Val{:ν} ) = asℝ₊
0 commit comments