Documentation
Dyadic kernel density estimation
DyadicKDE.DyadicKernelDensityEstimator
— TypeComposite type to represent a dyadic kernel density estimator.
DyadicKDE.DyadicKernelDensityEstimator
— MethodDyadicKernelDensityEstimator(kernel_name, bandwidth, significance_level,
n_resample, sdp_solver, evals, W, meta)
Construct a dyadic kernel density estimator.
Arguments
kernel_name::String
: which kernel to use.bandwidth::Float64
: the bandwidth for the estimator.significance_level::Float64
: for the confidence band/intervals.n_resample::Int
: the number of resamples used to construct the confidence band/intervals.sdp_solver::String
: semi-definite program solver.evals::Vector{Float64}
: points at which to evaluate the density estimator.W::UpperTriangular{Float64}
: array of dyadic data.meta::Dict
: any extra information to pass to the estimator.
Base.Multimedia.display
— Methoddisplay(est::DyadicKernelDensityEstimator)
Display a dyadic kernel density estimator.
DyadicKDE.estimate_ROT_bandwidth
— Methodestimate_ROT_bandwidth(W::UpperTriangular{Float64},
kernel_name::String)
Estimate a rule-of-thumb bandwidth from dyadic data.
DyadicKDE.fit
— Methodfit(est::DyadicKernelDensityEstimator)
Fit a dyadic kernel density estimator to data.
Counterfactual dyadic kernel density estimation
Helper functions
DyadicKDE.get_RIMSE
— Methodget_RIMSE(fhat::Vector{Float64}, f::Vector{Float64})
Compute the root integrated mean squared error of an estimate for a function.
DyadicKDE.get_average_width
— Methodget_average_width(cb::Matrix{Float64})
Return the average width of a confidence band.
DyadicKDE.get_coverage
— Methodget_coverage(cb::Matrix{Float64}, f::Vector{Float64})
Check if a confidence band covers the true density function.
DyadicKDE.get_f
— Methodget_f(p::Vector{Float64}, evals::Vector{Float64})
Get the true density function from example dyadic Gaussian mixture data.
DyadicKDE.make_dyadic_data
— Methodmake_dyadic_data(n_data::Int, p::Vector{Float64})
Generate some example dyadic data using a Gaussian mixture model.
DyadicKDE.mean
— Methodmean(x::Vector{<:Number})
Compute the mean of a vector of numbers.
DyadicKDE.phi
— Methodphi(t::Real)
Compute the standard normal density function.