Loop over outcome and ranking variable pairs
#####STEP 5-5: Loop over outcome and ranking variable pairs #####
# Process CATE pairs
for (i in seq_along(cate_outcome_rankvar_pairs)) {
outcome <- cate_outcome_rankvar_pairs[[i]][[1]]
ranking_variable <- cate_outcome_rankvar_pairs[[i]][[2]]
create_cumulative_outcome_plots(outcome, ranking_variable, "cate")
}
## [1] "Processing outcome var: debt_neg_cw0_lambda_0"
## [1] "Processing ranking var: debt_neg_cw0_lambda_0"
## [1] "#####Creating dataframe.#####"
## [1] "Column called for lambda cate ranking"
## [1] "cate_lambda_0_ranking_20"
## [1] "Column called for lambda clate ranking"
## [1] "clate_lambda_0_ranking_20"
## [1] "Filename:"
## [1] "PP_Full_Analysis/Intermediate_data/Testing/empirical/cw_med_1/cate_clate_results_debt_neg_cw0.csv"
## [1] "Non-OHP analysis - including CLATE rankings"
## [1] "Dimensions of selected_ranking_df: 12094"
## [2] "Dimensions of selected_ranking_df: 3"
## Rows: 12,094
## Columns: 3
## $ person_id <int> 5, 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68, …
## $ cate_rankings_selected <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, 17…
## $ clate_rankings_selected <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, 13…
## [1] "Dimensions of outcome_df: 12094" "Dimensions of outcome_df: 66"
## Rows: 12,094
## Columns: 66
## $ person_id <int> 5, 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68…
## $ X.numhh_list <int> 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0,…
## $ X.age_inp <int> 60, 41, 39, 52, 51, 32, 34, 23, 43, 46, 38, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1,…
## $ X.lessHS <int> 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 574…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 454…
## $ Y <int> 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1,…
## $ clate_W <int> 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0,…
## $ Z <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ weights <dbl> 1.1504, 0.8975, 1.0000, 1.2126, 1.0000, 1.00…
## $ folds <int> 8, 1, 10, 3, 10, 9, 9, 4, 4, 10, 7, 6, 5, 7,…
## $ clate <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ clate_se <dbl> 0.06976, 0.09180, 0.06904, 0.05327, 0.03534,…
## $ clate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 1, 4, 3,…
## $ clate_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 18, 15, 11, 14, 4, …
## $ cate_W <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ cate <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ cate_se <dbl> 0.007787, 0.014411, 0.014614, 0.016439, 0.00…
## $ cate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ cate_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 14, 17, 5, …
## $ cate_lambda_0 <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ clate_lambda_0 <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ cate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ clate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_0_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_lambda_0_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ cate_lambda_1 <dbl> 0.049109, 0.017776, 0.020236, 0.029518, 0.03…
## $ clate_lambda_1 <dbl> 0.204401, 0.046846, 0.062183, 0.114336, 0.10…
## $ cate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 5, 4,…
## $ clate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_1_ranking_20 <int> 20, 3, 4, 8, 9, 1, 1, 6, 19, 13, 14, 16, 7, …
## $ clate_lambda_1_ranking_20 <int> 20, 2, 3, 8, 6, 1, 1, 6, 17, 15, 9, 14, 5, 1…
## $ cate_lambda_2 <dbl> 0.0471620, 0.0141732, 0.0165822, 0.0254081, …
## $ clate_lambda_2 <dbl> 0.18696, 0.02390, 0.04492, 0.10102, 0.09813,…
## $ cate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 4, 4,…
## $ clate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_2_ranking_20 <int> 20, 3, 4, 7, 10, 1, 1, 7, 19, 14, 15, 15, 8,…
## $ clate_lambda_2_ranking_20 <int> 20, 2, 3, 8, 7, 2, 1, 6, 17, 15, 8, 14, 6, 1…
## $ cate_lambda_3 <dbl> 0.0452152, 0.0105705, 0.0129287, 0.0212983, …
## $ clate_lambda_3 <dbl> 0.1695211, 0.0009444, 0.0276625, 0.0877004, …
## $ cate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 3, 4, 4,…
## $ clate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_3_ranking_20 <int> 20, 3, 4, 7, 11, 1, 1, 7, 19, 15, 15, 13, 9,…
## $ clate_lambda_3_ranking_20 <int> 20, 2, 3, 8, 8, 2, 1, 7, 17, 14, 7, 14, 6, 1…
## $ cate_lambda_4 <dbl> 0.043268, 0.006968, 0.009275, 0.017188, 0.02…
## $ clate_lambda_4 <dbl> 0.152081, -0.022007, 0.010402, 0.074383, 0.0…
## $ cate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 3, 3, 4, 4,…
## $ clate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_4_ranking_20 <int> 20, 4, 4, 7, 12, 1, 1, 7, 19, 16, 16, 11, 10…
## $ clate_lambda_4_ranking_20 <int> 19, 2, 3, 8, 9, 2, 1, 7, 17, 14, 7, 14, 7, 1…
## [1] "Dimensions of cdf_data"
## [1] 12094 68
## Rows: 12,094
## Columns: 68
## $ person_id <int> 5, 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68…
## $ cate_rankings_selected <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_rankings_selected <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ X.numhh_list <int> 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0,…
## $ X.age_inp <int> 60, 41, 39, 52, 51, 32, 34, 23, 43, 46, 38, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1,…
## $ X.lessHS <int> 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 574…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 454…
## $ Y <int> 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1,…
## $ clate_W <int> 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0,…
## $ Z <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ weights <dbl> 1.1504, 0.8975, 1.0000, 1.2126, 1.0000, 1.00…
## $ folds <int> 8, 1, 10, 3, 10, 9, 9, 4, 4, 10, 7, 6, 5, 7,…
## $ clate <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ clate_se <dbl> 0.06976, 0.09180, 0.06904, 0.05327, 0.03534,…
## $ clate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 1, 4, 3,…
## $ clate_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 18, 15, 11, 14, 4, …
## $ cate_W <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ cate <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ cate_se <dbl> 0.007787, 0.014411, 0.014614, 0.016439, 0.00…
## $ cate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ cate_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 14, 17, 5, …
## $ cate_lambda_0 <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ clate_lambda_0 <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ cate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ clate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_0_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_lambda_0_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ cate_lambda_1 <dbl> 0.049109, 0.017776, 0.020236, 0.029518, 0.03…
## $ clate_lambda_1 <dbl> 0.204401, 0.046846, 0.062183, 0.114336, 0.10…
## $ cate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 5, 4,…
## $ clate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_1_ranking_20 <int> 20, 3, 4, 8, 9, 1, 1, 6, 19, 13, 14, 16, 7, …
## $ clate_lambda_1_ranking_20 <int> 20, 2, 3, 8, 6, 1, 1, 6, 17, 15, 9, 14, 5, 1…
## $ cate_lambda_2 <dbl> 0.0471620, 0.0141732, 0.0165822, 0.0254081, …
## $ clate_lambda_2 <dbl> 0.18696, 0.02390, 0.04492, 0.10102, 0.09813,…
## $ cate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 4, 4,…
## $ clate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_2_ranking_20 <int> 20, 3, 4, 7, 10, 1, 1, 7, 19, 14, 15, 15, 8,…
## $ clate_lambda_2_ranking_20 <int> 20, 2, 3, 8, 7, 2, 1, 6, 17, 15, 8, 14, 6, 1…
## $ cate_lambda_3 <dbl> 0.0452152, 0.0105705, 0.0129287, 0.0212983, …
## $ clate_lambda_3 <dbl> 0.1695211, 0.0009444, 0.0276625, 0.0877004, …
## $ cate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 3, 4, 4,…
## $ clate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_3_ranking_20 <int> 20, 3, 4, 7, 11, 1, 1, 7, 19, 15, 15, 13, 9,…
## $ clate_lambda_3_ranking_20 <int> 20, 2, 3, 8, 8, 2, 1, 7, 17, 14, 7, 14, 6, 1…
## $ cate_lambda_4 <dbl> 0.043268, 0.006968, 0.009275, 0.017188, 0.02…
## $ clate_lambda_4 <dbl> 0.152081, -0.022007, 0.010402, 0.074383, 0.0…
## $ cate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 3, 3, 4, 4,…
## $ clate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_4_ranking_20 <int> 20, 4, 4, 7, 12, 1, 1, 7, 19, 16, 16, 11, 10…
## $ clate_lambda_4_ranking_20 <int> 19, 2, 3, 8, 9, 2, 1, 7, 17, 14, 7, 14, 7, 1…
## [1] "cate"
## [1] "#####Running cate function.#####"
## ranking_rescale
## 10 20 30 40 50 60 70 80 90 100
## 1211 1208 1209 1210 1209 1209 1210 1209 1209 1210
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.359 -0.534 0.433 0.507 1.160
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.515859 0.039907 12.93 <2e-16 ***
## cate_W 0.059110 0.020368 2.90 0.0037 **
## X.gender_inp -0.034739 0.020490 -1.70 0.0901 .
## X.age_inp -0.000245 0.000836 -0.29 0.7693
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.553 on 2415 degrees of freedom
## Multiple R-squared: 0.00466, Adjusted R-squared: 0.00343
## F-statistic: 3.77 on 3 and 2415 DF, p-value: 0.0103
##
## [1] "20th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.359 -0.520 -0.412 0.521 1.255
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.542269 0.031972 16.96 <2e-16 ***
## cate_W 0.054516 0.016601 3.28 0.0010 **
## X.gender_inp -0.047318 0.016685 -2.84 0.0046 **
## X.age_inp -0.001093 0.000677 -1.61 0.1065
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.551 on 3624 degrees of freedom
## Multiple R-squared: 0.0058, Adjusted R-squared: 0.00498
## F-statistic: 7.05 on 3 and 3624 DF, p-value: 0.000101
##
## [1] "30th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.354 -0.509 -0.420 0.530 1.256
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.527296 0.027553 19.14 < 2e-16 ***
## cate_W 0.050746 0.014354 3.54 0.00041 ***
## X.gender_inp -0.066337 0.014455 -4.59 4.6e-06 ***
## X.age_inp -0.000677 0.000587 -1.15 0.24894
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.551 on 4834 degrees of freedom
## Multiple R-squared: 0.0071, Adjusted R-squared: 0.00648
## F-statistic: 11.5 on 3 and 4834 DF, p-value: 1.59e-07
##
## [1] "40th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.299 -0.498 -0.411 0.535 1.303
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.492073 0.024546 20.05 < 2e-16 ***
## cate_W 0.056327 0.012812 4.40 1.1e-05 ***
## X.gender_inp -0.071317 0.012921 -5.52 3.5e-08 ***
## X.age_inp -0.000199 0.000526 -0.38 0.71
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.55 on 6043 degrees of freedom
## Multiple R-squared: 0.00818, Adjusted R-squared: 0.00769
## F-statistic: 16.6 on 3 and 6043 DF, p-value: 9.4e-11
##
## [1] "50th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.258 -0.477 -0.398 0.556 1.501
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.69e-01 2.24e-02 20.90 < 2e-16 ***
## cate_W 4.71e-02 1.17e-02 4.04 5.4e-05 ***
## X.gender_inp -7.23e-02 1.18e-02 -6.14 8.9e-10 ***
## X.age_inp 3.15e-05 4.81e-04 0.07 0.95
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.55 on 7252 degrees of freedom
## Multiple R-squared: 0.00745, Adjusted R-squared: 0.00703
## F-statistic: 18.1 on 3 and 7252 DF, p-value: 1.02e-11
##
## [1] "60th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.271 -0.459 -0.387 0.573 1.954
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.53e-01 2.09e-02 21.72 < 2e-16 ***
## cate_W 4.13e-02 1.08e-02 3.84 0.00013 ***
## X.gender_inp -6.99e-02 1.09e-02 -6.42 1.4e-10 ***
## X.age_inp 7.37e-05 4.47e-04 0.16 0.86905
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.548 on 8462 degrees of freedom
## Multiple R-squared: 0.00661, Adjusted R-squared: 0.00625
## F-statistic: 18.8 on 3 and 8462 DF, p-value: 4.02e-12
##
## [1] "70th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.439 -0.458 -0.378 0.575 1.983
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.455508 0.019618 23.22 < 2e-16 ***
## cate_W 0.049495 0.010041 4.93 8.4e-07 ***
## X.gender_inp -0.074488 0.010170 -7.32 2.6e-13 ***
## X.age_inp -0.000106 0.000419 -0.25 0.8
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.548 on 9671 degrees of freedom
## Multiple R-squared: 0.00802, Adjusted R-squared: 0.00771
## F-statistic: 26.1 on 3 and 9671 DF, p-value: <2e-16
##
## [1] "80th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.685 -0.468 -0.390 0.569 1.944
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.474858 0.018691 25.41 < 2e-16 ***
## cate_W 0.043409 0.009489 4.57 4.8e-06 ***
## X.gender_inp -0.076434 0.009612 -7.95 2.0e-15 ***
## X.age_inp -0.000238 0.000401 -0.59 0.55
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.551 on 10879 degrees of freedom
## Multiple R-squared: 0.00775, Adjusted R-squared: 0.00748
## F-statistic: 28.3 on 3 and 10879 DF, p-value: <2e-16
##
## [1] "90th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.730 -0.480 -0.395 0.565 1.926
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.493817 0.017859 27.65 < 2e-16 ***
## cate_W 0.039988 0.009011 4.44 9.2e-06 ***
## X.gender_inp -0.087152 0.009094 -9.58 < 2e-16 ***
## X.age_inp -0.000306 0.000385 -0.80 0.43
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.552 on 12090 degrees of freedom
## Multiple R-squared: 0.00921, Adjusted R-squared: 0.00897
## F-statistic: 37.5 on 3 and 12090 DF, p-value: <2e-16
##
## [1] "100th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Results of cumulative analysis:"
## [1] "20th" "30th" "40th" "50th" "60th" "70th" "80th" "90th" "100th"
## [1] "Percentile Groups ranked by debt_neg_cw0_lambda_0"
## [1] "finished increasing"
## [1] "#####Running cate function.#####"
## ranking_rescale
## 10 20 30 40 50 60 70 80 90 100
## 1211 1208 1209 1210 1209 1209 1210 1209 1209 1210
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.921 -0.544 0.400 0.516 1.571
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.610875 0.042965 14.22 < 2e-16 ***
## cate_W -0.018750 0.020309 -0.92 0.36
## X.gender_inp -0.114259 0.020224 -5.65 1.8e-08 ***
## X.age_inp -0.000323 0.000970 -0.33 0.74
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.561 on 2415 degrees of freedom
## Multiple R-squared: 0.0134, Adjusted R-squared: 0.0121
## F-statistic: 10.9 on 3 and 2415 DF, p-value: 4.11e-07
##
## [1] "20th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.905 -0.519 -0.408 0.544 1.786
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.58528 0.03450 16.96 < 2e-16 ***
## cate_W 0.02738 0.01655 1.65 0.098 .
## X.gender_inp -0.12026 0.01655 -7.26 4.5e-13 ***
## X.age_inp -0.00116 0.00076 -1.53 0.127
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.558 on 3624 degrees of freedom
## Multiple R-squared: 0.0154, Adjusted R-squared: 0.0146
## F-statistic: 18.9 on 3 and 3624 DF, p-value: 3.66e-12
##
## [1] "30th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.771 -0.487 -0.394 0.570 1.940
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.535526 0.029517 18.14 < 2e-16 ***
## cate_W 0.029855 0.014259 2.09 0.036 *
## X.gender_inp -0.109195 0.014316 -7.63 2.9e-14 ***
## X.age_inp -0.000938 0.000644 -1.46 0.146
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.555 on 4834 degrees of freedom
## Multiple R-squared: 0.013, Adjusted R-squared: 0.0124
## F-statistic: 21.3 on 3 and 4834 DF, p-value: 1.13e-13
##
## [1] "40th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.688 -0.473 -0.382 0.589 1.987
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.501158 0.026017 19.26 < 2e-16 ***
## cate_W 0.027765 0.012691 2.19 0.029 *
## X.gender_inp -0.103751 0.012789 -8.11 5.9e-16 ***
## X.age_inp -0.000568 0.000566 -1.00 0.316
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.553 on 6043 degrees of freedom
## Multiple R-squared: 0.0117, Adjusted R-squared: 0.0112
## F-statistic: 23.8 on 3 and 6043 DF, p-value: 2.55e-15
##
## [1] "50th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.670 -0.466 -0.370 0.593 2.013
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.474486 0.023413 20.27 <2e-16 ***
## cate_W 0.036951 0.011563 3.20 0.0014 **
## X.gender_inp -0.100638 0.011669 -8.62 <2e-16 ***
## X.age_inp -0.000165 0.000510 -0.32 0.7465
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.551 on 7252 degrees of freedom
## Multiple R-squared: 0.0116, Adjusted R-squared: 0.0112
## F-statistic: 28.4 on 3 and 7252 DF, p-value: <2e-16
##
## [1] "60th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.684 -0.472 -0.371 0.592 2.005
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.474766 0.021485 22.10 < 2e-16 ***
## cate_W 0.037096 0.010710 3.46 0.00054 ***
## X.gender_inp -0.103076 0.010818 -9.53 < 2e-16 ***
## X.age_inp -0.000040 0.000468 -0.09 0.93194
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.551 on 8462 degrees of freedom
## Multiple R-squared: 0.0121, Adjusted R-squared: 0.0117
## F-statistic: 34.4 on 3 and 8462 DF, p-value: <2e-16
##
## [1] "70th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.704 -0.469 -0.380 0.582 1.988
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.492651 0.019938 24.71 < 2e-16 ***
## cate_W 0.038078 0.010030 3.80 0.00015 ***
## X.gender_inp -0.099676 0.010124 -9.85 < 2e-16 ***
## X.age_inp -0.000461 0.000434 -1.06 0.28870
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.55 on 9671 degrees of freedom
## Multiple R-squared: 0.0115, Adjusted R-squared: 0.0112
## F-statistic: 37.6 on 3 and 9671 DF, p-value: <2e-16
##
## [1] "80th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.731 -0.473 -0.389 0.570 1.955
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.504166 0.018782 26.84 < 2e-16 ***
## cate_W 0.040867 0.009480 4.31 1.6e-05 ***
## X.gender_inp -0.092679 0.009562 -9.69 < 2e-16 ***
## X.age_inp -0.000671 0.000408 -1.64 0.1
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.551 on 10880 degrees of freedom
## Multiple R-squared: 0.0105, Adjusted R-squared: 0.0102
## F-statistic: 38.4 on 3 and 10880 DF, p-value: <2e-16
##
## [1] "90th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.730 -0.480 -0.395 0.565 1.926
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.493817 0.017859 27.65 < 2e-16 ***
## cate_W 0.039988 0.009011 4.44 9.2e-06 ***
## X.gender_inp -0.087152 0.009094 -9.58 < 2e-16 ***
## X.age_inp -0.000306 0.000385 -0.80 0.43
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.552 on 12090 degrees of freedom
## Multiple R-squared: 0.00921, Adjusted R-squared: 0.00897
## F-statistic: 37.5 on 3 and 12090 DF, p-value: <2e-16
##
## [1] "100th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Results of cumulative analysis:"
## [1] "20th" "30th" "40th" "50th" "60th" "70th" "80th" "90th" "100th"
## [1] "Percentile Groups ranked by debt_neg_cw0_lambda_0"
## [1] "finished decreasing"
## [1] "Processing outcome var: debt_neg_cw0_lambda_0"
## [1] "Processing ranking var: ohp_all_ever_inperson_cw0_lambda_0"
## [1] "#####Creating dataframe.#####"
## [1] "outcome filename"
## [1] "PP_Full_Analysis/Intermediate_data/Testing/empirical/cw_med_1/cate_clate_results_debt_neg_cw0.csv"
## [1] "ranking filename"
## [1] "PP_Full_Analysis/Intermediate_data/Testing/empirical/cw_med_1/cate_clate_results_ohp_all_ever_inperson_cw0.csv"
## [1] "Column called for lambda cate ranking"
## [1] "cate_lambda_0_ranking_20"
## [1] "Column called for lambda clate ranking"
## [1] "clate_lambda_0_ranking_20"
## [1] "OHP analysis detected - excluding CLATE rankings"
## [1] "Dimensions of selected_ranking_df: 12208"
## [2] "Dimensions of selected_ranking_df: 2"
## Rows: 12,208
## Columns: 2
## $ person_id <int> 5, 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68, 7…
## $ cate_rankings_selected <int> 6, 5, 15, 18, 16, 1, 2, 12, 14, 13, 10, 14, 18,…
## [1] "Dimensions of outcome_df: 12094" "Dimensions of outcome_df: 66"
## Rows: 12,094
## Columns: 66
## $ person_id <int> 5, 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68…
## $ X.numhh_list <int> 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0,…
## $ X.age_inp <int> 60, 41, 39, 52, 51, 32, 34, 23, 43, 46, 38, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1,…
## $ X.lessHS <int> 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 574…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 454…
## $ Y <int> 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1,…
## $ clate_W <int> 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0,…
## $ Z <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ weights <dbl> 1.1504, 0.8975, 1.0000, 1.2126, 1.0000, 1.00…
## $ folds <int> 8, 1, 10, 3, 10, 9, 9, 4, 4, 10, 7, 6, 5, 7,…
## $ clate <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ clate_se <dbl> 0.06976, 0.09180, 0.06904, 0.05327, 0.03534,…
## $ clate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 1, 4, 3,…
## $ clate_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 18, 15, 11, 14, 4, …
## $ cate_W <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ cate <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ cate_se <dbl> 0.007787, 0.014411, 0.014614, 0.016439, 0.00…
## $ cate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ cate_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 14, 17, 5, …
## $ cate_lambda_0 <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ clate_lambda_0 <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ cate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ clate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_0_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_lambda_0_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ cate_lambda_1 <dbl> 0.049109, 0.017776, 0.020236, 0.029518, 0.03…
## $ clate_lambda_1 <dbl> 0.204401, 0.046846, 0.062183, 0.114336, 0.10…
## $ cate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 5, 4,…
## $ clate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_1_ranking_20 <int> 20, 3, 4, 8, 9, 1, 1, 6, 19, 13, 14, 16, 7, …
## $ clate_lambda_1_ranking_20 <int> 20, 2, 3, 8, 6, 1, 1, 6, 17, 15, 9, 14, 5, 1…
## $ cate_lambda_2 <dbl> 0.0471620, 0.0141732, 0.0165822, 0.0254081, …
## $ clate_lambda_2 <dbl> 0.18696, 0.02390, 0.04492, 0.10102, 0.09813,…
## $ cate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 4, 4,…
## $ clate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_2_ranking_20 <int> 20, 3, 4, 7, 10, 1, 1, 7, 19, 14, 15, 15, 8,…
## $ clate_lambda_2_ranking_20 <int> 20, 2, 3, 8, 7, 2, 1, 6, 17, 15, 8, 14, 6, 1…
## $ cate_lambda_3 <dbl> 0.0452152, 0.0105705, 0.0129287, 0.0212983, …
## $ clate_lambda_3 <dbl> 0.1695211, 0.0009444, 0.0276625, 0.0877004, …
## $ cate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 3, 4, 4,…
## $ clate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_3_ranking_20 <int> 20, 3, 4, 7, 11, 1, 1, 7, 19, 15, 15, 13, 9,…
## $ clate_lambda_3_ranking_20 <int> 20, 2, 3, 8, 8, 2, 1, 7, 17, 14, 7, 14, 6, 1…
## $ cate_lambda_4 <dbl> 0.043268, 0.006968, 0.009275, 0.017188, 0.02…
## $ clate_lambda_4 <dbl> 0.152081, -0.022007, 0.010402, 0.074383, 0.0…
## $ cate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 3, 3, 4, 4,…
## $ clate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_4_ranking_20 <int> 20, 4, 4, 7, 12, 1, 1, 7, 19, 16, 16, 11, 10…
## $ clate_lambda_4_ranking_20 <int> 19, 2, 3, 8, 9, 2, 1, 7, 17, 14, 7, 14, 7, 1…
## [1] "Dimensions of cdf_data"
## [1] 12094 67
## Rows: 12,094
## Columns: 67
## $ person_id <int> 5, 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68…
## $ cate_rankings_selected <int> 6, 5, 15, 18, 16, 1, 2, 12, 14, 13, 10, 14, …
## $ X.numhh_list <int> 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0,…
## $ X.age_inp <int> 60, 41, 39, 52, 51, 32, 34, 23, 43, 46, 38, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1,…
## $ X.lessHS <int> 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 574…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 454…
## $ Y <int> 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1,…
## $ clate_W <int> 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0,…
## $ Z <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ weights <dbl> 1.1504, 0.8975, 1.0000, 1.2126, 1.0000, 1.00…
## $ folds <int> 8, 1, 10, 3, 10, 9, 9, 4, 4, 10, 7, 6, 5, 7,…
## $ clate <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ clate_se <dbl> 0.06976, 0.09180, 0.06904, 0.05327, 0.03534,…
## $ clate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 1, 4, 3,…
## $ clate_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 18, 15, 11, 14, 4, …
## $ cate_W <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ cate <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ cate_se <dbl> 0.007787, 0.014411, 0.014614, 0.016439, 0.00…
## $ cate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ cate_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 14, 17, 5, …
## $ cate_lambda_0 <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ clate_lambda_0 <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ cate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ clate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_0_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_lambda_0_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ cate_lambda_1 <dbl> 0.049109, 0.017776, 0.020236, 0.029518, 0.03…
## $ clate_lambda_1 <dbl> 0.204401, 0.046846, 0.062183, 0.114336, 0.10…
## $ cate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 5, 4,…
## $ clate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_1_ranking_20 <int> 20, 3, 4, 8, 9, 1, 1, 6, 19, 13, 14, 16, 7, …
## $ clate_lambda_1_ranking_20 <int> 20, 2, 3, 8, 6, 1, 1, 6, 17, 15, 9, 14, 5, 1…
## $ cate_lambda_2 <dbl> 0.0471620, 0.0141732, 0.0165822, 0.0254081, …
## $ clate_lambda_2 <dbl> 0.18696, 0.02390, 0.04492, 0.10102, 0.09813,…
## $ cate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 4, 4,…
## $ clate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_2_ranking_20 <int> 20, 3, 4, 7, 10, 1, 1, 7, 19, 14, 15, 15, 8,…
## $ clate_lambda_2_ranking_20 <int> 20, 2, 3, 8, 7, 2, 1, 6, 17, 15, 8, 14, 6, 1…
## $ cate_lambda_3 <dbl> 0.0452152, 0.0105705, 0.0129287, 0.0212983, …
## $ clate_lambda_3 <dbl> 0.1695211, 0.0009444, 0.0276625, 0.0877004, …
## $ cate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 3, 4, 4,…
## $ clate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_3_ranking_20 <int> 20, 3, 4, 7, 11, 1, 1, 7, 19, 15, 15, 13, 9,…
## $ clate_lambda_3_ranking_20 <int> 20, 2, 3, 8, 8, 2, 1, 7, 17, 14, 7, 14, 6, 1…
## $ cate_lambda_4 <dbl> 0.043268, 0.006968, 0.009275, 0.017188, 0.02…
## $ clate_lambda_4 <dbl> 0.152081, -0.022007, 0.010402, 0.074383, 0.0…
## $ cate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 3, 3, 4, 4,…
## $ clate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_4_ranking_20 <int> 20, 4, 4, 7, 12, 1, 1, 7, 19, 16, 16, 11, 10…
## $ clate_lambda_4_ranking_20 <int> 19, 2, 3, 8, 9, 2, 1, 7, 17, 14, 7, 14, 7, 1…
## [1] "cate"
## [1] "#####Running cate function.#####"
## ranking_rescale
## 10 20 30 40 50 60 70 80 90 100
## 1214 1211 1213 1208 1210 1206 1203 1209 1210 1210
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.069 -0.432 -0.326 0.590 1.426
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.02088 0.06104 0.34 0.732
## cate_W 0.04655 0.01963 2.37 0.018 *
## X.gender_inp -0.08886 0.02004 -4.43 9.7e-06 ***
## X.age_inp 0.00780 0.00122 6.42 1.7e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.532 on 2416 degrees of freedom
## Multiple R-squared: 0.0249, Adjusted R-squared: 0.0237
## F-statistic: 20.5 on 3 and 2416 DF, p-value: 3.88e-13
##
## [1] "20th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.077 -0.433 -0.332 0.588 1.446
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.096636 0.043929 2.20 0.02788 *
## cate_W 0.056563 0.016070 3.52 0.00044 ***
## X.gender_inp -0.091579 0.016235 -5.64 1.8e-08 ***
## X.age_inp 0.006512 0.000889 7.33 2.9e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.533 on 3625 degrees of freedom
## Multiple R-squared: 0.0238, Adjusted R-squared: 0.023
## F-statistic: 29.5 on 3 and 3625 DF, p-value: <2e-16
##
## [1] "30th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.066 -0.428 -0.332 0.598 1.525
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.193988 0.033345 5.82 6.4e-09 ***
## cate_W 0.060562 0.013902 4.36 1.3e-05 ***
## X.gender_inp -0.105609 0.014044 -7.52 6.5e-14 ***
## X.age_inp 0.004685 0.000688 6.81 1.1e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.534 on 4828 degrees of freedom
## Multiple R-squared: 0.0219, Adjusted R-squared: 0.0213
## F-statistic: 36 on 3 and 4828 DF, p-value: <2e-16
##
## [1] "40th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.176 -0.431 -0.351 0.599 1.586
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.320947 0.027268 11.77 < 2e-16 ***
## cate_W 0.060013 0.012521 4.79 1.7e-06 ***
## X.gender_inp -0.087196 0.012614 -6.91 5.3e-12 ***
## X.age_inp 0.001986 0.000575 3.46 0.00055 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.539 on 6034 degrees of freedom
## Multiple R-squared: 0.0126, Adjusted R-squared: 0.0121
## F-statistic: 25.7 on 3 and 6034 DF, p-value: <2e-16
##
## [1] "50th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.194 -0.436 -0.356 0.598 1.575
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.353472 0.023801 14.85 < 2e-16 ***
## cate_W 0.052340 0.011457 4.57 5.0e-06 ***
## X.gender_inp -0.088193 0.011498 -7.67 1.9e-14 ***
## X.age_inp 0.001553 0.000504 3.09 0.002 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.54 on 7244 degrees of freedom
## Multiple R-squared: 0.0117, Adjusted R-squared: 0.0113
## F-statistic: 28.5 on 3 and 7244 DF, p-value: <2e-16
##
## [1] "60th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.248 -0.440 -0.364 0.594 1.608
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.380336 0.021659 17.56 < 2e-16 ***
## cate_W 0.049287 0.010648 4.63 3.7e-06 ***
## X.gender_inp -0.076534 0.010692 -7.16 8.9e-13 ***
## X.age_inp 0.001053 0.000455 2.31 0.021 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.543 on 8452 degrees of freedom
## Multiple R-squared: 0.00918, Adjusted R-squared: 0.00882
## F-statistic: 26.1 on 3 and 8452 DF, p-value: <2e-16
##
## [1] "70th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.554 -0.445 -0.364 0.589 1.597
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.387371 0.020011 19.36 < 2e-16 ***
## cate_W 0.049036 0.009967 4.92 8.8e-07 ***
## X.gender_inp -0.084724 0.010031 -8.45 < 2e-16 ***
## X.age_inp 0.001160 0.000422 2.75 0.006 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.544 on 9665 degrees of freedom
## Multiple R-squared: 0.0107, Adjusted R-squared: 0.0104
## F-statistic: 34.8 on 3 and 9665 DF, p-value: <2e-16
##
## [1] "80th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.639 -0.463 -0.380 0.577 2.005
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.428871 0.018897 22.69 < 2e-16 ***
## cate_W 0.046926 0.009457 4.96 7.1e-07 ***
## X.gender_inp -0.085713 0.009528 -9.00 < 2e-16 ***
## X.age_inp 0.000712 0.000403 1.77 0.077 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.55 on 10876 degrees of freedom
## Multiple R-squared: 0.01, Adjusted R-squared: 0.00974
## F-statistic: 36.7 on 3 and 10876 DF, p-value: <2e-16
##
## [1] "90th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.730 -0.480 -0.395 0.565 1.926
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.493817 0.017859 27.65 < 2e-16 ***
## cate_W 0.039988 0.009011 4.44 9.2e-06 ***
## X.gender_inp -0.087152 0.009094 -9.58 < 2e-16 ***
## X.age_inp -0.000306 0.000385 -0.80 0.43
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.552 on 12090 degrees of freedom
## Multiple R-squared: 0.00921, Adjusted R-squared: 0.00897
## F-statistic: 37.5 on 3 and 12090 DF, p-value: <2e-16
##
## [1] "100th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Results of cumulative analysis:"
## [1] "20th" "30th" "40th" "50th" "60th" "70th" "80th" "90th" "100th"
## [1] "Percentile Groups ranked by ohp_all_ever_inperson_cw0_lambda_0"
## [1] "finished increasing"
## [1] "#####Running cate function.#####"
## ranking_rescale
## 10 20 30 40 50 60 70 80 90 100
## 1214 1211 1213 1208 1210 1206 1203 1209 1210 1210
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -2.141 -0.582 0.332 0.450 1.331
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.53796 0.04355 12.35 < 2e-16 ***
## cate_W -0.02061 0.01973 -1.04 0.29637
## X.gender_inp -0.11095 0.02021 -5.49 4.4e-08 ***
## X.age_inp 0.00407 0.00111 3.69 0.00023 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.546 on 2421 degrees of freedom
## Multiple R-squared: 0.0202, Adjusted R-squared: 0.0189
## F-statistic: 16.6 on 3 and 2421 DF, p-value: 1.12e-10
##
## [1] "20th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -2.017 -0.536 0.351 0.498 1.558
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.517785 0.034300 15.10 < 2e-16 ***
## cate_W -0.002390 0.016349 -0.15 0.88378
## X.gender_inp -0.129066 0.016760 -7.70 1.7e-14 ***
## X.age_inp 0.003210 0.000839 3.83 0.00013 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.553 on 3634 degrees of freedom
## Multiple R-squared: 0.0217, Adjusted R-squared: 0.0209
## F-statistic: 26.9 on 3 and 3634 DF, p-value: <2e-16
##
## [1] "30th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.971 -0.517 0.370 0.519 1.661
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.530841 0.029307 18.11 <2e-16 ***
## cate_W 0.009810 0.014246 0.69 0.4911
## X.gender_inp -0.124747 0.014894 -8.38 <2e-16 ***
## X.age_inp 0.001903 0.000687 2.77 0.0056 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.556 on 4842 degrees of freedom
## Multiple R-squared: 0.0175, Adjusted R-squared: 0.0169
## F-statistic: 28.7 on 3 and 4842 DF, p-value: <2e-16
##
## [1] "40th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.915 -0.502 0.373 0.537 1.728
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.523024 0.025597 20.43 <2e-16 ***
## cate_W 0.011338 0.012759 0.89 0.3743
## X.gender_inp -0.124552 0.013281 -9.38 <2e-16 ***
## X.age_inp 0.001544 0.000593 2.60 0.0093 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.555 on 6052 degrees of freedom
## Multiple R-squared: 0.0166, Adjusted R-squared: 0.0161
## F-statistic: 34 on 3 and 6052 DF, p-value: <2e-16
##
## [1] "50th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.867 -0.499 -0.430 0.542 1.782
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.532212 0.022824 23.32 <2e-16 ***
## cate_W 0.021422 0.011677 1.83 0.067 .
## X.gender_inp -0.108271 0.012026 -9.00 <2e-16 ***
## X.age_inp 0.000426 0.000532 0.80 0.424
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.556 on 7258 degrees of freedom
## Multiple R-squared: 0.0118, Adjusted R-squared: 0.0114
## F-statistic: 29 on 3 and 7258 DF, p-value: <2e-16
##
## [1] "60th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.832 -0.490 -0.418 0.553 1.852
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.526085 0.020794 25.30 <2e-16 ***
## cate_W 0.029040 0.010797 2.69 0.0072 **
## X.gender_inp -0.108621 0.011061 -9.82 <2e-16 ***
## X.age_inp 0.000020 0.000481 0.04 0.9668
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.555 on 8461 degrees of freedom
## Multiple R-squared: 0.0123, Adjusted R-squared: 0.0119
## F-statistic: 35 on 3 and 8461 DF, p-value: <2e-16
##
## [1] "70th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.806 -0.487 -0.407 0.557 1.886
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.508026 0.019267 26.37 < 2e-16 ***
## cate_W 0.036084 0.010090 3.58 0.00035 ***
## X.gender_inp -0.104824 0.010321 -10.16 < 2e-16 ***
## X.age_inp 0.000116 0.000436 0.27 0.78986
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.554 on 9670 degrees of freedom
## Multiple R-squared: 0.012, Adjusted R-squared: 0.0117
## F-statistic: 39.2 on 3 and 9670 DF, p-value: <2e-16
##
## [1] "80th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.765 -0.486 -0.400 0.559 1.909
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.490636 0.018401 26.66 < 2e-16 ***
## cate_W 0.040989 0.009507 4.31 1.6e-05 ***
## X.gender_inp -0.094827 0.009670 -9.81 < 2e-16 ***
## X.age_inp 0.000122 0.000406 0.30 0.76
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.553 on 10880 degrees of freedom
## Multiple R-squared: 0.0106, Adjusted R-squared: 0.0103
## F-statistic: 38.7 on 3 and 10880 DF, p-value: <2e-16
##
## [1] "90th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Y ~ cate_W + X.gender_inp + X.age_inp"
##
## Call:
## lm(formula = as.formula(formula_str), data = data_subset, weights = weights)
##
## Weighted Residuals:
## Min 1Q Median 3Q Max
## -1.730 -0.480 -0.395 0.565 1.926
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.493817 0.017859 27.65 < 2e-16 ***
## cate_W 0.039988 0.009011 4.44 9.2e-06 ***
## X.gender_inp -0.087152 0.009094 -9.58 < 2e-16 ***
## X.age_inp -0.000306 0.000385 -0.80 0.43
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.552 on 12090 degrees of freedom
## Multiple R-squared: 0.00921, Adjusted R-squared: 0.00897
## F-statistic: 37.5 on 3 and 12090 DF, p-value: <2e-16
##
## [1] "100th"
## <simpleError in print.default("Estimate:", estimate[current_index]): invalid printing digits 0>
## [1] "Results of cumulative analysis:"
## [1] "20th" "30th" "40th" "50th" "60th" "70th" "80th" "90th" "100th"
## [1] "Percentile Groups ranked by ohp_all_ever_inperson_cw0_lambda_0"

## [1] "finished decreasing"

# Check if CLATE pairs exist and are not empty
if (length(clate_outcome_rankvar_pairs) > 0 &&
!is.null(clate_outcome_rankvar_pairs[[1]]) &&
length(clate_outcome_rankvar_pairs[[1]]) > 0) {
for (i in seq_along(clate_outcome_rankvar_pairs)) {
outcome <- clate_outcome_rankvar_pairs[[i]][[1]]
ranking_variable <- clate_outcome_rankvar_pairs[[i]][[2]]
create_cumulative_outcome_plots(outcome, ranking_variable, "clate")
}
} else {
print("No CLATE pairs to process - skipping CLATE analysis")
}
## [1] "Processing outcome var: debt_neg_cw0_lambda_0"
## [1] "Processing ranking var: debt_neg_cw0_lambda_0"
## [1] "#####Creating dataframe.#####"
## [1] "Column called for lambda cate ranking"
## [1] "cate_lambda_0_ranking_20"
## [1] "Column called for lambda clate ranking"
## [1] "clate_lambda_0_ranking_20"
## [1] "Filename:"
## [1] "PP_Full_Analysis/Intermediate_data/Testing/empirical/cw_med_1/cate_clate_results_debt_neg_cw0.csv"
## [1] "Non-OHP analysis - including CLATE rankings"
## [1] "Dimensions of selected_ranking_df: 12094"
## [2] "Dimensions of selected_ranking_df: 3"
## Rows: 12,094
## Columns: 3
## $ person_id <int> 5, 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68, …
## $ cate_rankings_selected <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, 17…
## $ clate_rankings_selected <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, 13…
## [1] "Dimensions of outcome_df: 12094" "Dimensions of outcome_df: 66"
## Rows: 12,094
## Columns: 66
## $ person_id <int> 5, 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68…
## $ X.numhh_list <int> 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0,…
## $ X.age_inp <int> 60, 41, 39, 52, 51, 32, 34, 23, 43, 46, 38, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1,…
## $ X.lessHS <int> 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 574…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 454…
## $ Y <int> 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1,…
## $ clate_W <int> 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0,…
## $ Z <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ weights <dbl> 1.1504, 0.8975, 1.0000, 1.2126, 1.0000, 1.00…
## $ folds <int> 8, 1, 10, 3, 10, 9, 9, 4, 4, 10, 7, 6, 5, 7,…
## $ clate <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ clate_se <dbl> 0.06976, 0.09180, 0.06904, 0.05327, 0.03534,…
## $ clate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 1, 4, 3,…
## $ clate_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 18, 15, 11, 14, 4, …
## $ cate_W <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ cate <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ cate_se <dbl> 0.007787, 0.014411, 0.014614, 0.016439, 0.00…
## $ cate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ cate_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 14, 17, 5, …
## $ cate_lambda_0 <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ clate_lambda_0 <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ cate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ clate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_0_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_lambda_0_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ cate_lambda_1 <dbl> 0.049109, 0.017776, 0.020236, 0.029518, 0.03…
## $ clate_lambda_1 <dbl> 0.204401, 0.046846, 0.062183, 0.114336, 0.10…
## $ cate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 5, 4,…
## $ clate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_1_ranking_20 <int> 20, 3, 4, 8, 9, 1, 1, 6, 19, 13, 14, 16, 7, …
## $ clate_lambda_1_ranking_20 <int> 20, 2, 3, 8, 6, 1, 1, 6, 17, 15, 9, 14, 5, 1…
## $ cate_lambda_2 <dbl> 0.0471620, 0.0141732, 0.0165822, 0.0254081, …
## $ clate_lambda_2 <dbl> 0.18696, 0.02390, 0.04492, 0.10102, 0.09813,…
## $ cate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 4, 4,…
## $ clate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_2_ranking_20 <int> 20, 3, 4, 7, 10, 1, 1, 7, 19, 14, 15, 15, 8,…
## $ clate_lambda_2_ranking_20 <int> 20, 2, 3, 8, 7, 2, 1, 6, 17, 15, 8, 14, 6, 1…
## $ cate_lambda_3 <dbl> 0.0452152, 0.0105705, 0.0129287, 0.0212983, …
## $ clate_lambda_3 <dbl> 0.1695211, 0.0009444, 0.0276625, 0.0877004, …
## $ cate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 3, 4, 4,…
## $ clate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_3_ranking_20 <int> 20, 3, 4, 7, 11, 1, 1, 7, 19, 15, 15, 13, 9,…
## $ clate_lambda_3_ranking_20 <int> 20, 2, 3, 8, 8, 2, 1, 7, 17, 14, 7, 14, 6, 1…
## $ cate_lambda_4 <dbl> 0.043268, 0.006968, 0.009275, 0.017188, 0.02…
## $ clate_lambda_4 <dbl> 0.152081, -0.022007, 0.010402, 0.074383, 0.0…
## $ cate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 3, 3, 4, 4,…
## $ clate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_4_ranking_20 <int> 20, 4, 4, 7, 12, 1, 1, 7, 19, 16, 16, 11, 10…
## $ clate_lambda_4_ranking_20 <int> 19, 2, 3, 8, 9, 2, 1, 7, 17, 14, 7, 14, 7, 1…
## [1] "Dimensions of cdf_data"
## [1] 12094 68
## Rows: 12,094
## Columns: 68
## $ person_id <int> 5, 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68…
## $ cate_rankings_selected <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_rankings_selected <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ X.numhh_list <int> 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0,…
## $ X.age_inp <int> 60, 41, 39, 52, 51, 32, 34, 23, 43, 46, 38, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1,…
## $ X.lessHS <int> 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 574…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 454…
## $ Y <int> 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1,…
## $ clate_W <int> 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0,…
## $ Z <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ weights <dbl> 1.1504, 0.8975, 1.0000, 1.2126, 1.0000, 1.00…
## $ folds <int> 8, 1, 10, 3, 10, 9, 9, 4, 4, 10, 7, 6, 5, 7,…
## $ clate <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ clate_se <dbl> 0.06976, 0.09180, 0.06904, 0.05327, 0.03534,…
## $ clate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 1, 4, 3,…
## $ clate_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 18, 15, 11, 14, 4, …
## $ cate_W <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ cate <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ cate_se <dbl> 0.007787, 0.014411, 0.014614, 0.016439, 0.00…
## $ cate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ cate_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 14, 17, 5, …
## $ cate_lambda_0 <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ clate_lambda_0 <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ cate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ clate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_0_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_lambda_0_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ cate_lambda_1 <dbl> 0.049109, 0.017776, 0.020236, 0.029518, 0.03…
## $ clate_lambda_1 <dbl> 0.204401, 0.046846, 0.062183, 0.114336, 0.10…
## $ cate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 5, 4,…
## $ clate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_1_ranking_20 <int> 20, 3, 4, 8, 9, 1, 1, 6, 19, 13, 14, 16, 7, …
## $ clate_lambda_1_ranking_20 <int> 20, 2, 3, 8, 6, 1, 1, 6, 17, 15, 9, 14, 5, 1…
## $ cate_lambda_2 <dbl> 0.0471620, 0.0141732, 0.0165822, 0.0254081, …
## $ clate_lambda_2 <dbl> 0.18696, 0.02390, 0.04492, 0.10102, 0.09813,…
## $ cate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 4, 4,…
## $ clate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_2_ranking_20 <int> 20, 3, 4, 7, 10, 1, 1, 7, 19, 14, 15, 15, 8,…
## $ clate_lambda_2_ranking_20 <int> 20, 2, 3, 8, 7, 2, 1, 6, 17, 15, 8, 14, 6, 1…
## $ cate_lambda_3 <dbl> 0.0452152, 0.0105705, 0.0129287, 0.0212983, …
## $ clate_lambda_3 <dbl> 0.1695211, 0.0009444, 0.0276625, 0.0877004, …
## $ cate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 3, 4, 4,…
## $ clate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_3_ranking_20 <int> 20, 3, 4, 7, 11, 1, 1, 7, 19, 15, 15, 13, 9,…
## $ clate_lambda_3_ranking_20 <int> 20, 2, 3, 8, 8, 2, 1, 7, 17, 14, 7, 14, 6, 1…
## $ cate_lambda_4 <dbl> 0.043268, 0.006968, 0.009275, 0.017188, 0.02…
## $ clate_lambda_4 <dbl> 0.152081, -0.022007, 0.010402, 0.074383, 0.0…
## $ cate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 3, 3, 4, 4,…
## $ clate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_4_ranking_20 <int> 20, 4, 4, 7, 12, 1, 1, 7, 19, 16, 16, 11, 10…
## $ clate_lambda_4_ranking_20 <int> 19, 2, 3, 8, 9, 2, 1, 7, 17, 14, 7, 14, 7, 1…
## [1] "clate"
## [1] "#####Running clate function.#####"
## ranking_rescale
## 10 20 30 40 50 60 70 80 90 100
## 1210 1210 1208 1210 1214 1204 1210 1209 1209 1210
## Rows: 2,419
## Columns: 68
## $ person_id <int> 5, 47, 196, 240, 243, 255, 287, 294, 333, 34…
## $ cate_rankings_selected <int> 20, 19, 20, 11, 17, 18, 16, 15, 20, 14, 20, …
## $ clate_rankings_selected <int> 20, 17, 19, 18, 17, 19, 17, 18, 19, 18, 19, …
## $ X.numhh_list <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1,…
## $ X.age_inp <int> 60, 43, 51, 61, 57, 24, 30, 25, 51, 46, 56, …
## $ X.hispanic_inp <int> 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ X.lessHS <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0,…
## $ X.HSorGED <int> 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ed_charg_tot_pre_ed <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ Y <int> 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0,…
## $ clate_W <int> 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ Z <int> 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0,…
## $ weights <dbl> 1.1504, 1.0000, 1.5712, 1.1438, 1.0033, 1.00…
## $ folds <int> 8, 4, 1, 6, 3, 3, 3, 6, 8, 2, 6, 2, 4, 2, 1,…
## $ clate <dbl> 0.2218, 0.1845, 0.1973, 0.1875, 0.1784, 0.19…
## $ clate_se <dbl> 0.06976, 0.05760, 0.04286, 0.03214, 0.04930,…
## $ clate_ranking_5 <int> 5, 5, 5, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5,…
## $ clate_ranking_20 <int> 20, 18, 19, 18, 16, 19, 16, 18, 19, 19, 19, …
## $ cate_W <int> 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0,…
## $ cate <dbl> 0.05106, 0.04927, 0.05172, 0.03666, 0.04387,…
## $ cate_se <dbl> 0.007787, 0.014469, 0.013995, 0.019792, 0.02…
## $ cate_ranking_5 <int> 5, 5, 5, 3, 4, 5, 4, 4, 5, 4, 5, 4, 5, 4, 5,…
## $ cate_ranking_20 <int> 20, 19, 20, 11, 16, 18, 16, 15, 20, 14, 20, …
## $ cate_lambda_0 <dbl> 0.05106, 0.04927, 0.05172, 0.03666, 0.04387,…
## $ clate_lambda_0 <dbl> 0.2218, 0.1845, 0.1973, 0.1875, 0.1784, 0.19…
## $ cate_lambda_0_ranking_5 <int> 5, 5, 5, 3, 5, 5, 4, 4, 5, 4, 5, 4, 5, 4, 5,…
## $ clate_lambda_0_ranking_5 <int> 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,…
## $ cate_lambda_0_ranking_20 <int> 20, 19, 20, 11, 17, 18, 16, 15, 20, 14, 20, …
## $ clate_lambda_0_ranking_20 <int> 20, 17, 19, 18, 17, 19, 17, 18, 19, 18, 19, …
## $ cate_lambda_1 <dbl> 0.04911, 0.04566, 0.04822, 0.03171, 0.03867,…
## $ clate_lambda_1 <dbl> 0.2044, 0.1701, 0.1865, 0.1794, 0.1661, 0.18…
## $ cate_lambda_1_ranking_5 <int> 5, 5, 5, 3, 4, 5, 4, 4, 5, 4, 5, 4, 5, 4, 5,…
## $ clate_lambda_1_ranking_5 <int> 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5,…
## $ cate_lambda_1_ranking_20 <int> 20, 19, 20, 9, 15, 18, 15, 14, 20, 13, 20, 1…
## $ clate_lambda_1_ranking_20 <int> 20, 17, 19, 18, 17, 19, 15, 18, 19, 18, 19, …
## $ cate_lambda_2 <dbl> 0.04716, 0.04204, 0.04473, 0.02677, 0.03347,…
## $ clate_lambda_2 <dbl> 0.1870, 0.1557, 0.1758, 0.1714, 0.1537, 0.16…
## $ cate_lambda_2_ranking_5 <int> 5, 5, 5, 2, 4, 5, 4, 3, 5, 4, 5, 4, 5, 4, 5,…
## $ clate_lambda_2_ranking_5 <int> 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5,…
## $ cate_lambda_2_ranking_20 <int> 20, 19, 20, 8, 14, 17, 15, 12, 20, 13, 20, 1…
## $ clate_lambda_2_ranking_20 <int> 20, 17, 19, 19, 17, 18, 14, 19, 20, 17, 20, …
## $ cate_lambda_3 <dbl> 0.04522, 0.03842, 0.04123, 0.02182, 0.02827,…
## $ clate_lambda_3 <dbl> 0.1695, 0.1413, 0.1651, 0.1634, 0.1414, 0.14…
## $ cate_lambda_3_ranking_5 <int> 5, 5, 5, 2, 3, 5, 4, 3, 5, 4, 5, 5, 4, 4, 5,…
## $ clate_lambda_3_ranking_5 <int> 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5,…
## $ cate_lambda_3_ranking_20 <int> 20, 19, 20, 8, 12, 17, 14, 11, 19, 13, 20, 1…
## $ clate_lambda_3_ranking_20 <int> 20, 17, 19, 19, 17, 18, 13, 19, 20, 17, 20, …
## $ cate_lambda_4 <dbl> 0.04327, 0.03481, 0.03773, 0.01687, 0.02306,…
## $ clate_lambda_4 <dbl> 0.15208, 0.12687, 0.15439, 0.15533, 0.12910,…
## $ cate_lambda_4_ranking_5 <int> 5, 5, 5, 2, 3, 4, 4, 3, 5, 3, 5, 5, 4, 4, 5,…
## $ clate_lambda_4_ranking_5 <int> 5, 5, 5, 5, 5, 5, 3, 5, 5, 4, 5, 5, 5, 5, 5,…
## $ cate_lambda_4_ranking_20 <int> 20, 19, 20, 7, 11, 16, 13, 10, 19, 12, 19, 1…
## $ clate_lambda_4_ranking_20 <int> 19, 17, 19, 19, 17, 17, 12, 19, 20, 16, 20, …
## [1] 0.8
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.353 -0.515 -0.431 0.544 1.223
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.496344 0.042776 11.60 <2e-16 ***
## clate_W 0.099214 0.079595 1.25 0.213
## X.gender_inp -0.057810 0.024258 -2.38 0.017 *
## X.age_inp 0.000319 0.000787 0.41 0.685
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 2415 209.45 <2e-16 ***
## Wu-Hausman 1 2414 0.16 0.69
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.554 on 2415 degrees of freedom
## Multiple R-Squared: 0.00489, Adjusted R-squared: 0.00365
## Wald test: 2 on 3 and 2415 DF, p-value: 0.112
##
## Rows: 3,628
## Columns: 68
## $ person_id <int> 5, 47, 57, 88, 113, 144, 195, 196, 210, 240,…
## $ cate_rankings_selected <int> 20, 19, 12, 9, 7, 14, 12, 20, 13, 11, 17, 18…
## $ clate_rankings_selected <int> 20, 17, 15, 15, 16, 16, 16, 19, 16, 18, 17, …
## $ X.numhh_list <int> 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0,…
## $ X.age_inp <int> 60, 43, 46, 56, 59, 50, 46, 51, 28, 61, 57, …
## $ X.hispanic_inp <int> 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.lessHS <int> 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1,…
## $ X.charg_tot_pre_ed <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ed_charg_tot_pre_ed <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ Y <int> 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0,…
## $ clate_W <int> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1,…
## $ Z <int> 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0,…
## $ weights <dbl> 1.150, 1.000, 1.003, 1.325, 1.708, 1.000, 1.…
## $ folds <int> 8, 4, 10, 2, 1, 4, 2, 1, 5, 6, 3, 3, 1, 6, 7…
## $ clate <dbl> 0.2218, 0.1845, 0.1681, 0.1683, 0.1724, 0.17…
## $ clate_se <dbl> 0.06976, 0.05760, 0.05733, 0.09286, 0.05619,…
## $ clate_ranking_5 <int> 5, 5, 4, 4, 4, 4, 5, 5, 4, 5, 4, 5, 4, 4, 5,…
## $ clate_ranking_20 <int> 20, 18, 15, 15, 16, 16, 17, 19, 16, 18, 16, …
## $ cate_W <int> 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0,…
## $ cate <dbl> 0.05106, 0.04927, 0.03821, 0.03428, 0.03169,…
## $ cate_se <dbl> 0.007787, 0.014469, 0.008896, 0.010848, 0.01…
## $ cate_ranking_5 <int> 5, 5, 3, 3, 2, 4, 3, 5, 3, 3, 4, 5, 5, 4, 5,…
## $ cate_ranking_20 <int> 20, 19, 12, 9, 7, 14, 12, 20, 12, 11, 16, 18…
## $ cate_lambda_0 <dbl> 0.05106, 0.04927, 0.03821, 0.03428, 0.03169,…
## $ clate_lambda_0 <dbl> 0.2218, 0.1845, 0.1681, 0.1683, 0.1724, 0.17…
## $ cate_lambda_0_ranking_5 <int> 5, 5, 3, 3, 2, 4, 3, 5, 4, 3, 5, 5, 5, 4, 5,…
## $ clate_lambda_0_ranking_5 <int> 5, 5, 4, 4, 4, 4, 4, 5, 4, 5, 5, 5, 4, 4, 4,…
## $ cate_lambda_0_ranking_20 <int> 20, 19, 12, 9, 7, 14, 12, 20, 13, 11, 17, 18…
## $ clate_lambda_0_ranking_20 <int> 20, 17, 15, 15, 16, 16, 16, 19, 16, 18, 17, …
## $ cate_lambda_1 <dbl> 0.04911, 0.04566, 0.03598, 0.03157, 0.02749,…
## $ clate_lambda_1 <dbl> 0.2044, 0.1701, 0.1537, 0.1451, 0.1583, 0.16…
## $ cate_lambda_1_ranking_5 <int> 5, 5, 4, 3, 2, 4, 4, 5, 4, 3, 4, 5, 5, 4, 5,…
## $ clate_lambda_1_ranking_5 <int> 5, 5, 4, 4, 4, 5, 4, 5, 4, 5, 5, 5, 4, 4, 4,…
## $ cate_lambda_1_ranking_20 <int> 20, 19, 13, 9, 7, 13, 13, 20, 13, 9, 15, 18,…
## $ clate_lambda_1_ranking_20 <int> 20, 17, 15, 13, 15, 17, 14, 19, 16, 18, 17, …
## $ cate_lambda_2 <dbl> 0.04716, 0.04204, 0.03376, 0.02885, 0.02330,…
## $ clate_lambda_2 <dbl> 0.1870, 0.1557, 0.1394, 0.1218, 0.1443, 0.15…
## $ cate_lambda_2_ranking_5 <int> 5, 5, 4, 3, 2, 3, 4, 5, 4, 2, 4, 5, 5, 4, 5,…
## $ clate_lambda_2_ranking_5 <int> 5, 5, 4, 3, 4, 5, 3, 5, 4, 5, 5, 5, 5, 4, 4,…
## $ cate_lambda_2_ranking_20 <int> 20, 19, 14, 10, 6, 12, 14, 20, 13, 8, 14, 17…
## $ clate_lambda_2_ranking_20 <int> 20, 17, 15, 11, 15, 17, 12, 19, 15, 19, 17, …
## $ cate_lambda_3 <dbl> 0.04522, 0.03842, 0.03153, 0.02614, 0.01911,…
## $ clate_lambda_3 <dbl> 0.16952, 0.14128, 0.12507, 0.09864, 0.13025,…
## $ cate_lambda_3_ranking_5 <int> 5, 5, 4, 3, 2, 3, 4, 5, 4, 2, 3, 5, 5, 3, 5,…
## $ clate_lambda_3_ranking_5 <int> 5, 5, 4, 3, 4, 5, 3, 5, 4, 5, 5, 5, 5, 4, 4,…
## $ cate_lambda_3_ranking_20 <int> 20, 19, 15, 11, 6, 11, 15, 20, 13, 8, 12, 17…
## $ clate_lambda_3_ranking_20 <int> 20, 17, 14, 10, 15, 18, 11, 19, 15, 19, 17, …
## $ cate_lambda_4 <dbl> 0.04327, 0.03481, 0.02931, 0.02343, 0.01491,…
## $ clate_lambda_4 <dbl> 0.15208, 0.12687, 0.11074, 0.07542, 0.11620,…
## $ cate_lambda_4_ranking_5 <int> 5, 5, 4, 3, 2, 3, 4, 5, 4, 2, 3, 4, 5, 3, 5,…
## $ clate_lambda_4_ranking_5 <int> 5, 5, 4, 2, 4, 5, 3, 5, 4, 5, 5, 5, 5, 4, 4,…
## $ cate_lambda_4_ranking_20 <int> 20, 19, 16, 11, 6, 10, 16, 20, 13, 7, 11, 16…
## $ clate_lambda_4_ranking_20 <int> 19, 17, 14, 8, 15, 18, 9, 19, 15, 19, 17, 17…
## [1] 0.7
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.549 -0.491 -0.391 0.563 1.324
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.477506 0.034654 13.78 < 2e-16 ***
## clate_W 0.212156 0.065087 3.26 0.0011 **
## X.gender_inp -0.083109 0.018937 -4.39 1.2e-05 ***
## X.age_inp 0.000253 0.000651 0.39 0.6974
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 3624 322.27 <2e-16 ***
## Wu-Hausman 1 3623 5.78 0.016 *
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.558 on 3624 degrees of freedom
## Multiple R-Squared: -0.011, Adjusted R-squared: -0.0118
## Wald test: 7.77 on 3 and 3624 DF, p-value: 3.61e-05
##
## Rows: 4,838
## Columns: 68
## $ person_id <int> 5, 47, 57, 68, 76, 83, 88, 101, 113, 144, 19…
## $ cate_rankings_selected <int> 20, 19, 12, 17, 17, 10, 9, 14, 7, 14, 12, 20…
## $ clate_rankings_selected <int> 20, 17, 15, 14, 13, 14, 15, 13, 16, 16, 16, …
## $ X.numhh_list <int> 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,…
## $ X.age_inp <int> 60, 43, 46, 25, 60, 54, 56, 43, 59, 50, 46, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0,…
## $ X.lessHS <int> 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1,…
## $ X.charg_tot_pre_ed <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ed_charg_tot_pre_ed <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ Y <int> 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0,…
## $ clate_W <int> 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ Z <int> 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1,…
## $ weights <dbl> 1.1504, 1.0000, 1.0033, 1.0000, 1.0000, 1.00…
## $ folds <int> 8, 4, 10, 6, 7, 10, 2, 8, 1, 4, 2, 1, 5, 7, …
## $ clate <dbl> 0.2218, 0.1845, 0.1681, 0.1665, 0.1582, 0.16…
## $ clate_se <dbl> 0.06976, 0.05760, 0.05733, 0.05982, 0.03965,…
## $ clate_ranking_5 <int> 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 4, 4, 4,…
## $ clate_ranking_20 <int> 20, 18, 15, 14, 13, 14, 15, 13, 16, 16, 17, …
## $ cate_W <int> 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1,…
## $ cate <dbl> 0.05106, 0.04927, 0.03821, 0.04510, 0.04481,…
## $ cate_se <dbl> 0.007787, 0.014469, 0.008896, 0.021442, 0.01…
## $ cate_ranking_5 <int> 5, 5, 3, 5, 5, 3, 3, 4, 2, 4, 3, 5, 3, 3, 4,…
## $ cate_ranking_20 <int> 20, 19, 12, 17, 17, 10, 9, 14, 7, 14, 12, 20…
## $ cate_lambda_0 <dbl> 0.05106, 0.04927, 0.03821, 0.04510, 0.04481,…
## $ clate_lambda_0 <dbl> 0.2218, 0.1845, 0.1681, 0.1665, 0.1582, 0.16…
## $ cate_lambda_0_ranking_5 <int> 5, 5, 3, 5, 5, 3, 3, 4, 2, 4, 3, 5, 4, 3, 4,…
## $ clate_lambda_0_ranking_5 <int> 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 4,…
## $ cate_lambda_0_ranking_20 <int> 20, 19, 12, 17, 17, 10, 9, 14, 7, 14, 12, 20…
## $ clate_lambda_0_ranking_20 <int> 20, 17, 15, 14, 13, 14, 15, 13, 16, 16, 16, …
## $ cate_lambda_1 <dbl> 0.04911, 0.04566, 0.03598, 0.03974, 0.04077,…
## $ clate_lambda_1 <dbl> 0.2044, 0.1701, 0.1537, 0.1515, 0.1483, 0.14…
## $ cate_lambda_1_ranking_5 <int> 5, 5, 4, 4, 5, 3, 3, 4, 2, 4, 4, 5, 4, 3, 3,…
## $ clate_lambda_1_ranking_5 <int> 5, 5, 4, 4, 4, 4, 4, 3, 4, 5, 4, 5, 4, 4, 3,…
## $ cate_lambda_1_ranking_20 <int> 20, 19, 13, 16, 17, 11, 9, 14, 7, 13, 13, 20…
## $ clate_lambda_1_ranking_20 <int> 20, 17, 15, 14, 14, 13, 13, 12, 15, 17, 14, …
## $ cate_lambda_2 <dbl> 0.04716, 0.04204, 0.03376, 0.03438, 0.03673,…
## $ clate_lambda_2 <dbl> 0.1870, 0.1557, 0.1394, 0.1365, 0.1384, 0.12…
## $ cate_lambda_2_ranking_5 <int> 5, 5, 4, 4, 4, 3, 3, 4, 2, 3, 4, 5, 4, 3, 3,…
## $ clate_lambda_2_ranking_5 <int> 5, 5, 4, 4, 4, 4, 3, 3, 4, 5, 3, 5, 4, 4, 3,…
## $ cate_lambda_2_ranking_20 <int> 20, 19, 14, 15, 16, 12, 10, 13, 6, 12, 14, 2…
## $ clate_lambda_2_ranking_20 <int> 20, 17, 15, 14, 14, 13, 11, 11, 15, 17, 12, …
## $ cate_lambda_3 <dbl> 0.04522, 0.03842, 0.03153, 0.02902, 0.03269,…
## $ clate_lambda_3 <dbl> 0.16952, 0.14128, 0.12507, 0.12159, 0.12851,…
## $ cate_lambda_3_ranking_5 <int> 5, 5, 4, 4, 4, 4, 3, 4, 2, 3, 4, 5, 4, 3, 3,…
## $ clate_lambda_3_ranking_5 <int> 5, 5, 4, 4, 4, 3, 3, 3, 4, 5, 3, 5, 4, 4, 3,…
## $ cate_lambda_3_ranking_20 <int> 20, 19, 15, 13, 16, 14, 11, 13, 6, 11, 15, 2…
## $ clate_lambda_3_ranking_20 <int> 20, 17, 14, 14, 15, 12, 10, 11, 15, 18, 11, …
## $ cate_lambda_4 <dbl> 0.04327, 0.03481, 0.02931, 0.02366, 0.02866,…
## $ clate_lambda_4 <dbl> 0.15208, 0.12687, 0.11074, 0.10663, 0.11860,…
## $ cate_lambda_4_ranking_5 <int> 5, 5, 4, 3, 4, 4, 3, 4, 2, 3, 4, 5, 4, 3, 3,…
## $ clate_lambda_4_ranking_5 <int> 5, 5, 4, 4, 4, 3, 2, 3, 4, 5, 3, 5, 4, 5, 2,…
## $ cate_lambda_4_ranking_20 <int> 20, 19, 16, 11, 15, 15, 11, 13, 6, 10, 16, 2…
## $ clate_lambda_4_ranking_20 <int> 19, 17, 14, 14, 16, 11, 8, 10, 15, 18, 9, 19…
## [1] 0.6
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.599 -0.490 -0.373 0.552 1.360
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.494068 0.029924 16.51 < 2e-16 ***
## clate_W 0.228178 0.057225 3.99 6.8e-05 ***
## X.gender_inp -0.105591 0.015636 -6.75 1.6e-11 ***
## X.age_inp -0.000157 0.000572 -0.27 0.78
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 4834 417.24 <2e-16 ***
## Wu-Hausman 1 4833 9.34 0.0023 **
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.557 on 4834 degrees of freedom
## Multiple R-Squared: -0.0118, Adjusted R-squared: -0.0124
## Wald test: 16.8 on 3 and 4834 DF, p-value: 7.37e-11
##
## Rows: 6,042
## Columns: 68
## $ person_id <int> 5, 47, 57, 68, 76, 83, 88, 89, 101, 113, 144…
## $ cate_rankings_selected <int> 20, 19, 12, 17, 17, 10, 9, 13, 14, 7, 14, 12…
## $ clate_rankings_selected <int> 20, 17, 15, 14, 13, 14, 15, 11, 13, 16, 16, …
## $ X.numhh_list <int> 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1,…
## $ X.gender_inp <int> 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1,…
## $ X.age_inp <int> 60, 43, 46, 25, 60, 54, 56, 39, 43, 59, 50, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0,…
## $ X.lessHS <int> 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 895.8, 0.…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 688.8, 0.…
## $ Y <int> 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0,…
## $ clate_W <int> 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ Z <int> 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0,…
## $ weights <dbl> 1.1504, 1.0000, 1.0033, 1.0000, 1.0000, 1.00…
## $ folds <int> 8, 4, 10, 6, 7, 10, 2, 7, 8, 1, 4, 2, 1, 9, …
## $ clate <dbl> 0.2218, 0.1845, 0.1681, 0.1665, 0.1582, 0.16…
## $ clate_se <dbl> 0.06976, 0.05760, 0.05733, 0.05982, 0.03965,…
## $ clate_ranking_5 <int> 5, 5, 4, 4, 4, 4, 4, 3, 4, 4, 4, 5, 5, 3, 4,…
## $ clate_ranking_20 <int> 20, 18, 15, 14, 13, 14, 15, 11, 13, 16, 16, …
## $ cate_W <int> 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0,…
## $ cate <dbl> 0.05106, 0.04927, 0.03821, 0.04510, 0.04481,…
## $ cate_se <dbl> 0.007787, 0.014469, 0.008896, 0.021442, 0.01…
## $ cate_ranking_5 <int> 5, 5, 3, 5, 5, 3, 3, 4, 4, 2, 4, 3, 5, 3, 3,…
## $ cate_ranking_20 <int> 20, 19, 12, 17, 17, 10, 9, 13, 14, 7, 14, 12…
## $ cate_lambda_0 <dbl> 0.05106, 0.04927, 0.03821, 0.04510, 0.04481,…
## $ clate_lambda_0 <dbl> 0.2218, 0.1845, 0.1681, 0.1665, 0.1582, 0.16…
## $ cate_lambda_0_ranking_5 <int> 5, 5, 3, 5, 5, 3, 3, 4, 4, 2, 4, 3, 5, 3, 4,…
## $ clate_lambda_0_ranking_5 <int> 5, 5, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 5, 3, 4,…
## $ cate_lambda_0_ranking_20 <int> 20, 19, 12, 17, 17, 10, 9, 13, 14, 7, 14, 12…
## $ clate_lambda_0_ranking_20 <int> 20, 17, 15, 14, 13, 14, 15, 11, 13, 16, 16, …
## $ cate_lambda_1 <dbl> 0.04911, 0.04566, 0.03598, 0.03974, 0.04077,…
## $ clate_lambda_1 <dbl> 0.2044, 0.1701, 0.1537, 0.1515, 0.1483, 0.14…
## $ cate_lambda_1_ranking_5 <int> 5, 5, 4, 4, 5, 3, 3, 3, 4, 2, 4, 4, 5, 3, 4,…
## $ clate_lambda_1_ranking_5 <int> 5, 5, 4, 4, 4, 4, 4, 3, 3, 4, 5, 4, 5, 3, 4,…
## $ cate_lambda_1_ranking_20 <int> 20, 19, 13, 16, 17, 11, 9, 12, 14, 7, 13, 13…
## $ clate_lambda_1_ranking_20 <int> 20, 17, 15, 14, 14, 13, 13, 11, 12, 15, 17, …
## $ cate_lambda_2 <dbl> 0.04716, 0.04204, 0.03376, 0.03438, 0.03673,…
## $ clate_lambda_2 <dbl> 0.1870, 0.1557, 0.1394, 0.1365, 0.1384, 0.12…
## $ cate_lambda_2_ranking_5 <int> 5, 5, 4, 4, 4, 3, 3, 3, 4, 2, 3, 4, 5, 3, 4,…
## $ clate_lambda_2_ranking_5 <int> 5, 5, 4, 4, 4, 4, 3, 3, 3, 4, 5, 3, 5, 2, 4,…
## $ cate_lambda_2_ranking_20 <int> 20, 19, 14, 15, 16, 12, 10, 12, 13, 6, 12, 1…
## $ clate_lambda_2_ranking_20 <int> 20, 17, 15, 14, 14, 13, 11, 11, 11, 15, 17, …
## $ cate_lambda_3 <dbl> 0.04522, 0.03842, 0.03153, 0.02902, 0.03269,…
## $ clate_lambda_3 <dbl> 0.16952, 0.14128, 0.12507, 0.12159, 0.12851,…
## $ cate_lambda_3_ranking_5 <int> 5, 5, 4, 4, 4, 4, 3, 3, 4, 2, 3, 4, 5, 3, 4,…
## $ clate_lambda_3_ranking_5 <int> 5, 5, 4, 4, 4, 3, 3, 3, 3, 4, 5, 3, 5, 2, 4,…
## $ cate_lambda_3_ranking_20 <int> 20, 19, 15, 13, 16, 14, 11, 12, 13, 6, 11, 1…
## $ clate_lambda_3_ranking_20 <int> 20, 17, 14, 14, 15, 12, 10, 11, 11, 15, 18, …
## $ cate_lambda_4 <dbl> 0.04327, 0.03481, 0.02931, 0.02366, 0.02866,…
## $ clate_lambda_4 <dbl> 0.15208, 0.12687, 0.11074, 0.10663, 0.11860,…
## $ cate_lambda_4_ranking_5 <int> 5, 5, 4, 3, 4, 4, 3, 3, 4, 2, 3, 4, 5, 3, 4,…
## $ clate_lambda_4_ranking_5 <int> 5, 5, 4, 4, 4, 3, 2, 3, 3, 4, 5, 3, 5, 2, 4,…
## $ cate_lambda_4_ranking_20 <int> 20, 19, 16, 11, 15, 15, 11, 12, 13, 6, 10, 1…
## $ clate_lambda_4_ranking_20 <int> 19, 17, 14, 14, 16, 11, 8, 11, 10, 15, 18, 9…
## [1] 0.5
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.519 -0.484 -0.375 0.554 1.974
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.489683 0.026850 18.24 < 2e-16 ***
## clate_W 0.198308 0.050617 3.92 9.0e-05 ***
## X.gender_inp -0.101395 0.013783 -7.36 2.1e-13 ***
## X.age_inp -0.000220 0.000517 -0.43 0.67
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 6038 529.39 <2e-16 ***
## Wu-Hausman 1 6037 6.92 0.0086 **
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.555 on 6038 degrees of freedom
## Multiple R-Squared: -0.00174, Adjusted R-squared: -0.00224
## Wald test: 19.3 on 3 and 6038 DF, p-value: 1.95e-12
##
## Rows: 7,256
## Columns: 68
## $ person_id <int> 5, 47, 57, 59, 68, 76, 77, 83, 88, 89, 101, …
## $ cate_rankings_selected <int> 20, 19, 12, 13, 17, 17, 14, 10, 9, 13, 14, 9…
## $ clate_rankings_selected <int> 20, 17, 15, 10, 14, 13, 10, 14, 15, 11, 13, …
## $ X.numhh_list <int> 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1,…
## $ X.age_inp <int> 60, 43, 46, 38, 25, 60, 35, 54, 56, 39, 43, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1,…
## $ X.lessHS <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,…
## $ Y <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1,…
## $ clate_W <int> 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1,…
## $ Z <int> 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1,…
## $ weights <dbl> 1.1504, 1.0000, 1.0033, 1.5389, 1.0000, 1.00…
## $ folds <int> 8, 4, 10, 7, 6, 7, 8, 10, 2, 7, 8, 2, 1, 4, …
## $ clate <dbl> 0.2218, 0.1845, 0.1681, 0.1448, 0.1665, 0.15…
## $ clate_se <dbl> 0.06976, 0.05760, 0.05733, 0.08090, 0.05982,…
## $ clate_ranking_5 <int> 5, 5, 4, 3, 4, 4, 3, 4, 4, 3, 4, 3, 4, 4, 3,…
## $ clate_ranking_20 <int> 20, 18, 15, 11, 14, 13, 10, 14, 15, 11, 13, …
## $ cate_W <int> 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1,…
## $ cate <dbl> 0.05106, 0.04927, 0.03821, 0.03956, 0.04510,…
## $ cate_se <dbl> 0.007787, 0.014469, 0.008896, 0.010091, 0.02…
## $ cate_ranking_5 <int> 5, 5, 3, 4, 5, 5, 4, 3, 3, 4, 4, 3, 2, 4, 3,…
## $ cate_ranking_20 <int> 20, 19, 12, 14, 17, 17, 14, 10, 9, 13, 14, 1…
## $ cate_lambda_0 <dbl> 0.05106, 0.04927, 0.03821, 0.03956, 0.04510,…
## $ clate_lambda_0 <dbl> 0.2218, 0.1845, 0.1681, 0.1448, 0.1665, 0.15…
## $ cate_lambda_0_ranking_5 <int> 5, 5, 3, 4, 5, 5, 4, 3, 3, 4, 4, 3, 2, 4, 3,…
## $ clate_lambda_0_ranking_5 <int> 5, 5, 4, 3, 4, 4, 3, 4, 4, 3, 4, 3, 4, 4, 3,…
## $ cate_lambda_0_ranking_20 <int> 20, 19, 12, 13, 17, 17, 14, 10, 9, 13, 14, 9…
## $ clate_lambda_0_ranking_20 <int> 20, 17, 15, 10, 14, 13, 10, 14, 15, 11, 13, …
## $ cate_lambda_1 <dbl> 0.04911, 0.04566, 0.03598, 0.03703, 0.03974,…
## $ clate_lambda_1 <dbl> 0.2044, 0.1701, 0.1537, 0.1246, 0.1515, 0.14…
## $ cate_lambda_1_ranking_5 <int> 5, 5, 4, 4, 4, 5, 4, 3, 3, 3, 4, 3, 2, 4, 3,…
## $ clate_lambda_1_ranking_5 <int> 5, 5, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 4, 5, 2,…
## $ cate_lambda_1_ranking_20 <int> 20, 19, 13, 14, 16, 17, 14, 11, 9, 12, 14, 1…
## $ clate_lambda_1_ranking_20 <int> 20, 17, 15, 9, 14, 14, 9, 13, 13, 11, 12, 9,…
## $ cate_lambda_2 <dbl> 0.04716, 0.04204, 0.03376, 0.03451, 0.03438,…
## $ clate_lambda_2 <dbl> 0.18696, 0.15568, 0.13940, 0.10435, 0.13654,…
## $ cate_lambda_2_ranking_5 <int> 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 4, 3, 2, 3, 2,…
## $ clate_lambda_2_ranking_5 <int> 5, 5, 4, 2, 4, 4, 2, 4, 3, 3, 3, 3, 4, 5, 2,…
## $ cate_lambda_2_ranking_20 <int> 20, 19, 14, 15, 15, 16, 13, 12, 10, 12, 13, …
## $ clate_lambda_2_ranking_20 <int> 20, 17, 15, 8, 14, 14, 8, 13, 11, 11, 11, 9,…
## $ cate_lambda_3 <dbl> 0.04522, 0.03842, 0.03153, 0.03199, 0.02902,…
## $ clate_lambda_3 <dbl> 0.16952, 0.14128, 0.12507, 0.08412, 0.12159,…
## $ cate_lambda_3_ranking_5 <int> 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 4, 4, 2, 3, 2,…
## $ clate_lambda_3_ranking_5 <int> 5, 5, 4, 2, 4, 4, 2, 3, 3, 3, 3, 3, 4, 5, 2,…
## $ cate_lambda_3_ranking_20 <int> 20, 19, 15, 15, 13, 16, 13, 14, 11, 12, 13, …
## $ clate_lambda_3_ranking_20 <int> 20, 17, 14, 7, 14, 15, 8, 12, 10, 11, 11, 10…
## $ cate_lambda_4 <dbl> 0.04327, 0.03481, 0.02931, 0.02947, 0.02366,…
## $ clate_lambda_4 <dbl> 0.15208, 0.12687, 0.11074, 0.06390, 0.10663,…
## $ cate_lambda_4_ranking_5 <int> 5, 5, 4, 4, 3, 4, 4, 4, 3, 3, 4, 4, 2, 3, 2,…
## $ clate_lambda_4_ranking_5 <int> 5, 5, 4, 2, 4, 4, 2, 3, 2, 3, 3, 3, 4, 5, 2,…
## $ cate_lambda_4_ranking_20 <int> 20, 19, 16, 16, 11, 15, 13, 15, 11, 12, 13, …
## $ clate_lambda_4_ranking_20 <int> 19, 17, 14, 7, 14, 16, 7, 11, 8, 11, 10, 10,…
## [1] 0.4
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.447 -0.474 -0.363 0.552 2.021
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.458090 0.024550 18.66 < 2e-16 ***
## clate_W 0.195794 0.045934 4.26 2.0e-05 ***
## X.gender_inp -0.086945 0.012598 -6.90 5.6e-12 ***
## X.age_inp -0.000159 0.000476 -0.33 0.74
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 7252 623.12 <2e-16 ***
## Wu-Hausman 1 7251 7.36 0.0067 **
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.553 on 7252 degrees of freedom
## Multiple R-Squared: -0.00202, Adjusted R-squared: -0.00243
## Wald test: 17.6 on 3 and 7252 DF, p-value: 2.37e-11
##
## Rows: 8,466
## Columns: 68
## $ person_id <int> 5, 17, 47, 57, 59, 68, 76, 77, 83, 88, 89, 1…
## $ cate_rankings_selected <int> 20, 8, 19, 12, 13, 17, 17, 14, 10, 9, 13, 14…
## $ clate_rankings_selected <int> 20, 7, 17, 15, 10, 14, 13, 10, 14, 15, 11, 1…
## $ X.numhh_list <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1,…
## $ X.age_inp <int> 60, 52, 43, 46, 38, 25, 60, 35, 54, 56, 39, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1,…
## $ X.ast_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0,…
## $ X.lessHS <int> 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1,…
## $ X.HSorGED <int> 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,…
## $ Y <int> 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1,…
## $ clate_W <int> 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0,…
## $ Z <int> 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ weights <dbl> 1.1504, 1.2126, 1.0000, 1.0033, 1.5389, 1.00…
## $ folds <int> 8, 3, 4, 10, 7, 6, 7, 8, 10, 2, 7, 8, 2, 9, …
## $ clate <dbl> 0.2218, 0.1277, 0.1845, 0.1681, 0.1448, 0.16…
## $ clate_se <dbl> 0.06976, 0.05327, 0.05760, 0.05733, 0.08090,…
## $ clate_ranking_5 <int> 5, 2, 5, 4, 3, 4, 4, 3, 4, 4, 3, 4, 3, 2, 4,…
## $ clate_ranking_20 <int> 20, 7, 18, 15, 11, 14, 13, 10, 14, 15, 11, 1…
## $ cate_W <int> 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ cate <dbl> 0.05106, 0.03363, 0.04927, 0.03821, 0.03956,…
## $ cate_se <dbl> 0.007787, 0.016439, 0.014469, 0.008896, 0.01…
## $ cate_ranking_5 <int> 5, 2, 5, 3, 4, 5, 5, 4, 3, 3, 4, 4, 3, 3, 2,…
## $ cate_ranking_20 <int> 20, 8, 19, 12, 14, 17, 17, 14, 10, 9, 13, 14…
## $ cate_lambda_0 <dbl> 0.05106, 0.03363, 0.04927, 0.03821, 0.03956,…
## $ clate_lambda_0 <dbl> 0.2218, 0.1277, 0.1845, 0.1681, 0.1448, 0.16…
## $ cate_lambda_0_ranking_5 <int> 5, 2, 5, 3, 4, 5, 5, 4, 3, 3, 4, 4, 3, 3, 2,…
## $ clate_lambda_0_ranking_5 <int> 5, 2, 5, 4, 3, 4, 4, 3, 4, 4, 3, 4, 3, 2, 4,…
## $ cate_lambda_0_ranking_20 <int> 20, 8, 19, 12, 13, 17, 17, 14, 10, 9, 13, 14…
## $ clate_lambda_0_ranking_20 <int> 20, 7, 17, 15, 10, 14, 13, 10, 14, 15, 11, 1…
## $ cate_lambda_1 <dbl> 0.04911, 0.02952, 0.04566, 0.03598, 0.03703,…
## $ clate_lambda_1 <dbl> 0.2044, 0.1143, 0.1701, 0.1537, 0.1246, 0.15…
## $ cate_lambda_1_ranking_5 <int> 5, 2, 5, 4, 4, 4, 5, 4, 3, 3, 3, 4, 3, 3, 2,…
## $ clate_lambda_1_ranking_5 <int> 5, 2, 5, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 2, 4,…
## $ cate_lambda_1_ranking_20 <int> 20, 8, 19, 13, 14, 16, 17, 14, 11, 9, 12, 14…
## $ clate_lambda_1_ranking_20 <int> 20, 8, 17, 15, 9, 14, 14, 9, 13, 13, 11, 12,…
## $ cate_lambda_2 <dbl> 0.04716, 0.02541, 0.04204, 0.03376, 0.03451,…
## $ clate_lambda_2 <dbl> 0.18696, 0.10102, 0.15568, 0.13940, 0.10435,…
## $ cate_lambda_2_ranking_5 <int> 5, 2, 5, 4, 4, 4, 4, 4, 3, 3, 3, 4, 3, 3, 2,…
## $ clate_lambda_2_ranking_5 <int> 5, 2, 5, 4, 2, 4, 4, 2, 4, 3, 3, 3, 3, 2, 4,…
## $ cate_lambda_2_ranking_20 <int> 20, 7, 19, 14, 15, 15, 16, 13, 12, 10, 12, 1…
## $ clate_lambda_2_ranking_20 <int> 20, 8, 17, 15, 8, 14, 14, 8, 13, 11, 11, 11,…
## $ cate_lambda_3 <dbl> 0.04522, 0.02130, 0.03842, 0.03153, 0.03199,…
## $ clate_lambda_3 <dbl> 0.16952, 0.08770, 0.14128, 0.12507, 0.08412,…
## $ cate_lambda_3_ranking_5 <int> 5, 2, 5, 4, 4, 4, 4, 4, 4, 3, 3, 4, 4, 3, 2,…
## $ clate_lambda_3_ranking_5 <int> 5, 2, 5, 4, 2, 4, 4, 2, 3, 3, 3, 3, 3, 2, 4,…
## $ cate_lambda_3_ranking_20 <int> 20, 7, 19, 15, 15, 13, 16, 13, 14, 11, 12, 1…
## $ clate_lambda_3_ranking_20 <int> 20, 8, 17, 14, 7, 14, 15, 8, 12, 10, 11, 11,…
## $ cate_lambda_4 <dbl> 0.04327, 0.01719, 0.03481, 0.02931, 0.02947,…
## $ clate_lambda_4 <dbl> 0.15208, 0.07438, 0.12687, 0.11074, 0.06390,…
## $ cate_lambda_4_ranking_5 <int> 5, 2, 5, 4, 4, 3, 4, 4, 4, 3, 3, 4, 4, 3, 2,…
## $ clate_lambda_4_ranking_5 <int> 5, 2, 5, 4, 2, 4, 4, 2, 3, 2, 3, 3, 3, 2, 4,…
## $ cate_lambda_4_ranking_20 <int> 20, 7, 19, 16, 16, 11, 15, 13, 15, 11, 12, 1…
## $ clate_lambda_4_ranking_20 <int> 19, 8, 17, 14, 7, 14, 16, 7, 11, 8, 11, 10, …
## [1] 0.3
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.358 -0.479 -0.356 0.554 2.050
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.445758 0.022768 19.58 < 2e-16 ***
## clate_W 0.163765 0.041833 3.91 9.1e-05 ***
## X.gender_inp -0.090709 0.011560 -7.85 4.8e-15 ***
## X.age_inp 0.000028 0.000440 0.06 0.95
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 8462 730.24 <2e-16 ***
## Wu-Hausman 1 8461 5.16 0.023 *
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.55 on 8462 degrees of freedom
## Multiple R-Squared: 0.00326, Adjusted R-squared: 0.0029
## Wald test: 21.3 on 3 and 8462 DF, p-value: 9.08e-14
##
## Rows: 9,674
## Columns: 68
## $ person_id <int> 5, 17, 18, 29, 47, 57, 59, 68, 70, 76, 77, 8…
## $ cate_rankings_selected <int> 20, 8, 8, 6, 19, 12, 13, 17, 6, 17, 14, 10, …
## $ clate_rankings_selected <int> 20, 7, 6, 6, 17, 15, 10, 14, 5, 13, 10, 14, …
## $ X.numhh_list <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1,…
## $ X.gender_inp <int> 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0,…
## $ X.age_inp <int> 60, 52, 51, 23, 43, 46, 38, 25, 62, 60, 35, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,…
## $ X.hbp_dx_pre_lottery <int> 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0,…
## $ X.lessHS <int> 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ X.HSorGED <int> 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 1715.3, 5743.9, 0.0, 0.0, 0.0, 0.0…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 1006.3, 4542.4, 0.0, 0.0, 0.0, 0.0…
## $ Y <int> 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1,…
## $ clate_W <int> 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0,…
## $ Z <int> 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1,…
## $ weights <dbl> 1.150, 1.213, 1.000, 1.000, 1.000, 1.003, 1.…
## $ folds <int> 8, 3, 10, 4, 4, 10, 7, 6, 5, 7, 8, 10, 2, 7,…
## $ clate <dbl> 0.2218, 0.1277, 0.1158, 0.1175, 0.1845, 0.16…
## $ clate_se <dbl> 0.06976, 0.05327, 0.03534, 0.05295, 0.05760,…
## $ clate_ranking_5 <int> 5, 2, 2, 2, 5, 4, 3, 4, 1, 4, 3, 4, 4, 3, 2,…
## $ clate_ranking_20 <int> 20, 7, 6, 6, 18, 15, 11, 14, 4, 13, 10, 14, …
## $ cate_W <int> 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1,…
## $ cate <dbl> 0.05106, 0.03363, 0.03366, 0.03004, 0.04927,…
## $ cate_se <dbl> 0.007787, 0.016439, 0.008905, 0.012314, 0.01…
## $ cate_ranking_5 <int> 5, 2, 2, 2, 5, 3, 4, 5, 2, 5, 4, 3, 3, 4, 2,…
## $ cate_ranking_20 <int> 20, 8, 8, 6, 19, 12, 14, 17, 5, 17, 14, 10, …
## $ cate_lambda_0 <dbl> 0.05106, 0.03363, 0.03366, 0.03004, 0.04927,…
## $ clate_lambda_0 <dbl> 0.2218, 0.1277, 0.1158, 0.1175, 0.1845, 0.16…
## $ cate_lambda_0_ranking_5 <int> 5, 2, 2, 2, 5, 3, 4, 5, 2, 5, 4, 3, 3, 4, 2,…
## $ clate_lambda_0_ranking_5 <int> 5, 2, 2, 2, 5, 4, 3, 4, 2, 4, 3, 4, 4, 3, 2,…
## $ cate_lambda_0_ranking_20 <int> 20, 8, 8, 6, 19, 12, 13, 17, 6, 17, 14, 10, …
## $ clate_lambda_0_ranking_20 <int> 20, 7, 6, 6, 17, 15, 10, 14, 5, 13, 10, 14, …
## $ cate_lambda_1 <dbl> 0.04911, 0.02952, 0.03143, 0.02696, 0.04566,…
## $ clate_lambda_1 <dbl> 0.20440, 0.11434, 0.10697, 0.10425, 0.17008,…
## $ cate_lambda_1_ranking_5 <int> 5, 2, 3, 2, 5, 4, 4, 4, 2, 5, 4, 3, 3, 3, 2,…
## $ clate_lambda_1_ranking_5 <int> 5, 2, 2, 2, 5, 4, 3, 4, 2, 4, 3, 4, 4, 3, 2,…
## $ cate_lambda_1_ranking_20 <int> 20, 8, 9, 6, 19, 13, 14, 16, 7, 17, 14, 11, …
## $ clate_lambda_1_ranking_20 <int> 20, 8, 6, 6, 17, 15, 9, 14, 5, 14, 9, 13, 13…
## $ cate_lambda_2 <dbl> 0.04716, 0.02541, 0.02920, 0.02388, 0.04204,…
## $ clate_lambda_2 <dbl> 0.18696, 0.10102, 0.09813, 0.09101, 0.15568,…
## $ cate_lambda_2_ranking_5 <int> 5, 2, 3, 2, 5, 4, 4, 4, 2, 4, 4, 3, 3, 3, 3,…
## $ clate_lambda_2_ranking_5 <int> 5, 2, 2, 2, 5, 4, 2, 4, 2, 4, 2, 4, 3, 3, 2,…
## $ cate_lambda_2_ranking_20 <int> 20, 7, 10, 7, 19, 14, 15, 15, 8, 16, 13, 12,…
## $ clate_lambda_2_ranking_20 <int> 20, 8, 7, 6, 17, 15, 8, 14, 6, 14, 8, 13, 11…
## $ cate_lambda_3 <dbl> 0.04522, 0.02130, 0.02698, 0.02080, 0.03842,…
## $ clate_lambda_3 <dbl> 0.16952, 0.08770, 0.08930, 0.07778, 0.14128,…
## $ cate_lambda_3_ranking_5 <int> 5, 2, 3, 2, 5, 4, 4, 4, 3, 4, 4, 4, 3, 3, 3,…
## $ clate_lambda_3_ranking_5 <int> 5, 2, 2, 2, 5, 4, 2, 4, 2, 4, 2, 3, 3, 3, 2,…
## $ cate_lambda_3_ranking_20 <int> 20, 7, 11, 7, 19, 15, 15, 13, 9, 16, 13, 14,…
## $ clate_lambda_3_ranking_20 <int> 20, 8, 8, 7, 17, 14, 7, 14, 6, 15, 8, 12, 10…
## $ cate_lambda_4 <dbl> 0.04327, 0.01719, 0.02475, 0.01772, 0.03481,…
## $ clate_lambda_4 <dbl> 0.15208, 0.07438, 0.08047, 0.06454, 0.12687,…
## $ cate_lambda_4_ranking_5 <int> 5, 2, 3, 2, 5, 4, 4, 3, 3, 4, 4, 4, 3, 3, 3,…
## $ clate_lambda_4_ranking_5 <int> 5, 2, 3, 2, 5, 4, 2, 4, 2, 4, 2, 3, 2, 3, 2,…
## $ cate_lambda_4_ranking_20 <int> 20, 7, 12, 7, 19, 16, 16, 11, 10, 15, 13, 15…
## $ clate_lambda_4_ranking_20 <int> 19, 8, 9, 7, 17, 14, 7, 14, 7, 16, 7, 11, 8,…
## [1] 0.2
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.457 -0.472 -0.353 0.560 2.058
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.445239 0.021695 20.52 < 2e-16 ***
## clate_W 0.171898 0.039894 4.31 1.7e-05 ***
## X.gender_inp -0.087489 0.010879 -8.04 9.9e-16 ***
## X.age_inp -0.000109 0.000420 -0.26 0.8
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 9670 798.38 <2e-16 ***
## Wu-Hausman 1 9669 6.54 0.011 *
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.552 on 9670 degrees of freedom
## Multiple R-Squared: 0.00165, Adjusted R-squared: 0.00134
## Wald test: 22.6 on 3 and 9670 DF, p-value: 1.51e-14
##
## Rows: 10,884
## Columns: 68
## $ person_id <int> 5, 16, 17, 18, 29, 47, 57, 59, 68, 70, 76, 7…
## $ cate_rankings_selected <int> 20, 4, 8, 8, 6, 19, 12, 13, 17, 6, 17, 14, 1…
## $ clate_rankings_selected <int> 20, 3, 7, 6, 6, 17, 15, 10, 14, 5, 13, 10, 1…
## $ X.numhh_list <int> 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1,…
## $ X.gender_inp <int> 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0,…
## $ X.age_inp <int> 60, 39, 52, 51, 23, 43, 46, 38, 25, 62, 60, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1,…
## $ X.lessHS <int> 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.HSorGED <int> 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1715.3, 5743.9, 0.0, 0.0, …
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1006.3, 4542.4, 0.0, 0.0, …
## $ Y <int> 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1,…
## $ clate_W <int> 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1,…
## $ Z <int> 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0,…
## $ weights <dbl> 1.150, 1.000, 1.213, 1.000, 1.000, 1.000, 1.…
## $ folds <int> 8, 10, 3, 10, 4, 4, 10, 7, 6, 5, 7, 8, 10, 2…
## $ clate <dbl> 0.22184, 0.07944, 0.12765, 0.11580, 0.11749,…
## $ clate_se <dbl> 0.06976, 0.06904, 0.05327, 0.03534, 0.05295,…
## $ clate_ranking_5 <int> 5, 1, 2, 2, 2, 5, 4, 3, 4, 1, 4, 3, 4, 4, 3,…
## $ clate_ranking_20 <int> 20, 3, 7, 6, 6, 18, 15, 11, 14, 4, 13, 10, 1…
## $ cate_W <int> 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0,…
## $ cate <dbl> 0.05106, 0.02389, 0.03363, 0.03366, 0.03004,…
## $ cate_se <dbl> 0.007787, 0.014614, 0.016439, 0.008905, 0.01…
## $ cate_ranking_5 <int> 5, 1, 2, 2, 2, 5, 3, 4, 5, 2, 5, 4, 3, 3, 4,…
## $ cate_ranking_20 <int> 20, 4, 8, 8, 6, 19, 12, 14, 17, 5, 17, 14, 1…
## $ cate_lambda_0 <dbl> 0.05106, 0.02389, 0.03363, 0.03366, 0.03004,…
## $ clate_lambda_0 <dbl> 0.22184, 0.07944, 0.12765, 0.11580, 0.11749,…
## $ cate_lambda_0_ranking_5 <int> 5, 1, 2, 2, 2, 5, 3, 4, 5, 2, 5, 4, 3, 3, 4,…
## $ clate_lambda_0_ranking_5 <int> 5, 1, 2, 2, 2, 5, 4, 3, 4, 2, 4, 3, 4, 4, 3,…
## $ cate_lambda_0_ranking_20 <int> 20, 4, 8, 8, 6, 19, 12, 13, 17, 6, 17, 14, 1…
## $ clate_lambda_0_ranking_20 <int> 20, 3, 7, 6, 6, 17, 15, 10, 14, 5, 13, 10, 1…
## $ cate_lambda_1 <dbl> 0.04911, 0.02024, 0.02952, 0.03143, 0.02696,…
## $ clate_lambda_1 <dbl> 0.20440, 0.06218, 0.11434, 0.10697, 0.10425,…
## $ cate_lambda_1_ranking_5 <int> 5, 1, 2, 3, 2, 5, 4, 4, 4, 2, 5, 4, 3, 3, 3,…
## $ clate_lambda_1_ranking_5 <int> 5, 1, 2, 2, 2, 5, 4, 3, 4, 2, 4, 3, 4, 4, 3,…
## $ cate_lambda_1_ranking_20 <int> 20, 4, 8, 9, 6, 19, 13, 14, 16, 7, 17, 14, 1…
## $ clate_lambda_1_ranking_20 <int> 20, 3, 8, 6, 6, 17, 15, 9, 14, 5, 14, 9, 13,…
## $ cate_lambda_2 <dbl> 0.04716, 0.01658, 0.02541, 0.02920, 0.02388,…
## $ clate_lambda_2 <dbl> 0.18696, 0.04492, 0.10102, 0.09813, 0.09101,…
## $ cate_lambda_2_ranking_5 <int> 5, 1, 2, 3, 2, 5, 4, 4, 4, 2, 4, 4, 3, 3, 3,…
## $ clate_lambda_2_ranking_5 <int> 5, 1, 2, 2, 2, 5, 4, 2, 4, 2, 4, 2, 4, 3, 3,…
## $ cate_lambda_2_ranking_20 <int> 20, 4, 7, 10, 7, 19, 14, 15, 15, 8, 16, 13, …
## $ clate_lambda_2_ranking_20 <int> 20, 3, 8, 7, 6, 17, 15, 8, 14, 6, 14, 8, 13,…
## $ cate_lambda_3 <dbl> 0.045215, 0.012929, 0.021298, 0.026977, 0.02…
## $ clate_lambda_3 <dbl> 0.16952, 0.02766, 0.08770, 0.08930, 0.07778,…
## $ cate_lambda_3_ranking_5 <int> 5, 1, 2, 3, 2, 5, 4, 4, 4, 3, 4, 4, 4, 3, 3,…
## $ clate_lambda_3_ranking_5 <int> 5, 1, 2, 2, 2, 5, 4, 2, 4, 2, 4, 2, 3, 3, 3,…
## $ cate_lambda_3_ranking_20 <int> 20, 4, 7, 11, 7, 19, 15, 15, 13, 9, 16, 13, …
## $ clate_lambda_3_ranking_20 <int> 20, 3, 8, 8, 7, 17, 14, 7, 14, 6, 15, 8, 12,…
## $ cate_lambda_4 <dbl> 0.043268, 0.009275, 0.017188, 0.024751, 0.01…
## $ clate_lambda_4 <dbl> 0.15208, 0.01040, 0.07438, 0.08047, 0.06454,…
## $ cate_lambda_4_ranking_5 <int> 5, 1, 2, 3, 2, 5, 4, 4, 3, 3, 4, 4, 4, 3, 3,…
## $ clate_lambda_4_ranking_5 <int> 5, 1, 2, 3, 2, 5, 4, 2, 4, 2, 4, 2, 3, 2, 3,…
## $ cate_lambda_4_ranking_20 <int> 20, 4, 7, 12, 7, 19, 16, 16, 11, 10, 15, 13,…
## $ clate_lambda_4_ranking_20 <int> 19, 3, 8, 9, 7, 17, 14, 7, 14, 7, 16, 7, 11,…
## [1] 0.1
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.715 -0.478 -0.355 0.556 2.052
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.450709 0.020851 21.62 < 2e-16 ***
## clate_W 0.163062 0.038379 4.25 2.2e-05 ***
## X.gender_inp -0.090634 0.010372 -8.74 < 2e-16 ***
## X.age_inp -0.000120 0.000402 -0.30 0.77
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 10880 861.74 <2e-16 ***
## Wu-Hausman 1 10879 6.59 0.01 *
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.553 on 10880 degrees of freedom
## Multiple R-Squared: 0.0019, Adjusted R-squared: 0.00163
## Wald test: 25.9 on 3 and 10880 DF, p-value: <2e-16
##
## Rows: 12,094
## Columns: 68
## $ person_id <int> 5, 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68…
## $ cate_rankings_selected <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_rankings_selected <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ X.numhh_list <int> 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0,…
## $ X.age_inp <int> 60, 41, 39, 52, 51, 32, 34, 23, 43, 46, 38, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1,…
## $ X.lessHS <int> 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 574…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 454…
## $ Y <int> 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1,…
## $ clate_W <int> 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0,…
## $ Z <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ weights <dbl> 1.1504, 0.8975, 1.0000, 1.2126, 1.0000, 1.00…
## $ folds <int> 8, 1, 10, 3, 10, 9, 9, 4, 4, 10, 7, 6, 5, 7,…
## $ clate <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ clate_se <dbl> 0.06976, 0.09180, 0.06904, 0.05327, 0.03534,…
## $ clate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 1, 4, 3,…
## $ clate_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 18, 15, 11, 14, 4, …
## $ cate_W <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ cate <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ cate_se <dbl> 0.007787, 0.014411, 0.014614, 0.016439, 0.00…
## $ cate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ cate_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 14, 17, 5, …
## $ cate_lambda_0 <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ clate_lambda_0 <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ cate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ clate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_0_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_lambda_0_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ cate_lambda_1 <dbl> 0.049109, 0.017776, 0.020236, 0.029518, 0.03…
## $ clate_lambda_1 <dbl> 0.204401, 0.046846, 0.062183, 0.114336, 0.10…
## $ cate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 5, 4,…
## $ clate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_1_ranking_20 <int> 20, 3, 4, 8, 9, 1, 1, 6, 19, 13, 14, 16, 7, …
## $ clate_lambda_1_ranking_20 <int> 20, 2, 3, 8, 6, 1, 1, 6, 17, 15, 9, 14, 5, 1…
## $ cate_lambda_2 <dbl> 0.0471620, 0.0141732, 0.0165822, 0.0254081, …
## $ clate_lambda_2 <dbl> 0.18696, 0.02390, 0.04492, 0.10102, 0.09813,…
## $ cate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 4, 4,…
## $ clate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_2_ranking_20 <int> 20, 3, 4, 7, 10, 1, 1, 7, 19, 14, 15, 15, 8,…
## $ clate_lambda_2_ranking_20 <int> 20, 2, 3, 8, 7, 2, 1, 6, 17, 15, 8, 14, 6, 1…
## $ cate_lambda_3 <dbl> 0.0452152, 0.0105705, 0.0129287, 0.0212983, …
## $ clate_lambda_3 <dbl> 0.1695211, 0.0009444, 0.0276625, 0.0877004, …
## $ cate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 3, 4, 4,…
## $ clate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_3_ranking_20 <int> 20, 3, 4, 7, 11, 1, 1, 7, 19, 15, 15, 13, 9,…
## $ clate_lambda_3_ranking_20 <int> 20, 2, 3, 8, 8, 2, 1, 7, 17, 14, 7, 14, 6, 1…
## $ cate_lambda_4 <dbl> 0.043268, 0.006968, 0.009275, 0.017188, 0.02…
## $ clate_lambda_4 <dbl> 0.152081, -0.022007, 0.010402, 0.074383, 0.0…
## $ cate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 3, 3, 4, 4,…
## $ clate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_4_ranking_20 <int> 20, 4, 4, 7, 12, 1, 1, 7, 19, 16, 16, 11, 10…
## $ clate_lambda_4_ranking_20 <int> 19, 2, 3, 8, 9, 2, 1, 7, 17, 14, 7, 14, 7, 1…
## [1] 0
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.732 -0.493 -0.355 0.542 2.049
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.467062 0.020308 23.00 <2e-16 ***
## clate_W 0.166911 0.037776 4.42 1e-05 ***
## X.gender_inp -0.104776 0.009937 -10.54 <2e-16 ***
## X.age_inp -0.000158 0.000388 -0.41 0.68
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 12090 894.72 <2e-16 ***
## Wu-Hausman 1 12089 8.91 0.0028 **
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.554 on 12090 degrees of freedom
## Multiple R-Squared: 0.000642, Adjusted R-squared: 0.000394
## Wald test: 37.1 on 3 and 12090 DF, p-value: <2e-16
##
## [1] "Results of cumulative analysis:"
## [1] "20th" "30th" "40th" "50th" "60th" "70th" "80th" "90th" "100th"
## [1] "Percentile Groups ranked by debt_neg_cw0_lambda_0"
## [1] "finished increasing"
## [1] "#####Running clate function.#####"
## ranking_rescale
## 10 20 30 40 50 60 70 80 90 100
## 1210 1210 1208 1210 1214 1204 1210 1209 1209 1210
## Rows: 2,420
## Columns: 68
## $ person_id <int> 8, 16, 23, 24, 96, 127, 140, 213, 224, 260, …
## $ cate_rankings_selected <int> 3, 4, 1, 1, 3, 3, 5, 1, 5, 3, 3, 4, 3, 3, 1,…
## $ clate_rankings_selected <int> 2, 3, 1, 1, 3, 4, 4, 1, 4, 3, 4, 3, 4, 3, 1,…
## $ X.numhh_list <int> 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 3,…
## $ X.gender_inp <int> 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0,…
## $ X.age_inp <int> 41, 39, 32, 34, 32, 25, 53, 61, 49, 37, 37, …
## $ X.hispanic_inp <int> 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0,…
## $ X.lessHS <int> 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1,…
## $ X.HSorGED <int> 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 0.0, 1187.6, 2257.6, 0.0, …
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 0.0, 1046.7, 2257.6, 0.0, …
## $ Y <int> 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1,…
## $ clate_W <int> 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1,…
## $ Z <int> 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1,…
## $ weights <dbl> 0.8975, 1.0000, 1.0033, 1.2018, 1.0000, 1.83…
## $ folds <int> 1, 10, 9, 9, 6, 2, 10, 5, 5, 9, 6, 5, 6, 6, …
## $ clate <dbl> 0.06980, 0.07944, 0.05165, 0.02140, 0.09227,…
## $ clate_se <dbl> 0.09180, 0.06904, 0.06055, 0.07712, 0.08061,…
## $ clate_ranking_5 <int> 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ clate_ranking_20 <int> 2, 3, 1, 1, 4, 5, 4, 1, 4, 3, 4, 3, 4, 3, 1,…
## $ cate_W <int> 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1,…
## $ cate <dbl> 0.021378, 0.023889, 0.010735, 0.007062, 0.02…
## $ cate_se <dbl> 0.014411, 0.014614, 0.013106, 0.015227, 0.01…
## $ cate_ranking_5 <int> 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,…
## $ cate_ranking_20 <int> 3, 4, 1, 1, 3, 4, 4, 1, 5, 3, 3, 4, 3, 3, 1,…
## $ cate_lambda_0 <dbl> 0.021378, 0.023889, 0.010735, 0.007062, 0.02…
## $ clate_lambda_0 <dbl> 0.06980, 0.07944, 0.05165, 0.02140, 0.09227,…
## $ cate_lambda_0_ranking_5 <int> 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1,…
## $ clate_lambda_0_ranking_5 <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ cate_lambda_0_ranking_20 <int> 3, 4, 1, 1, 3, 3, 5, 1, 5, 3, 3, 4, 3, 3, 1,…
## $ clate_lambda_0_ranking_20 <int> 2, 3, 1, 1, 3, 4, 4, 1, 4, 3, 4, 3, 4, 3, 1,…
## $ cate_lambda_1 <dbl> 0.017776, 0.020236, 0.007459, 0.003256, 0.01…
## $ clate_lambda_1 <dbl> 0.046846, 0.062183, 0.036516, 0.002123, 0.07…
## $ cate_lambda_1_ranking_5 <int> 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,…
## $ clate_lambda_1_ranking_5 <int> 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,…
## $ cate_lambda_1_ranking_20 <int> 3, 4, 1, 1, 3, 3, 4, 2, 6, 4, 2, 4, 2, 2, 1,…
## $ clate_lambda_1_ranking_20 <int> 2, 3, 1, 1, 3, 4, 4, 1, 5, 3, 4, 3, 4, 3, 1,…
## $ cate_lambda_2 <dbl> 1.417e-02, 1.658e-02, 4.182e-03, -5.513e-04,…
## $ clate_lambda_2 <dbl> 0.0238954, 0.0449228, 0.0213787, -0.0171568,…
## $ cate_lambda_2_ranking_5 <int> 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1,…
## $ clate_lambda_2_ranking_5 <int> 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1,…
## $ cate_lambda_2_ranking_20 <int> 3, 4, 1, 1, 3, 3, 4, 2, 6, 4, 2, 4, 2, 2, 1,…
## $ clate_lambda_2_ranking_20 <int> 2, 3, 2, 1, 3, 4, 5, 1, 6, 3, 5, 3, 4, 4, 1,…
## $ cate_lambda_3 <dbl> 0.0105705, 0.0129287, 0.0009059, -0.0043581,…
## $ clate_lambda_3 <dbl> 0.0009444, 0.0276625, 0.0062415, -0.0364368,…
## $ cate_lambda_3_ranking_5 <int> 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1,…
## $ clate_lambda_3_ranking_5 <int> 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1,…
## $ cate_lambda_3_ranking_20 <int> 3, 4, 1, 1, 4, 3, 4, 3, 7, 5, 2, 4, 2, 2, 1,…
## $ clate_lambda_3_ranking_20 <int> 2, 3, 2, 1, 4, 4, 5, 2, 6, 3, 5, 3, 4, 4, 2,…
## $ cate_lambda_4 <dbl> 0.0069679, 0.0092752, -0.0023705, -0.0081649…
## $ clate_lambda_4 <dbl> -0.022007, 0.010402, -0.008896, -0.055717, 0…
## $ cate_lambda_4_ranking_5 <int> 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1,…
## $ clate_lambda_4_ranking_5 <int> 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1,…
## $ cate_lambda_4_ranking_20 <int> 4, 4, 1, 1, 4, 3, 4, 3, 7, 5, 2, 4, 2, 2, 1,…
## $ clate_lambda_4_ranking_20 <int> 2, 3, 2, 1, 3, 4, 6, 2, 7, 4, 5, 3, 4, 4, 3,…
## [1] 0.2
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.714 -0.531 -0.379 0.519 1.447
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.554555 0.059982 9.25 < 2e-16 ***
## clate_W 0.090669 0.106746 0.85 0.40
## X.gender_inp -0.146847 0.025720 -5.71 1.3e-08 ***
## X.age_inp -0.000487 0.001091 -0.45 0.66
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 2416 113.71 <2e-16 ***
## Wu-Hausman 1 2415 0.81 0.37
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.558 on 2416 degrees of freedom
## Multiple R-Squared: 0.0107, Adjusted R-squared: 0.00948
## Wald test: 14.6 on 3 and 2416 DF, p-value: 1.95e-09
##
## Rows: 3,628
## Columns: 68
## $ person_id <int> 8, 16, 18, 23, 24, 29, 70, 92, 96, 127, 140,…
## $ cate_rankings_selected <int> 3, 4, 8, 1, 1, 6, 6, 8, 3, 3, 5, 6, 6, 1, 5,…
## $ clate_rankings_selected <int> 2, 3, 6, 1, 1, 6, 5, 6, 3, 4, 4, 6, 5, 1, 4,…
## $ X.numhh_list <int> 2, 2, 1, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1,…
## $ X.gender_inp <int> 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1,…
## $ X.age_inp <int> 41, 39, 51, 32, 34, 23, 62, 34, 32, 25, 53, …
## $ X.hispanic_inp <int> 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1,…
## $ X.lessHS <int> 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1,…
## $ X.charg_tot_pre_ed <dbl> 0, 1888, 1715, 0, 0, 5744, 1052, 0, 1188, 22…
## $ X.ed_charg_tot_pre_ed <dbl> 0, 1888, 1006, 0, 0, 4542, 1052, 0, 1047, 22…
## $ Y <int> 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0,…
## $ clate_W <int> 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0,…
## $ Z <int> 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0,…
## $ weights <dbl> 0.8975, 1.0000, 1.0000, 1.0033, 1.2018, 1.00…
## $ folds <int> 1, 10, 10, 9, 9, 4, 5, 5, 6, 2, 10, 2, 8, 5,…
## $ clate <dbl> 0.06980, 0.07944, 0.11580, 0.05165, 0.02140,…
## $ clate_se <dbl> 0.09180, 0.06904, 0.03534, 0.06055, 0.07712,…
## $ clate_ranking_5 <int> 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 1,…
## $ clate_ranking_20 <int> 2, 3, 6, 1, 1, 6, 4, 6, 4, 5, 4, 6, 5, 1, 4,…
## $ cate_W <int> 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0,…
## $ cate <dbl> 0.021378, 0.023889, 0.033656, 0.010735, 0.00…
## $ cate_se <dbl> 0.014411, 0.014614, 0.008905, 0.013106, 0.01…
## $ cate_ranking_5 <int> 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2,…
## $ cate_ranking_20 <int> 3, 4, 8, 1, 1, 6, 5, 7, 3, 4, 4, 6, 6, 1, 5,…
## $ cate_lambda_0 <dbl> 0.021378, 0.023889, 0.033656, 0.010735, 0.00…
## $ clate_lambda_0 <dbl> 0.06980, 0.07944, 0.11580, 0.05165, 0.02140,…
## $ cate_lambda_0_ranking_5 <int> 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 2,…
## $ clate_lambda_0_ranking_5 <int> 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 1,…
## $ cate_lambda_0_ranking_20 <int> 3, 4, 8, 1, 1, 6, 6, 8, 3, 3, 5, 6, 6, 1, 5,…
## $ clate_lambda_0_ranking_20 <int> 2, 3, 6, 1, 1, 6, 5, 6, 3, 4, 4, 6, 5, 1, 4,…
## $ cate_lambda_1 <dbl> 0.017776, 0.020236, 0.031430, 0.007459, 0.00…
## $ clate_lambda_1 <dbl> 0.046846, 0.062183, 0.106968, 0.036516, 0.00…
## $ cate_lambda_1_ranking_5 <int> 1, 1, 3, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2,…
## $ clate_lambda_1_ranking_5 <int> 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2,…
## $ cate_lambda_1_ranking_20 <int> 3, 4, 9, 1, 1, 6, 7, 8, 3, 3, 4, 6, 5, 2, 6,…
## $ clate_lambda_1_ranking_20 <int> 2, 3, 6, 1, 1, 6, 5, 6, 3, 4, 4, 6, 5, 1, 5,…
## $ cate_lambda_2 <dbl> 1.417e-02, 1.658e-02, 2.920e-02, 4.182e-03, …
## $ clate_lambda_2 <dbl> 0.023895, 0.044923, 0.098134, 0.021379, -0.0…
## $ cate_lambda_2_ranking_5 <int> 1, 1, 3, 1, 1, 2, 2, 3, 1, 1, 1, 2, 2, 1, 2,…
## $ clate_lambda_2_ranking_5 <int> 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2,…
## $ cate_lambda_2_ranking_20 <int> 3, 4, 10, 1, 1, 7, 8, 9, 3, 3, 4, 6, 5, 2, 6…
## $ clate_lambda_2_ranking_20 <int> 2, 3, 7, 2, 1, 6, 6, 6, 3, 4, 5, 5, 4, 1, 6,…
## $ cate_lambda_3 <dbl> 0.0105705, 0.0129287, 0.0269774, 0.0009059, …
## $ clate_lambda_3 <dbl> 0.0009444, 0.0276625, 0.0893001, 0.0062415, …
## $ cate_lambda_3_ranking_5 <int> 1, 1, 3, 1, 1, 2, 3, 3, 1, 1, 1, 2, 2, 1, 2,…
## $ clate_lambda_3_ranking_5 <int> 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2,…
## $ cate_lambda_3_ranking_20 <int> 3, 4, 11, 1, 1, 7, 9, 10, 4, 3, 4, 6, 5, 3, …
## $ clate_lambda_3_ranking_20 <int> 2, 3, 8, 2, 1, 7, 6, 6, 4, 4, 5, 5, 4, 2, 6,…
## $ cate_lambda_4 <dbl> 0.0069679, 0.0092752, 0.0247512, -0.0023705,…
## $ clate_lambda_4 <dbl> -0.022007, 0.010402, 0.080466, -0.008896, -0…
## $ cate_lambda_4_ranking_5 <int> 1, 1, 3, 1, 1, 2, 3, 3, 1, 1, 1, 2, 2, 1, 2,…
## $ clate_lambda_4_ranking_5 <int> 1, 1, 3, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2,…
## $ cate_lambda_4_ranking_20 <int> 4, 4, 12, 1, 1, 7, 10, 10, 4, 3, 4, 6, 5, 3,…
## $ clate_lambda_4_ranking_20 <int> 2, 3, 9, 2, 1, 7, 7, 6, 3, 4, 6, 6, 4, 2, 7,…
## [1] 0.3
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.752 -0.516 -0.355 0.526 1.953
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.518541 0.045975 11.28 < 2e-16 ***
## clate_W 0.159063 0.084448 1.88 0.06 .
## X.gender_inp -0.128535 0.020635 -6.23 5.2e-10 ***
## X.age_inp -0.000735 0.000846 -0.87 0.39
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 3624 179.44 <2e-16 ***
## Wu-Hausman 1 3623 2.68 0.1
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.563 on 3624 degrees of freedom
## Multiple R-Squared: -0.0028, Adjusted R-squared: -0.00363
## Wald test: 14.9 on 3 and 3624 DF, p-value: 1.2e-09
##
## Rows: 4,838
## Columns: 68
## $ person_id <int> 8, 16, 17, 18, 23, 24, 29, 70, 92, 96, 106, …
## $ cate_rankings_selected <int> 3, 4, 8, 8, 1, 1, 6, 6, 8, 3, 9, 6, 3, 5, 9,…
## $ clate_rankings_selected <int> 2, 3, 7, 6, 1, 1, 6, 5, 6, 3, 8, 8, 4, 4, 7,…
## $ X.numhh_list <int> 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1,…
## $ X.gender_inp <int> 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0,…
## $ X.age_inp <int> 41, 39, 52, 51, 32, 34, 23, 62, 34, 32, 33, …
## $ X.hispanic_inp <int> 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0,…
## $ X.race_white_inp <int> 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1,…
## $ X.lessHS <int> 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.HSorGED <int> 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 5743.9, …
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 4542.4, …
## $ Y <int> 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0,…
## $ clate_W <int> 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0,…
## $ Z <int> 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0,…
## $ weights <dbl> 0.8975, 1.0000, 1.2126, 1.0000, 1.0033, 1.20…
## $ folds <int> 1, 10, 3, 10, 9, 9, 4, 5, 5, 6, 9, 7, 2, 10,…
## $ clate <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ clate_se <dbl> 0.09180, 0.06904, 0.05327, 0.03534, 0.06055,…
## $ clate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 3, 2, 1, 2,…
## $ clate_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 4, 6, 4, 7, 9, 5, 4, 7,…
## $ cate_W <int> 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0,…
## $ cate <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ cate_se <dbl> 0.014411, 0.014614, 0.016439, 0.008905, 0.01…
## $ cate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 3, 2, 1, 1, 3,…
## $ cate_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 5, 7, 3, 9, 7, 4, 4, 9,…
## $ cate_lambda_0 <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ clate_lambda_0 <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ cate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 3, 2, 1, 2, 3,…
## $ clate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2,…
## $ cate_lambda_0_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 6, 8, 3, 9, 6, 3, 5, 9,…
## $ clate_lambda_0_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 5, 6, 3, 8, 8, 4, 4, 7,…
## $ cate_lambda_1 <dbl> 0.017776, 0.020236, 0.029518, 0.031430, 0.00…
## $ clate_lambda_1 <dbl> 0.046846, 0.062183, 0.114336, 0.106968, 0.03…
## $ cate_lambda_1_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 2, 2, 1, 3, 2, 1, 1, 3,…
## $ clate_lambda_1_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 2,…
## $ cate_lambda_1_ranking_20 <int> 3, 4, 8, 9, 1, 1, 6, 7, 8, 3, 9, 7, 3, 4, 10…
## $ clate_lambda_1_ranking_20 <int> 2, 3, 8, 6, 1, 1, 6, 5, 6, 3, 7, 8, 4, 4, 7,…
## $ cate_lambda_2 <dbl> 0.0141732, 0.0165822, 0.0254081, 0.0292035, …
## $ clate_lambda_2 <dbl> 0.02390, 0.04492, 0.10102, 0.09813, 0.02138,…
## $ cate_lambda_2_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 2, 3, 1, 3, 2, 1, 1, 3,…
## $ clate_lambda_2_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2,…
## $ cate_lambda_2_ranking_20 <int> 3, 4, 7, 10, 1, 1, 7, 8, 9, 3, 9, 7, 3, 4, 1…
## $ clate_lambda_2_ranking_20 <int> 2, 3, 8, 7, 2, 1, 6, 6, 6, 3, 7, 8, 4, 5, 7,…
## $ cate_lambda_3 <dbl> 0.0105705, 0.0129287, 0.0212983, 0.0269774, …
## $ clate_lambda_3 <dbl> 0.0009444, 0.0276625, 0.0877004, 0.0893001, …
## $ cate_lambda_3_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 3, 3, 1, 3, 2, 1, 1, 3,…
## $ clate_lambda_3_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 2,…
## $ cate_lambda_3_ranking_20 <int> 3, 4, 7, 11, 1, 1, 7, 9, 10, 4, 9, 8, 3, 4, …
## $ clate_lambda_3_ranking_20 <int> 2, 3, 8, 8, 2, 1, 7, 6, 6, 4, 6, 8, 4, 5, 7,…
## $ cate_lambda_4 <dbl> 0.0069679, 0.0092752, 0.0171884, 0.0247512, …
## $ clate_lambda_4 <dbl> -0.022007, 0.010402, 0.074383, 0.080466, -0.…
## $ cate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 3, 3, 1, 3, 2, 1, 1, 3,…
## $ clate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 2, 2, 1, 2, 3, 1, 2, 2,…
## $ cate_lambda_4_ranking_20 <int> 4, 4, 7, 12, 1, 1, 7, 10, 10, 4, 9, 8, 3, 4,…
## $ clate_lambda_4_ranking_20 <int> 2, 3, 8, 9, 2, 1, 7, 7, 6, 3, 6, 9, 4, 6, 7,…
## [1] 0.4
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.571 -0.475 -0.337 0.536 2.018
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.482741 0.036595 13.19 < 2e-16 ***
## clate_W 0.135554 0.067101 2.02 0.043 *
## X.gender_inp -0.134803 0.016939 -7.96 2.2e-15 ***
## X.age_inp -0.000292 0.000678 -0.43 0.667
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 4834 272.72 <2e-16 ***
## Wu-Hausman 1 4833 2.34 0.13
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.555 on 4834 degrees of freedom
## Multiple R-Squared: 0.00636, Adjusted R-squared: 0.00574
## Wald test: 23.6 on 3 and 4834 DF, p-value: 3.94e-15
##
## Rows: 6,052
## Columns: 68
## $ person_id <int> 8, 16, 17, 18, 23, 24, 29, 59, 70, 77, 92, 9…
## $ cate_rankings_selected <int> 3, 4, 8, 8, 1, 1, 6, 13, 6, 14, 8, 3, 9, 9, …
## $ clate_rankings_selected <int> 2, 3, 7, 6, 1, 1, 6, 10, 5, 10, 6, 3, 9, 8, …
## $ X.numhh_list <int> 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1,…
## $ X.gender_inp <int> 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1,…
## $ X.age_inp <int> 41, 39, 52, 51, 32, 34, 23, 38, 62, 35, 34, …
## $ X.hispanic_inp <int> 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.race_white_inp <int> 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0,…
## $ X.lessHS <int> 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 5743.9, …
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 4542.4, …
## $ Y <int> 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0,…
## $ clate_W <int> 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ Z <int> 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0,…
## $ weights <dbl> 0.8975, 1.0000, 1.2126, 1.0000, 1.0033, 1.20…
## $ folds <int> 1, 10, 3, 10, 9, 9, 4, 7, 5, 8, 5, 6, 2, 9, …
## $ clate <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ clate_se <dbl> 0.09180, 0.06904, 0.05327, 0.03534, 0.06055,…
## $ clate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 3, 1, 3, 2, 1, 3, 2, 3,…
## $ clate_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 11, 4, 10, 6, 4, 9, 7, …
## $ cate_W <int> 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0,…
## $ cate <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ cate_se <dbl> 0.014411, 0.014614, 0.016439, 0.008905, 0.01…
## $ cate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 4, 2, 4, 2, 1, 3, 3, 2,…
## $ cate_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 14, 5, 14, 7, 3, 10, 9,…
## $ cate_lambda_0 <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ clate_lambda_0 <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ cate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 4, 2, 4, 2, 1, 3, 3, 2,…
## $ clate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 3, 2, 3, 2, 1, 3, 2, 2,…
## $ cate_lambda_0_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 13, 6, 14, 8, 3, 9, 9, …
## $ clate_lambda_0_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 10, 5, 10, 6, 3, 9, 8, …
## $ cate_lambda_1 <dbl> 0.017776, 0.020236, 0.029518, 0.031430, 0.00…
## $ clate_lambda_1 <dbl> 0.046846, 0.062183, 0.114336, 0.106968, 0.03…
## $ cate_lambda_1_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 2, 4, 2, 1, 3, 3, 2,…
## $ clate_lambda_1_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 3, 2, 3, 2, 1, 3, 2, 2,…
## $ cate_lambda_1_ranking_20 <int> 3, 4, 8, 9, 1, 1, 6, 14, 7, 14, 8, 3, 10, 9,…
## $ clate_lambda_1_ranking_20 <int> 2, 3, 8, 6, 1, 1, 6, 9, 5, 9, 6, 3, 9, 7, 8,…
## $ cate_lambda_2 <dbl> 0.0141732, 0.0165822, 0.0254081, 0.0292035, …
## $ clate_lambda_2 <dbl> 0.02390, 0.04492, 0.10102, 0.09813, 0.02138,…
## $ cate_lambda_2_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 2, 4, 3, 1, 3, 3, 2,…
## $ clate_lambda_2_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 3, 2, 2,…
## $ cate_lambda_2_ranking_20 <int> 3, 4, 7, 10, 1, 1, 7, 15, 8, 13, 9, 3, 12, 9…
## $ clate_lambda_2_ranking_20 <int> 2, 3, 8, 7, 2, 1, 6, 8, 6, 8, 6, 3, 9, 7, 8,…
## $ cate_lambda_3 <dbl> 0.0105705, 0.0129287, 0.0212983, 0.0269774, …
## $ clate_lambda_3 <dbl> 0.0009444, 0.0276625, 0.0877004, 0.0893001, …
## $ cate_lambda_3_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 3, 4, 3, 1, 4, 3, 2,…
## $ clate_lambda_3_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 2, 1, 3, 2, 2,…
## $ cate_lambda_3_ranking_20 <int> 3, 4, 7, 11, 1, 1, 7, 15, 9, 13, 10, 4, 13, …
## $ clate_lambda_3_ranking_20 <int> 2, 3, 8, 8, 2, 1, 7, 7, 6, 8, 6, 4, 10, 6, 8…
## $ cate_lambda_4 <dbl> 0.006968, 0.009275, 0.017188, 0.024751, -0.0…
## $ clate_lambda_4 <dbl> -0.022007, 0.010402, 0.074383, 0.080466, -0.…
## $ cate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 3, 4, 3, 1, 4, 3, 2,…
## $ clate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 2, 2, 2, 2, 1, 3, 2, 3,…
## $ cate_lambda_4_ranking_20 <int> 4, 4, 7, 12, 1, 1, 7, 16, 10, 13, 10, 4, 14,…
## $ clate_lambda_4_ranking_20 <int> 2, 3, 8, 9, 2, 1, 7, 7, 7, 7, 6, 3, 10, 6, 9…
## [1] 0.5
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.597 -0.474 -0.318 0.561 2.068
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.41e-01 3.13e-02 14.08 < 2e-16 ***
## clate_W 1.66e-01 5.80e-02 2.85 0.0043 **
## X.gender_inp -1.21e-01 1.50e-02 -8.07 8.3e-16 ***
## X.age_inp -5.54e-05 5.90e-04 -0.09 0.9251
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 6048 359.96 <2e-16 ***
## Wu-Hausman 1 6047 3.95 0.047 *
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.553 on 6048 degrees of freedom
## Multiple R-Squared: 0.00162, Adjusted R-squared: 0.00113
## Wald test: 22.6 on 3 and 6048 DF, p-value: 1.42e-14
##
## Rows: 7,256
## Columns: 68
## $ person_id <int> 8, 16, 17, 18, 23, 24, 29, 59, 70, 77, 89, 9…
## $ cate_rankings_selected <int> 3, 4, 8, 8, 1, 1, 6, 13, 6, 14, 13, 8, 3, 9,…
## $ clate_rankings_selected <int> 2, 3, 7, 6, 1, 1, 6, 10, 5, 10, 11, 6, 3, 9,…
## $ X.numhh_list <int> 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1,…
## $ X.gender_inp <int> 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1,…
## $ X.age_inp <int> 41, 39, 52, 51, 32, 34, 23, 38, 62, 35, 39, …
## $ X.hispanic_inp <int> 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0,…
## $ X.race_white_inp <int> 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0,…
## $ X.ast_dx_pre_lottery <int> 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1,…
## $ X.lessHS <int> 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 5743.9, …
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 4542.4, …
## $ Y <int> 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1,…
## $ clate_W <int> 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,…
## $ Z <int> 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0,…
## $ weights <dbl> 0.8975, 1.0000, 1.2126, 1.0000, 1.0033, 1.20…
## $ folds <int> 1, 10, 3, 10, 9, 9, 4, 7, 5, 8, 7, 5, 6, 2, …
## $ clate <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ clate_se <dbl> 0.09180, 0.06904, 0.05327, 0.03534, 0.06055,…
## $ clate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 3, 1, 3, 3, 2, 1, 3, 2,…
## $ clate_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 11, 4, 10, 11, 6, 4, 9,…
## $ cate_W <int> 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0,…
## $ cate <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ cate_se <dbl> 0.014411, 0.014614, 0.016439, 0.008905, 0.01…
## $ cate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 4, 2, 4, 4, 2, 1, 3, 3,…
## $ cate_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 14, 5, 14, 13, 7, 3, 10…
## $ cate_lambda_0 <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ clate_lambda_0 <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ cate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 4, 2, 4, 4, 2, 1, 3, 3,…
## $ clate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 3, 2, 3, 3, 2, 1, 3, 2,…
## $ cate_lambda_0_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 13, 6, 14, 13, 8, 3, 9,…
## $ clate_lambda_0_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 10, 5, 10, 11, 6, 3, 9,…
## $ cate_lambda_1 <dbl> 0.017776, 0.020236, 0.029518, 0.031430, 0.00…
## $ clate_lambda_1 <dbl> 0.046846, 0.062183, 0.114336, 0.106968, 0.03…
## $ cate_lambda_1_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 2, 4, 3, 2, 1, 3, 3,…
## $ clate_lambda_1_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 3, 2, 3, 3, 2, 1, 3, 2,…
## $ cate_lambda_1_ranking_20 <int> 3, 4, 8, 9, 1, 1, 6, 14, 7, 14, 12, 8, 3, 10…
## $ clate_lambda_1_ranking_20 <int> 2, 3, 8, 6, 1, 1, 6, 9, 5, 9, 11, 6, 3, 9, 7…
## $ cate_lambda_2 <dbl> 0.0141732, 0.0165822, 0.0254081, 0.0292035, …
## $ clate_lambda_2 <dbl> 0.02390, 0.04492, 0.10102, 0.09813, 0.02138,…
## $ cate_lambda_2_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 2, 4, 3, 3, 1, 3, 3,…
## $ clate_lambda_2_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 3, 2, 1, 3, 2,…
## $ cate_lambda_2_ranking_20 <int> 3, 4, 7, 10, 1, 1, 7, 15, 8, 13, 12, 9, 3, 1…
## $ clate_lambda_2_ranking_20 <int> 2, 3, 8, 7, 2, 1, 6, 8, 6, 8, 11, 6, 3, 9, 7…
## $ cate_lambda_3 <dbl> 0.0105705, 0.0129287, 0.0212983, 0.0269774, …
## $ clate_lambda_3 <dbl> 0.0009444, 0.0276625, 0.0877004, 0.0893001, …
## $ cate_lambda_3_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 3, 4, 3, 3, 1, 4, 3,…
## $ clate_lambda_3_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 3, 2, 1, 3, 2,…
## $ cate_lambda_3_ranking_20 <int> 3, 4, 7, 11, 1, 1, 7, 15, 9, 13, 12, 10, 4, …
## $ clate_lambda_3_ranking_20 <int> 2, 3, 8, 8, 2, 1, 7, 7, 6, 8, 11, 6, 4, 10, …
## $ cate_lambda_4 <dbl> 0.006968, 0.009275, 0.017188, 0.024751, -0.0…
## $ clate_lambda_4 <dbl> -0.022007, 0.010402, 0.074383, 0.080466, -0.…
## $ cate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 3, 4, 3, 3, 1, 4, 3,…
## $ clate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 2, 2, 2, 3, 2, 1, 3, 2,…
## $ cate_lambda_4_ranking_20 <int> 4, 4, 7, 12, 1, 1, 7, 16, 10, 13, 12, 10, 4,…
## $ clate_lambda_4_ranking_20 <int> 2, 3, 8, 9, 2, 1, 7, 7, 7, 7, 11, 6, 3, 10, …
## [1] 0.6
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.569 -0.475 -0.328 0.556 2.141
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.48e-01 2.79e-02 16.03 <2e-16 ***
## clate_W 1.47e-01 5.09e-02 2.89 0.0038 **
## X.gender_inp -1.17e-01 1.33e-02 -8.82 <2e-16 ***
## X.age_inp -8.32e-05 5.31e-04 -0.16 0.8754
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 7252 472.90 <2e-16 ***
## Wu-Hausman 1 7251 2.97 0.085 .
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.552 on 7252 degrees of freedom
## Multiple R-Squared: 0.00708, Adjusted R-squared: 0.00667
## Wald test: 26.8 on 3 and 7252 DF, p-value: <2e-16
##
## Rows: 8,466
## Columns: 68
## $ person_id <int> 8, 16, 17, 18, 23, 24, 29, 59, 68, 70, 76, 7…
## $ cate_rankings_selected <int> 3, 4, 8, 8, 1, 1, 6, 13, 17, 6, 17, 14, 10, …
## $ clate_rankings_selected <int> 2, 3, 7, 6, 1, 1, 6, 10, 14, 5, 13, 10, 14, …
## $ X.numhh_list <int> 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0,…
## $ X.age_inp <int> 41, 39, 52, 51, 32, 34, 23, 38, 25, 62, 60, …
## $ X.hispanic_inp <int> 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.race_white_inp <int> 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0,…
## $ X.lessHS <int> 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.HSorGED <int> 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 5743.9, …
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 4542.4, …
## $ Y <int> 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1,…
## $ clate_W <int> 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0,…
## $ Z <int> 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1,…
## $ weights <dbl> 0.8975, 1.0000, 1.2126, 1.0000, 1.0033, 1.20…
## $ folds <int> 1, 10, 3, 10, 9, 9, 4, 7, 6, 5, 7, 8, 10, 7,…
## $ clate <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ clate_se <dbl> 0.09180, 0.06904, 0.05327, 0.03534, 0.06055,…
## $ clate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 3, 4, 1, 4, 3, 4, 3, 2,…
## $ clate_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 11, 14, 4, 13, 10, 14, …
## $ cate_W <int> 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1,…
## $ cate <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ cate_se <dbl> 0.014411, 0.014614, 0.016439, 0.008905, 0.01…
## $ cate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 4, 5, 2, 5, 4, 3, 4, 2,…
## $ cate_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 14, 17, 5, 17, 14, 10, …
## $ cate_lambda_0 <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ clate_lambda_0 <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ cate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 4, 5, 2, 5, 4, 3, 4, 2,…
## $ clate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 3, 4, 2, 4, 3, 4, 3, 2,…
## $ cate_lambda_0_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 13, 17, 6, 17, 14, 10, …
## $ clate_lambda_0_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 10, 14, 5, 13, 10, 14, …
## $ cate_lambda_1 <dbl> 0.017776, 0.020236, 0.029518, 0.031430, 0.00…
## $ clate_lambda_1 <dbl> 0.046846, 0.062183, 0.114336, 0.106968, 0.03…
## $ cate_lambda_1_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 4, 2, 5, 4, 3, 3, 2,…
## $ clate_lambda_1_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 3, 4, 2, 4, 3, 4, 3, 2,…
## $ cate_lambda_1_ranking_20 <int> 3, 4, 8, 9, 1, 1, 6, 14, 16, 7, 17, 14, 11, …
## $ clate_lambda_1_ranking_20 <int> 2, 3, 8, 6, 1, 1, 6, 9, 14, 5, 14, 9, 13, 11…
## $ cate_lambda_2 <dbl> 0.0141732, 0.0165822, 0.0254081, 0.0292035, …
## $ clate_lambda_2 <dbl> 0.02390, 0.04492, 0.10102, 0.09813, 0.02138,…
## $ cate_lambda_2_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 4, 2, 4, 4, 3, 3, 3,…
## $ clate_lambda_2_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 4, 2, 4, 2, 4, 3, 2,…
## $ cate_lambda_2_ranking_20 <int> 3, 4, 7, 10, 1, 1, 7, 15, 15, 8, 16, 13, 12,…
## $ clate_lambda_2_ranking_20 <int> 2, 3, 8, 7, 2, 1, 6, 8, 14, 6, 14, 8, 13, 11…
## $ cate_lambda_3 <dbl> 0.0105705, 0.0129287, 0.0212983, 0.0269774, …
## $ clate_lambda_3 <dbl> 0.0009444, 0.0276625, 0.0877004, 0.0893001, …
## $ cate_lambda_3_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 4, 3, 4, 4, 4, 3, 3,…
## $ clate_lambda_3_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 2, 4, 2, 4, 2, 3, 3, 2,…
## $ cate_lambda_3_ranking_20 <int> 3, 4, 7, 11, 1, 1, 7, 15, 13, 9, 16, 13, 14,…
## $ clate_lambda_3_ranking_20 <int> 2, 3, 8, 8, 2, 1, 7, 7, 14, 6, 15, 8, 12, 11…
## $ cate_lambda_4 <dbl> 0.006968, 0.009275, 0.017188, 0.024751, -0.0…
## $ clate_lambda_4 <dbl> -0.022007, 0.010402, 0.074383, 0.080466, -0.…
## $ cate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 3, 3, 4, 4, 4, 3, 3,…
## $ clate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 2, 4, 2, 4, 2, 3, 3, 2,…
## $ cate_lambda_4_ranking_20 <int> 4, 4, 7, 12, 1, 1, 7, 16, 11, 10, 15, 13, 15…
## $ clate_lambda_4_ranking_20 <int> 2, 3, 8, 9, 2, 1, 7, 7, 14, 7, 16, 7, 11, 11…
## [1] 0.7
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.617 -0.483 -0.322 0.551 2.158
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.461343 0.025264 18.26 < 2e-16 ***
## clate_W 0.164491 0.046669 3.52 0.00043 ***
## X.gender_inp -0.129456 0.012060 -10.73 < 2e-16 ***
## X.age_inp -0.000255 0.000484 -0.53 0.59895
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 8462 568.72 <2e-16 ***
## Wu-Hausman 1 8461 5.23 0.022 *
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.552 on 8462 degrees of freedom
## Multiple R-Squared: 0.00658, Adjusted R-squared: 0.00623
## Wald test: 39.3 on 3 and 8462 DF, p-value: <2e-16
##
## Rows: 9,675
## Columns: 68
## $ person_id <int> 8, 16, 17, 18, 23, 24, 29, 57, 59, 68, 70, 7…
## $ cate_rankings_selected <int> 3, 4, 8, 8, 1, 1, 6, 12, 13, 17, 6, 17, 14, …
## $ clate_rankings_selected <int> 2, 3, 7, 6, 1, 1, 6, 15, 10, 14, 5, 13, 10, …
## $ X.numhh_list <int> 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2,…
## $ X.gender_inp <int> 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1,…
## $ X.age_inp <int> 41, 39, 52, 51, 32, 34, 23, 46, 38, 25, 62, …
## $ X.hispanic_inp <int> 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1,…
## $ X.race_white_inp <int> 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0,…
## $ X.race_black_inp <int> 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1,…
## $ X.lessHS <int> 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0,…
## $ X.HSorGED <int> 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 5743.9, …
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 4542.4, …
## $ Y <int> 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0,…
## $ clate_W <int> 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0,…
## $ Z <int> 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0,…
## $ weights <dbl> 0.8975, 1.0000, 1.2126, 1.0000, 1.0033, 1.20…
## $ folds <int> 1, 10, 3, 10, 9, 9, 4, 10, 7, 6, 5, 7, 8, 10…
## $ clate <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ clate_se <dbl> 0.09180, 0.06904, 0.05327, 0.03534, 0.06055,…
## $ clate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 4, 3, 4, 1, 4, 3, 4, 4,…
## $ clate_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 15, 11, 14, 4, 13, 10, …
## $ cate_W <int> 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0,…
## $ cate <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ cate_se <dbl> 0.014411, 0.014614, 0.016439, 0.008905, 0.01…
## $ cate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 3, 4, 5, 2, 5, 4, 3, 3,…
## $ cate_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 12, 14, 17, 5, 17, 14, …
## $ cate_lambda_0 <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ clate_lambda_0 <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ cate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 3, 4, 5, 2, 5, 4, 3, 3,…
## $ clate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 4, 3, 4, 2, 4, 3, 4, 4,…
## $ cate_lambda_0_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 12, 13, 17, 6, 17, 14, …
## $ clate_lambda_0_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 15, 10, 14, 5, 13, 10, …
## $ cate_lambda_1 <dbl> 0.017776, 0.020236, 0.029518, 0.031430, 0.00…
## $ clate_lambda_1 <dbl> 0.046846, 0.062183, 0.114336, 0.106968, 0.03…
## $ cate_lambda_1_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 4, 4, 2, 5, 4, 3, 3,…
## $ clate_lambda_1_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 4, 3, 4, 2, 4, 3, 4, 4,…
## $ cate_lambda_1_ranking_20 <int> 3, 4, 8, 9, 1, 1, 6, 13, 14, 16, 7, 17, 14, …
## $ clate_lambda_1_ranking_20 <int> 2, 3, 8, 6, 1, 1, 6, 15, 9, 14, 5, 14, 9, 13…
## $ cate_lambda_2 <dbl> 0.0141732, 0.0165822, 0.0254081, 0.0292035, …
## $ clate_lambda_2 <dbl> 0.02390, 0.04492, 0.10102, 0.09813, 0.02138,…
## $ cate_lambda_2_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 4, 4, 2, 4, 4, 3, 3,…
## $ clate_lambda_2_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 4, 2, 4, 2, 4, 2, 4, 3,…
## $ cate_lambda_2_ranking_20 <int> 3, 4, 7, 10, 1, 1, 7, 14, 15, 15, 8, 16, 13,…
## $ clate_lambda_2_ranking_20 <int> 2, 3, 8, 7, 2, 1, 6, 15, 8, 14, 6, 14, 8, 13…
## $ cate_lambda_3 <dbl> 0.0105705, 0.0129287, 0.0212983, 0.0269774, …
## $ clate_lambda_3 <dbl> 0.0009444, 0.0276625, 0.0877004, 0.0893001, …
## $ cate_lambda_3_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 4, 4, 3, 4, 4, 4, 3,…
## $ clate_lambda_3_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 4, 2, 4, 2, 4, 2, 3, 3,…
## $ cate_lambda_3_ranking_20 <int> 3, 4, 7, 11, 1, 1, 7, 15, 15, 13, 9, 16, 13,…
## $ clate_lambda_3_ranking_20 <int> 2, 3, 8, 8, 2, 1, 7, 14, 7, 14, 6, 15, 8, 12…
## $ cate_lambda_4 <dbl> 0.006968, 0.009275, 0.017188, 0.024751, -0.0…
## $ clate_lambda_4 <dbl> -0.022007, 0.010402, 0.074383, 0.080466, -0.…
## $ cate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 4, 3, 3, 4, 4, 4, 3,…
## $ clate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 4, 2, 4, 2, 4, 2, 3, 2,…
## $ cate_lambda_4_ranking_20 <int> 4, 4, 7, 12, 1, 1, 7, 16, 16, 11, 10, 15, 13…
## $ clate_lambda_4_ranking_20 <int> 2, 3, 8, 9, 2, 1, 7, 14, 7, 14, 7, 16, 7, 11…
## [1] 0.8
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.709 -0.482 -0.321 0.552 2.159
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.457884 0.023171 19.76 < 2e-16 ***
## clate_W 0.193390 0.042997 4.50 6.9e-06 ***
## X.gender_inp -0.127966 0.011155 -11.47 < 2e-16 ***
## X.age_inp -0.000213 0.000447 -0.48 0.63
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 9671 683.5 <2e-16 ***
## Wu-Hausman 1 9670 10.6 0.0011 **
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.554 on 9671 degrees of freedom
## Multiple R-Squared: -0.000795, Adjusted R-squared: -0.00111
## Wald test: 44 on 3 and 9671 DF, p-value: <2e-16
##
## Rows: 10,884
## Columns: 68
## $ person_id <int> 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68, 7…
## $ cate_rankings_selected <int> 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, 17, …
## $ clate_rankings_selected <int> 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, 13, …
## $ X.numhh_list <int> 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1,…
## $ X.age_inp <int> 41, 39, 52, 51, 32, 34, 23, 43, 46, 38, 25, …
## $ X.hispanic_inp <int> 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1,…
## $ X.race_white_inp <int> 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0,…
## $ X.race_black_inp <int> 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1,…
## $ X.lessHS <int> 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1,…
## $ X.HSorGED <int> 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 5743.9, …
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 4542.4, …
## $ Y <int> 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0,…
## $ clate_W <int> 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1,…
## $ Z <int> 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0,…
## $ weights <dbl> 0.8975, 1.0000, 1.2126, 1.0000, 1.0033, 1.20…
## $ folds <int> 1, 10, 3, 10, 9, 9, 4, 4, 10, 7, 6, 5, 7, 8,…
## $ clate <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ clate_se <dbl> 0.09180, 0.06904, 0.05327, 0.03534, 0.06055,…
## $ clate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 1, 4, 3, 4,…
## $ clate_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 18, 15, 11, 14, 4, 13, …
## $ cate_W <int> 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0,…
## $ cate <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ cate_se <dbl> 0.014411, 0.014614, 0.016439, 0.008905, 0.01…
## $ cate_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4, 3,…
## $ cate_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 19, 12, 14, 17, 5, 17, …
## $ cate_lambda_0 <dbl> 0.021378, 0.023889, 0.033628, 0.033656, 0.01…
## $ clate_lambda_0 <dbl> 0.06980, 0.07944, 0.12765, 0.11580, 0.05165,…
## $ cate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4, 3,…
## $ clate_lambda_0_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3, 4,…
## $ cate_lambda_0_ranking_20 <int> 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, 17, …
## $ clate_lambda_0_ranking_20 <int> 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, 13, …
## $ cate_lambda_1 <dbl> 0.017776, 0.020236, 0.029518, 0.031430, 0.00…
## $ clate_lambda_1 <dbl> 0.046846, 0.062183, 0.114336, 0.106968, 0.03…
## $ cate_lambda_1_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 5, 4, 3,…
## $ clate_lambda_1_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3, 4,…
## $ cate_lambda_1_ranking_20 <int> 3, 4, 8, 9, 1, 1, 6, 19, 13, 14, 16, 7, 17, …
## $ clate_lambda_1_ranking_20 <int> 2, 3, 8, 6, 1, 1, 6, 17, 15, 9, 14, 5, 14, 9…
## $ cate_lambda_2 <dbl> 0.0141732, 0.0165822, 0.0254081, 0.0292035, …
## $ clate_lambda_2 <dbl> 0.02390, 0.04492, 0.10102, 0.09813, 0.02138,…
## $ cate_lambda_2_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 4, 4, 3,…
## $ clate_lambda_2_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2, 4,…
## $ cate_lambda_2_ranking_20 <int> 3, 4, 7, 10, 1, 1, 7, 19, 14, 15, 15, 8, 16,…
## $ clate_lambda_2_ranking_20 <int> 2, 3, 8, 7, 2, 1, 6, 17, 15, 8, 14, 6, 14, 8…
## $ cate_lambda_3 <dbl> 0.0105705, 0.0129287, 0.0212983, 0.0269774, …
## $ clate_lambda_3 <dbl> 0.0009444, 0.0276625, 0.0877004, 0.0893001, …
## $ cate_lambda_3_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 3, 4, 4, 4,…
## $ clate_lambda_3_ranking_5 <int> 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2, 3,…
## $ cate_lambda_3_ranking_20 <int> 3, 4, 7, 11, 1, 1, 7, 19, 15, 15, 13, 9, 16,…
## $ clate_lambda_3_ranking_20 <int> 2, 3, 8, 8, 2, 1, 7, 17, 14, 7, 14, 6, 15, 8…
## $ cate_lambda_4 <dbl> 0.006968, 0.009275, 0.017188, 0.024751, -0.0…
## $ clate_lambda_4 <dbl> -0.022007, 0.010402, 0.074383, 0.080466, -0.…
## $ cate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 3, 3, 4, 4, 4,…
## $ clate_lambda_4_ranking_5 <int> 1, 1, 2, 3, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2, 3,…
## $ cate_lambda_4_ranking_20 <int> 4, 4, 7, 12, 1, 1, 7, 19, 16, 16, 11, 10, 15…
## $ clate_lambda_4_ranking_20 <int> 2, 3, 8, 9, 2, 1, 7, 17, 14, 7, 14, 7, 16, 7…
## [1] 0.9
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.715 -0.484 -0.333 0.549 2.124
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.51e-01 2.15e-02 20.96 < 2e-16 ***
## clate_W 1.87e-01 4.05e-02 4.63 3.7e-06 ***
## X.gender_inp -1.19e-01 1.05e-02 -11.32 < 2e-16 ***
## X.age_inp 2.33e-06 4.16e-04 0.01 1
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 10880 772.7 <2e-16 ***
## Wu-Hausman 1 10879 10.6 0.0011 **
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.554 on 10880 degrees of freedom
## Multiple R-Squared: -0.00062, Adjusted R-squared: -0.000896
## Wald test: 42.7 on 3 and 10880 DF, p-value: <2e-16
##
## Rows: 12,094
## Columns: 68
## $ person_id <int> 5, 8, 16, 17, 18, 23, 24, 29, 47, 57, 59, 68…
## $ cate_rankings_selected <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_rankings_selected <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ X.numhh_list <int> 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,…
## $ X.gender_inp <int> 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0,…
## $ X.age_inp <int> 60, 41, 39, 52, 51, 32, 34, 23, 43, 46, 38, …
## $ X.hispanic_inp <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.race_white_inp <int> 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,…
## $ X.race_black_inp <int> 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,…
## $ X.race_nwother_inp <int> 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ast_dx_pre_lottery <int> 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0,…
## $ X.dia_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.hbp_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0,…
## $ X.chl_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.ami_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.chf_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.emp_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.kid_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ X.cancer_dx_pre_lottery <int> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,…
## $ X.dep_dx_pre_lottery <int> 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1,…
## $ X.lessHS <int> 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,…
## $ X.HSorGED <int> 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0,…
## $ X.charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1715.3, 0.0, 0.0, 574…
## $ X.ed_charg_tot_pre_ed <dbl> 0.0, 0.0, 1888.2, 0.0, 1006.3, 0.0, 0.0, 454…
## $ Y <int> 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1,…
## $ clate_W <int> 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0,…
## $ Z <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ weights <dbl> 1.1504, 0.8975, 1.0000, 1.2126, 1.0000, 1.00…
## $ folds <int> 8, 1, 10, 3, 10, 9, 9, 4, 4, 10, 7, 6, 5, 7,…
## $ clate <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ clate_se <dbl> 0.06976, 0.09180, 0.06904, 0.05327, 0.03534,…
## $ clate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 1, 4, 3,…
## $ clate_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 18, 15, 11, 14, 4, …
## $ cate_W <int> 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0,…
## $ cate <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ cate_se <dbl> 0.007787, 0.014411, 0.014614, 0.016439, 0.00…
## $ cate_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ cate_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 14, 17, 5, …
## $ cate_lambda_0 <dbl> 0.051056, 0.021378, 0.023889, 0.033628, 0.03…
## $ clate_lambda_0 <dbl> 0.22184, 0.06980, 0.07944, 0.12765, 0.11580,…
## $ cate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 3, 4, 5, 2, 5, 4,…
## $ clate_lambda_0_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_0_ranking_20 <int> 20, 3, 4, 8, 8, 1, 1, 6, 19, 12, 13, 17, 6, …
## $ clate_lambda_0_ranking_20 <int> 20, 2, 3, 7, 6, 1, 1, 6, 17, 15, 10, 14, 5, …
## $ cate_lambda_1 <dbl> 0.049109, 0.017776, 0.020236, 0.029518, 0.03…
## $ clate_lambda_1 <dbl> 0.204401, 0.046846, 0.062183, 0.114336, 0.10…
## $ cate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 5, 4,…
## $ clate_lambda_1_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 3, 4, 2, 4, 3,…
## $ cate_lambda_1_ranking_20 <int> 20, 3, 4, 8, 9, 1, 1, 6, 19, 13, 14, 16, 7, …
## $ clate_lambda_1_ranking_20 <int> 20, 2, 3, 8, 6, 1, 1, 6, 17, 15, 9, 14, 5, 1…
## $ cate_lambda_2 <dbl> 0.0471620, 0.0141732, 0.0165822, 0.0254081, …
## $ clate_lambda_2 <dbl> 0.18696, 0.02390, 0.04492, 0.10102, 0.09813,…
## $ cate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 2, 4, 4,…
## $ clate_lambda_2_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_2_ranking_20 <int> 20, 3, 4, 7, 10, 1, 1, 7, 19, 14, 15, 15, 8,…
## $ clate_lambda_2_ranking_20 <int> 20, 2, 3, 8, 7, 2, 1, 6, 17, 15, 8, 14, 6, 1…
## $ cate_lambda_3 <dbl> 0.0452152, 0.0105705, 0.0129287, 0.0212983, …
## $ clate_lambda_3 <dbl> 0.1695211, 0.0009444, 0.0276625, 0.0877004, …
## $ cate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 4, 3, 4, 4,…
## $ clate_lambda_3_ranking_5 <int> 5, 1, 1, 2, 2, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_3_ranking_20 <int> 20, 3, 4, 7, 11, 1, 1, 7, 19, 15, 15, 13, 9,…
## $ clate_lambda_3_ranking_20 <int> 20, 2, 3, 8, 8, 2, 1, 7, 17, 14, 7, 14, 6, 1…
## $ cate_lambda_4 <dbl> 0.043268, 0.006968, 0.009275, 0.017188, 0.02…
## $ clate_lambda_4 <dbl> 0.152081, -0.022007, 0.010402, 0.074383, 0.0…
## $ cate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 4, 3, 3, 4, 4,…
## $ clate_lambda_4_ranking_5 <int> 5, 1, 1, 2, 3, 1, 1, 2, 5, 4, 2, 4, 2, 4, 2,…
## $ cate_lambda_4_ranking_20 <int> 20, 4, 4, 7, 12, 1, 1, 7, 19, 16, 16, 11, 10…
## $ clate_lambda_4_ranking_20 <int> 19, 2, 3, 8, 9, 2, 1, 7, 17, 14, 7, 14, 7, 1…
## [1] 1
## [1] "Y ~ clate_W + X.gender_inp + X.age_inp | Z + X.gender_inp + X.age_inp"
##
## Call:
## ivreg(formula = as.formula(formula_str), data = data_subset,
## weights = weights)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.732 -0.493 -0.355 0.542 2.049
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.467062 0.020308 23.00 <2e-16 ***
## clate_W 0.166911 0.037776 4.42 1e-05 ***
## X.gender_inp -0.104776 0.009937 -10.54 <2e-16 ***
## X.age_inp -0.000158 0.000388 -0.41 0.68
##
## Diagnostic tests:
## df1 df2 statistic p-value
## Weak instruments 1 12090 894.72 <2e-16 ***
## Wu-Hausman 1 12089 8.91 0.0028 **
## Sargan 0 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.554 on 12090 degrees of freedom
## Multiple R-Squared: 0.000642, Adjusted R-squared: 0.000394
## Wald test: 37.1 on 3 and 12090 DF, p-value: <2e-16
##
## [1] "Results of cumulative analysis:"
## [1] "20th" "30th" "40th" "50th" "60th" "70th" "80th" "90th" "100th"
## [1] "Percentile Groups ranked by debt_neg_cw0_lambda_0"
## [1] "finished decreasing"
