LoslegenKostenlos loslegen

Inspecting margins of error

ACS data are distinct from decennial Census data in that they represent estimates with an associated margin of error. ACS margins of error by default represent a 90 percent confidence level around an estimate, which means that we are 90 percent sure that the true value falls within a range of the reported estimate plus or minus the reported margin of error.

In this exercise, you'll get some experience working with data that has high margins of error relative to their estimates. We'll use the example of poverty for the population aged 75 and above for Census tracts in Vermont.

Diese Übung ist Teil des Kurses

Analyzing US Census Data in R

Kurs anzeigen

Anleitung zur Übung

  • Get a dataset on elderly poverty by Census tract in Vermont from the ACS.
  • Filter the data frame to create a new data frame that stores those rows with margins of error that exceed their estimates.
  • Divide the number of rows in moe_check by the number of rows in the original dataset to see the proportion of rows that have larger margins of error than their estimates.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Get data on elderly poverty by Census tract in Vermont
vt_eldpov <- ___(___ = "tract", 
                     variables = c(eldpovm = "B17001_016", 
                                   eldpovf = "B17001_030"), 
                     state = "VT")

vt_eldpov

# Identify rows with greater margins of error than their estimates
moe_check <- ___(vt_eldpov, moe > ___)

# Check proportion of rows where the margin of error exceeds the estimate
___(moe_check) / nrow(vt_eldpov)
Code bearbeiten und ausführen