Skip to content

Commit 11047b7

Browse files
committed
report oldest child age and type of schooling less frequently
1 parent 1143b25 commit 11047b7

File tree

2 files changed

+13
-32
lines changed

2 files changed

+13
-32
lines changed

facebook/delphiFacebook/R/binary.R

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,6 @@ get_binary_indicators <- function() {
324324
"smoothed_winperson_school_parttime_oldest", "weight", "s_inperson_school_parttime_oldest", 6, compute_binary_response, jeffreys_multinomial_factory(3),
325325
"smoothed_wremote_school_fulltime_oldest", "weight", "s_remote_school_fulltime_oldest", 6, compute_binary_response, jeffreys_multinomial_factory(3),
326326

327-
"smoothed_wchild_school_public", "weight", "s_child_school_public", 6, compute_binary_response, jeffreys_multinomial_factory(5),
328-
"smoothed_wchild_school_private", "weight", "s_child_school_private", 6, compute_binary_response, jeffreys_multinomial_factory(5),
329-
"smoothed_wchild_school_homeschool", "weight", "s_child_school_homeschool", 6, compute_binary_response, jeffreys_multinomial_factory(5),
330-
"smoothed_wchild_school_not", "weight", "s_child_school_not", 6, compute_binary_response, jeffreys_multinomial_factory(5),
331-
"smoothed_wchild_school_other", "weight", "s_child_school_other", 6, compute_binary_response, jeffreys_multinomial_factory(5),
332-
333327
"smoothed_wschool_safety_measures_mask_students", "weight", "s_school_safety_measures_mask_students", 6, compute_binary_response, jeffreys_binary,
334328
"smoothed_wschool_safety_measures_mask_teachers", "weight", "s_school_safety_measures_mask_teachers", 6, compute_binary_response, jeffreys_binary,
335329
"smoothed_wschool_safety_measures_restricted_entry", "weight", "s_school_safety_measures_restricted_entry", 6, compute_binary_response, jeffreys_binary,
@@ -403,15 +397,7 @@ get_binary_indicators <- function() {
403397
"smoothed_want_info_employment", "weight_unif", "i_want_info_employment", 6, compute_binary_response, jeffreys_binary,
404398
"smoothed_wwant_info_employment", "weight", "i_want_info_employment", 6, compute_binary_response, jeffreys_binary,
405399
"smoothed_want_info_none", "weight_unif", "i_want_info_none", 6, compute_binary_response, jeffreys_binary,
406-
"smoothed_wwant_info_none", "weight", "i_want_info_none", 6, compute_binary_response, jeffreys_binary,
407-
408-
# misc children
409-
"smoothed_whas_child_under_18", "weight", "ch_has_child_under_18", 6, compute_binary_response, jeffreys_binary,
410-
411-
"smoothed_woldest_child_under_5", "weight", "ch_oldest_child_under_5", 6, compute_binary_response, jeffreys_multinomial_factory(4),
412-
"smoothed_woldest_child_5_to_11", "weight", "ch_oldest_child_5_to_11", 6, compute_binary_response, jeffreys_multinomial_factory(4),
413-
"smoothed_woldest_child_12_to_15", "weight", "ch_oldest_child_12_to_15", 6, compute_binary_response, jeffreys_multinomial_factory(4),
414-
"smoothed_woldest_child_16_to_17", "weight", "ch_oldest_child_16_to_17", 6, compute_binary_response, jeffreys_multinomial_factory(4)
400+
"smoothed_wwant_info_none", "weight", "i_want_info_none", 6, compute_binary_response, jeffreys_binary
415401
)
416402

417403

facebook/delphiFacebook/R/contingency_indicators.R

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -440,12 +440,6 @@ get_aggs <- function() {
440440
"pct_inperson_school_fulltime_oldest", "s_inperson_school_fulltime_oldest", compute_binary, jeffreys_multinomial_factory(3),
441441
"pct_inperson_school_parttime_oldest", "s_inperson_school_parttime_oldest", compute_binary, jeffreys_multinomial_factory(3),
442442

443-
"pct_child_school_public", "s_child_school_public", compute_binary, jeffreys_multinomial_factory(5),
444-
"pct_child_school_private", "s_child_school_private", compute_binary, jeffreys_multinomial_factory(5),
445-
"pct_child_school_homeschool", "s_child_school_homeschool", compute_binary, jeffreys_multinomial_factory(5),
446-
"pct_child_school_not", "s_child_school_not", compute_binary, jeffreys_multinomial_factory(5),
447-
"pct_child_school_other", "s_child_school_other", compute_binary, jeffreys_multinomial_factory(5),
448-
449443
"pct_school_safety_measures_mask_students", "s_school_safety_measures_mask_students", compute_binary, jeffreys_binary,
450444
"pct_school_safety_measures_mask_teachers", "s_school_safety_measures_mask_teachers", compute_binary, jeffreys_binary,
451445
"pct_school_safety_measures_restricted_entry", "s_school_safety_measures_restricted_entry", compute_binary, jeffreys_binary,
@@ -458,20 +452,21 @@ get_aggs <- function() {
458452
"pct_school_safety_measures_vaccine_staff", "s_school_safety_measures_vaccine_staff", compute_binary, jeffreys_binary,
459453
"pct_school_safety_measures_vaccine_students", "s_school_safety_measures_vaccine_students", compute_binary, jeffreys_binary,
460454
"pct_school_safety_measures_cafeteria", "s_school_safety_measures_cafeteria", compute_binary, jeffreys_binary,
461-
"pct_school_safety_measures_dont_know", "s_school_safety_measures_dont_know", compute_binary, jeffreys_binary,
455+
"pct_school_safety_measures_dont_know", "s_school_safety_measures_dont_know", compute_binary, jeffreys_binary
456+
)
462457

463-
# misc children
464-
"pct_has_child_under_18", "ch_has_child_under_18", compute_binary, jeffreys_binary,
458+
aggs <- create_aggs_product(regions, groups, indicators)
465459

466-
"pct_oldest_child_under_5", "ch_oldest_child_under_5", compute_binary, jeffreys_multinomial_factory(4),
467-
"pct_oldest_child_5_to_11", "ch_oldest_child_5_to_11", compute_binary, jeffreys_multinomial_factory(4),
468-
"pct_oldest_child_12_to_15", "ch_oldest_child_12_to_15", compute_binary, jeffreys_multinomial_factory(4),
469-
"pct_oldest_child_16_to_17", "ch_oldest_child_16_to_17", compute_binary, jeffreys_multinomial_factory(4)
470460

461+
monthly_indicators <- tribble(
462+
~name, ~metric, ~compute_fn, ~post_fn,
463+
"pct_child_school_public", "s_child_school_public", compute_binary, jeffreys_multinomial_factory(5),
464+
"pct_child_school_private", "s_child_school_private", compute_binary, jeffreys_multinomial_factory(5),
465+
"pct_child_school_homeschool", "s_child_school_homeschool", compute_binary, jeffreys_multinomial_factory(5),
466+
"pct_child_school_not", "s_child_school_not", compute_binary, jeffreys_multinomial_factory(5),
467+
"pct_child_school_other", "s_child_school_other", compute_binary, jeffreys_multinomial_factory(5)
471468
)
472-
473-
aggs <- create_aggs_product(regions, groups, indicators)
474-
469+
monthly_aggs <- create_aggs_product(regions, groups, monthly_indicators)
475470

476471
### Include handful of original public tables not already covered by set above
477472
common_group <- c("agefull", "gender", "race", "hispanic")
@@ -528,7 +523,7 @@ get_aggs <- function() {
528523
aggs <- rbind(aggs, cut1_aggs, cut2_aggs, cut3_aggs, cut456_aggs, cut456_marginal_aggs)
529524

530525
weekly_aggs <- aggs
531-
monthly_aggs <- aggs
526+
monthly_aggs <- rbind(aggs, monthly_aggs)
532527

533528
return(list("week"=weekly_aggs, "month"=monthly_aggs))
534529
}

0 commit comments

Comments
 (0)