Skip to content

Deconvolve the distribution of a sample with known measurement error distribution

License

Notifications You must be signed in to change notification settings

maximerischard/DeconvolveDistribution.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeconvolveDistribution

Build Status

Coverage Status

codecov.io

If X comes from an unknown distribution F_X but we can only make noisy measurements W_i = X_i + U_i where the distribution of U_i is known, then the Fhat function provided by this package gives and estimate of F_X given the sample W and the error distribution of each sample.

    using DeconvolveDistribution
    using Distributions
    import Random

    # simulate some data
    n = 100
    F_X = MixtureModel([Normal(-1, 1), Normal(2, 0.8)], [0.6, 0.4])
    σ_distr = Gamma(1.0, 4.0)
    Random.seed!(1)
    X = rand(F_X, n)
    σ = rand(σ_distr, n)
    U_distr = Normal.(0.0, σ)
    U = rand.(U_distr)
    W = X .+ U

    # estimate F_X from simulated data
    n_xx = 120
    F_xx = collect(range(minimum(W), stop=maximum(W), length=n_xx))
    num_t = 50
    h = 0.5
    Fhat_xx = Fhat(F_xx, W, num_t, h, U_distr)

About

Deconvolve the distribution of a sample with known measurement error distribution

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages