Session Ready
Exercise

Summarizing with svytotal()

We can also estimate counts with svytotal(). The syntax is given by:

svytotal(x = ~interaction(Var1, Var2), 
         design = design,
         na.rm = TRUE)

For each combination of the two variables, we get an estimate of the total and the standard error.

Instructions 1/2
undefined XP
  • 1

    Use svytotal() to find the estimated total for Depressed and HealthGen. Store it as tab_totals and print it out.

    • 2

      Now use svymean() to find estimated means for Depressed and HealthGen. Store it as tab_means and print it out.