I want to use the 1980, 1990, and 2000 census data along with the 2001-2012 ACS data to calculate the state-level mean for individual-level variables, e.g. VETSTAT. I am using STATA 13.

How should I use weights to accomplish this task?

I want to use the 1980, 1990, and 2000 census data along with the 2001-2012 ACS data to calculate the state-level mean for individual-level variables, e.g. VETSTAT. I am using STATA 13.

How should I use weights to accomplish this task?

When performing a weighted person-level analysis, you should always weight your data with the PERWT variable. The value of PERWT indicates how many persons in the population are represented by each sample case. You can then calculate the mean by state (STATEFIP) in STATA.The STATA code would look something like this:``

`bysort statefip: summarize vetstat `

[weight=perwt], meanonly

Depending on your purposes, you may wish to create a different version of a variable like VETSTAT in order to create more meaningful results (i.e. create a 1/0 flag indicating veteran status). Additionally, if you are concerned with estimating variance, then please see this User’s Note on how to account for the complex survey design.

Hope this helps.

This doesn’t seem to work. When I am summing PERWT by year, I get a pretty accurate estimate for the total population of the United States. But when I sum it by state-year - I get nothing close to the true population in each state. It seems like the weights are adjusted at the national level and not at the state level.

Am I missing something?

My bad, I used work place state instead of STATEFIP.

Sorry… It works fine!