diff_diff.RDPlotResult#
- class diff_diff.RDPlotResult[source]#
Bases:
DiagnosticQuantities of a data-driven RD plot (field names follow R’s rdplot return list;
vars_binscolumns carry R’srdplot_*names).Jis always integral: a fractionalscale * Jproduct takes the ceiling per CCT 2015 Equation 2 (see the Deviation note inRDPlot- R 4.0.0 crashes on that surface instead).vars_binscontains only NON-EMPTY bins (R’stapplysemantics) whilebin_avg/bin_medsummarize ALL bin lengths of the partition. CI columns are always computed (atci_level);ci_requestedrecords whetherci=was passed and is the default for drawing error bars inplot().Methods
__init__(coef, vars_bins, vars_poly, J, ...)plot([ax, title, xlabel, ylabel, ...])Render the RD plot (binned means, global polynomial curves, cutoff line; error bars when CIs were requested at fit time or forced via
show_ci=True).summary()Formatted summary mirroring R's
summary.rdplotlayout (rdplot.R:610-654), including the implied scale and WIMSE weights.to_dataframe()The non-empty-bin table (
vars_bins), copied.Attributes
covariate_coefficientscovariates_droppedwimse_bias_weightImplied WIMSE bias weights
rscale^3/(1 + rscale^3)per side.wimse_variance_weightImplied WIMSE variance weights
1/(1 + rscale^3)per side (CCT 2015 Supplement S.1; printed by R'ssummary.rdplot).coefvars_binsvars_polyJJ_IMSEJ_MVscalerscalebin_avgbin_medpcutoffhNN_hbinselectkernel_typeci_levelci_requested- __init__(coef, vars_bins, vars_poly, J, J_IMSE, J_MV, scale, rscale, bin_avg, bin_med, p, cutoff, h, N, N_h, binselect, kernel_type, ci_level, ci_requested, covariate_coefficients=None, covariates_dropped=None)#
- classmethod __new__(*args, **kwargs)#