X-Git-Url: https://code.communitydata.science/stats_class_2020.git/blobdiff_plain/8fd157255be676075b265bce505eb1997cc10983..cee724eca6df5fb223239f59c5034c78c39f11a1:/psets/pset5-worked_solution.rmd diff --git a/psets/pset5-worked_solution.rmd b/psets/pset5-worked_solution.rmd index 32ced5c..f2c8991 100644 --- a/psets/pset5-worked_solution.rmd +++ b/psets/pset5-worked_solution.rmd @@ -70,6 +70,8 @@ summary(df) obama.tbl <- table(took_fruit=df$fruit, saw_flotus=df$obama) obama.tbl +obama.prop.tbl <- proportions(table(took_fruit=df$fruit, saw_flotus=df$obama), margin=2) +obama.prop.tbl ``` ## PC4. Test for differences between groups