Bayesian Inference in Regression Discontinuity Designs


[Up] [Top]

Documentation for package ‘LoTTA’ version 0.1.0

Help Pages

Bin_data Function that splits the data into bins and computes the average in each bin
BIN_outcome_function_sample Function that evaluates the binary outcome function in a domain x, given the coefficients
bounds function that finds maximum widow size to searxh for a cutoff
CONT_outcome_function_sample Function that evaluates the continuous outcome function in a domain x, given the coefficients
Initial_CONT_BIN function that samples initial values for fuzzy LoTTA model with a continuous prior and binary outcomes
Initial_CONT_CONT function that samples initial values for fuzzy LoTTA model with a ontinuous prior and continuous outcomes
Initial_DIS_BIN function that samples initial values for LoTTA with a discerete prior and binary ourcomes
Initial_DIS_CONT function that samples initial values for fuzzy LoTTA model with a discrete prior and binary outcomes
Initial_FUZZy_BIN function that samples initial values for fuzzy LoTTA model with a known cutoff and binary outcomes
Initial_FUZZy_CONT function that samples initial values for fuzzy LoTTA model with a known cutoff and continuous outcomes
Initial_SHARP_BIN function that samples initial values for sharp LoTTA model with binary outcomes
Initial_SHARP_CONT function that samples initial values for sharp LoTTA model with continuous outcomes
Initial_treatment_c function that samples initial values for the treatment model with a known cutoff
Initial_treatment_CONT function that samples initial values for the treatment model with a continuous prior
Initial_treatment_DIS function that samples initial values for the treatment model with a discrete prior
invlogit inverse logit function
logit logit function
LoTTA_fuzzy_BIN LoTTA_fuzzy_BIN
LoTTA_fuzzy_CONT LoTTA_fuzzy_CONT
LoTTA_plot_effect LoTTA_plot_effect
LoTTA_plot_effect_CONT Function that visualizes the impact of the cutoff location on the treatment effect estimate. It plots too figures. The bottom figure depicts the posterior density of the cutoff location. The top figure depicts the box plot of the treatment effect given the cutoff point. If the prior on the cutoff location was discrete each box corresponds to a distinct cutoff point. If the prior was continuous each box correspond to an interval of cutoff values (the number of intervals can be changed through nbins).
LoTTA_plot_effect_DIS Function that visualizes the impact of the cutoff location on the treatment effect estimate. It plots too figures. The bottom figure depicts the posterior density of the cutoff location. The top figure depicts the box plot of the treatment effect given the cutoff point. If the prior on the cutoff location was discrete each box corresponds to a distinct cutoff point. If the prior was continuous each box correspond to an interval of cutoff values (the number of intervals can be changed through nbins).
LoTTA_plot_outcome LoTTA_plot_outcome
LoTTA_plot_treatment Function that plots the median (or another quantile) of the LoTTA posterior treatment probability function along with the quanatile-based credible interval. The function is plotted on top of the binned input data. To bin the data, the score data is divided into bins of fixed length, then the proportion of treated is calculated in each bin. The proportions are plotted against the average values of the score in the corresponding bins. The data is binned separately on each side of the cutoff, the cutoff is marked on the plot with a dotted line. In case of an unknown cutoff, the MAP estimate is used.
LoTTA_sharp_BIN LoTTA_sharp_BIN
LoTTA_sharp_CONT LoTTA_sharp_CONT
LoTTA_treatment LoTTA_treatment
normalize_cont_x normalize continuous score function
normalize_cont_y normalize continuous outcome function
normalize_dis_x normalize discrete score function
optimal_k function that searches for initial parameters of outcome function to initiate the sampler
optimal_k_bin function that searches for initial parameters of binary outcome function to initiate the sampler
plot_outcome_BIN Function that plots the median (or another quantile) of the posterior function with binary outcome along with the quanatile-based credible interval. The function is plotted on top of the binned input data. To bin the data, the score data is divided into bins of fixed length, then the average outcome in each bin is calculated. The average outcomes are plotted against the average values of the score in the corresponding bins.
plot_outcome_CONT Function that plots the median (or another quantile) of the posterior function of a continous outcome along with the quanatile-based credible interval. The function is plotted on top of the binned input data. To bin the data, the score data is divided into bins of fixed length, then the average outcome in each bin is calculated. The average outcomes are plotted against the average values of the score in the corresponding bins.
read_prior function that checks the type of a prior and whether it is correct
treatment_function_sample Function that evaluates the treatment probability function in a domain x, given the coefficients
trim_dis_y Binary outcomes for trimmed score