Documentation

Dyadic kernel density estimation

DyadicKDE.DyadicKernelDensityEstimatorMethod
DyadicKernelDensityEstimator(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.
source
DyadicKDE.fitMethod
fit(est::DyadicKernelDensityEstimator)

Fit a dyadic kernel density estimator to data.

source

Counterfactual dyadic kernel density estimation

DyadicKDE.CounterfactualDyadicKernelDensityEstimatorMethod
CounterfactualDyadicKernelDensityEstimator(kernel_name, bandwidth, significance_level,
                                           n_resample, sdp_solver, evals,
                                           W, X0, X1, meta)

Construct a counterfactual 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 treated dyadic data.
  • X0::Vector{Int}: categorical vector of untreated covariates.
  • X1::Vector{Int}: categorical vector of treated covariates.
  • meta::Dict: any extra information to pass to the estimator.
source
DyadicKDE.ParametricCounterfactualDyadicKernelDensityEstimatorMethod
ParametricCounterfactualDyadicKernelDensityEstimator(kernel_name, bandwidth, significance_level,
                                                     n_resample, sdp_solver, evals,
                                                     W, X0, X1, meta)

Construct a parametric counterfactual 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 treated dyadic data.
  • X0::Vector{Int}: categorical vector of untreated covariates.
  • X1::Vector{Int}: categorical vector of treated covariates.
  • phat0::Vector{Float64}: vector of precomputed parametric untreated covariate estimates.
  • phat1::Vector{Float64}: vector of precomputed parametric treated covariate estimates.
  • meta::Dict: any extra information to pass to the estimator.
source
Base.Multimedia.displayMethod
display(est::CounterfactualDyadicKernelDensityEstimator)

Display a counterfactual dyadic kernel density estimator.

source
Base.Multimedia.displayMethod
display(est::ParametricCounterfactualDyadicKernelDensityEstimator)

Display a parametric counterfactual dyadic kernel density estimator.

source
DyadicKDE.fitMethod
fit(est::CounterfactualDyadicKernelDensityEstimator)

Fit a counterfactual dyadic kernel density estimator to data.

source
DyadicKDE.fitMethod
fit(est::ParametricCounterfactualDyadicKernelDensityEstimator)

Fit a parametric counterfactual dyadic kernel density estimator to data.

source

Helper functions

DyadicKDE.get_RIMSEMethod
get_RIMSE(fhat::Vector{Float64}, f::Vector{Float64})

Compute the root integrated mean squared error of an estimate for a function.

source
DyadicKDE.get_coverageMethod
get_coverage(cb::Matrix{Float64}, f::Vector{Float64})

Check if a confidence band covers the true density function.

source
DyadicKDE.get_fMethod
get_f(p::Vector{Float64}, evals::Vector{Float64})

Get the true density function from example dyadic Gaussian mixture data.

source