Find number of parameters in a distribution

Albert_Zevelev
Thu, 08 Oct 2020 02:27:21 +0000
Statistics

Suppose I’m looping over a large vector of distributions from Distributions.jl.

How can I automatically find how many parameters there are in a distribution?
I want a function nparams(d) where:
nparams(Normal)=2 since Normal(μ,σ)
nparams(BetaBinomial)=3 since BetaBinomial(n,α,β)

4 posts - 2 participants