diff --git a/07-modeling.Rmd b/07-modeling.Rmd index 9164bde..08968a2 100644 --- a/07-modeling.Rmd +++ b/07-modeling.Rmd @@ -676,7 +676,9 @@ Let's first look at the main effects of income grouping and early voting behavio ```{r} #| label: model-logisticexamp-biden-main log_biden_main <- anes_des_ind %>% - mutate(EarlyVote2020 = fct_relevel(EarlyVote2020, "No", after = 0)) %>% + mutate( + EarlyVote2020 = fct_relevel(EarlyVote2020, "No", after = 0) + ) %>% svyglm( design = ., formula = VoteBiden ~ EarlyVote2020 + Income7, @@ -716,7 +718,9 @@ Although early voting behavior was not significant, there may be an interaction ```{r} #| label: model-logisticexamp-biden-int log_biden_int <- anes_des_ind %>% - mutate(EarlyVote2020 = fct_relevel(EarlyVote2020, "No", after = 0)) %>% + mutate( + EarlyVote2020 = fct_relevel(EarlyVote2020, "No", after = 0) + ) %>% svyglm(design = ., formula = VoteBiden ~ (EarlyVote2020 + Income7)^2, family = quasibinomial) diff --git a/08-communicating-results.Rmd b/08-communicating-results.Rmd index 8c1e82a..c17b29e 100644 --- a/08-communicating-results.Rmd +++ b/08-communicating-results.Rmd @@ -170,7 +170,9 @@ We can add a few more enhancements, such as a title (which is different from a c trust_gov_gt2 <- trust_gov_gt %>% tab_header("American voter's trust in the federal government, 2020") %>% - tab_source_note(md("*Source*: American National Election Studies, 2020")) %>% + tab_source_note( + md("*Source*: American National Election Studies, 2020") + ) %>% tab_footnote( "Question text: How often can you trust the federal government in Washington to do what is right?" @@ -309,7 +311,9 @@ anes_des_gtsum3 <- anes_des %>% as_gt() %>% tab_header("American voter's trust in the federal government, 2020") %>% - tab_source_note(md("*Source*: American National Election Studies, 2020")) %>% + tab_source_note( + md("*Source*: American National Election Studies, 2020") + ) %>% tab_footnote( "Question text: How often can you trust the federal government in Washington to do what is right?" @@ -356,7 +360,9 @@ anes_des_gtsum4 <- anes_des %>% as_gt() %>% tab_header( "American voter's trust in the federal government, 2020") %>% - tab_source_note(md("*Source*: American National Election Studies, 2020")) %>% + tab_source_note( + md("*Source*: American National Election Studies, 2020") + ) %>% tab_footnote( "Question text: How often can you trust the federal government in Washington to do what is right?" @@ -408,7 +414,9 @@ anes_des_gtsum5 <- anes_des %>% in the federal government by whether they voted in the 2020 presidential election" ) %>% - tab_source_note(md("*Source*: American National Election Studies, 2020")) %>% + tab_source_note( + md("*Source*: American National Election Studies, 2020") + ) %>% tab_footnote( "Question text: How often can you trust the federal government in Washington to do what is right?" diff --git a/13-ncvs-vignette.Rmd b/13-ncvs-vignette.Rmd index 7ab0ec8..06a172c 100644 --- a/13-ncvs-vignette.Rmd +++ b/13-ncvs-vignette.Rmd @@ -883,12 +883,15 @@ vr_gt<-pers_est_df %>% locations = cells_stub(rows = Level == "Other") ) %>% tab_source_note( - source_note = md("*Note*: Rates per 1,000 persons age 12 or older.")) %>% - tab_source_note(source_note = md("*Source*: Bureau of Justice Statistics, - National Crime Victimization Survey, 2021.")) %>% + source_note = md("*Note*: Rates per 1,000 persons age 12 or older.") + ) %>% + tab_source_note( + source_note = md("*Source*: Bureau of Justice Statistics, + National Crime Victimization Survey, 2021.") + ) %>% tab_stubhead(label = "Victim Demographic") %>% tab_caption("Rate and standard error of violent victimization, - by type of crime and demographic characteristics, 2021") + by type of crime and demographic characteristics, 2021") ``` diff --git a/90-AppendixA-DataImport.Rmd b/90-AppendixA-DataImport.Rmd index 90beddd..9c5f9d5 100644 --- a/90-AppendixA-DataImport.Rmd +++ b/90-AppendixA-DataImport.Rmd @@ -245,7 +245,9 @@ SAS: library(haven) anes_sas <- - read_sas(data_file = "data/anes_timeseries_2020_sas_20220210.sas7bdat") + read_sas( + data_file = "data/anes_timeseries_2020_sas_20220210.sas7bdat" + ) ``` ### Working with labeled data