Comparisons Within the Same Time Period

Hi, 

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
  • Thanks for sharing these resources.

    My question is probably "simpler". I would like to estimate if the means are statistically different given the city mean vs. the census tract mean. For instance median household income: B19013

    CS = census tract; SE= standard error

    |(Mean of CS - Mean of the City)/sqrt[(SE_cs)^2 + (SE_city)^2]| , the results from this estimation compare it to a z score scale 

Children
  • 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

    https://www2.census.gov/programs-surveys/acs/replicate_estimates/2021/data/5-year/050/

    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

    Dave