Comparisons Within the Same Time Period


I have a question related to comparing two estimates from the same period. The comparison involves a large area (a city) and a tract from the city. Given they are not independent samples, how can I can compare the mean of a variable that represents a city to the mean of the same variable of a city's census tract? Please advise. 

Parents Reply
  • The "samples" are not independent since the census tract an is part of the city.  You need to take into account of the covariance between the city and tract medians.

    The formulas using Variance Replicate tables works with medians. How are you comparing median incomes ?  Are you taking the difference or the ratio of medians?  Look at the slide deck link for details.

  • the difference of medians. is there a r script to pull variance replicate tables? I need to follow this process for many variables and was wondering if there is a way to automatize this estimation. i see variance replicate tables can not be retrieved using the census api, any suggestions are welcome. thanks

  • The variance replicate table in in separate files for each ACS table.  A single file has the entire US.

    There is a directory for each geography. Here is an example

    Since you will only need a couple of files (one for cities and one for tracts), you can do the download by hand.  You can unzip the files (each one has a single csv file inside) or read directly from the zip file using the unz connection and read.table. geo level codes  160 place   60 county subdivision 140 tract 50 county