# Estimating density overlap using the data set 'MAGMA_sim_data
# Estimating density overlap for 'ps_gifted' (propensity scores for
# giftedness support)
# Defining plot aesthetics with 'group', 'variable_name', "group_lables',
# and 'group_name'
# Estimating pre-matching density overlap by not specifying 'step_num' and
# 'step_var'
Density_overlap(Data = MAGMA_sim_data,
variable = "ps_gifted",
group = "gifted_support",
step_num = NULL,
step_var = NULL,
variable_name = "Propensity Score",
group_labels = c("No Support", "Support"),
group_name = "Gifted Support")
# Estimating density overlap using the matched data set
#'MAGMA_sim_data_gifted'
# Estimating density overlap for 'ps_gifted' (propensity scores for
# giftedness support)
# Defining plot aesthetics with 'group', 'variable_name', 'group_lables',
# and 'group_name'
# Estimating post-matching overlap for 250 cases per group ('step_num')
# Name of the step variable is 'step'
Density_overlap(Data = MAGMA_sim_data,
variable = "ps_gifted",
group = "gifted_support",
step_num = 250,
step_var = "step_gifted",
variable_name = "Propensity Score",
group_labels = c("No Support", "Support"),
group_name = "Gifted Support")
# Estimating density overlap using the data set 'MAGMA_sim_data
# Estimating density overlap for 'teacher_ability_rating' (ability rated
# from teacher as below average, average, or above average)
# Defining plot aesthetics with 'group', 'variable_name', 'group_lables',
# and 'group_name'
# Estimating pre-matching density overlap by not specifying 'step_num' and
# 'step_var'
Density_overlap(Data = MAGMA_sim_data,
variable = "GPA_school",
group = "teacher_ability_rating",
variable_name = "School Achievement",
group_labels = c("Low", "Medium", "High"),
group_name = "Rating")
Run the code above in your browser using DataLab