In Distributions.jl
, is there no build-in functionality to fit truncated distributions? Of course I can write a small routine to do this, but either I cannot find documentation on it, or it is perhaps not implemented? If the answer is the latter, is there a good reason for this?
In essence, what I am trying to do is
julia> truncnorm = truncated(Normal(0,1), lower=0.0)
Truncated(Normal{Float64}(μ=0.0, σ=1.0); lower=0.0)
julia> xsamples = rand(truncnorm, 10_000);
julia> fit(Truncated(Normal{Float64}; lower=0.0))
ERROR: MethodError: no method matching Truncated(::Type{Normal{Float64}}; lower::Float64)