I would greatly appreciate your help on how to use the weights when collapsing over multiple samples.
I am trying to collapse Census and ACS files from 1950 - today at the BPLD-by-state level. First, I am trying to calculate the shares of immigrants from (birthplace) country c in state s for various time frames, e.g. 1950-1960, 2010-2020, etc. Second, I also would like to calculate the averages of various variables, such as INCINVST.
Would it be reasonable to specify
perwt as the weight and simply run the collapse or are there any potential pitfalls associated with this, in particular when using multiple samples from both the Census and ACS? How would I deal with cases where perwt was set to zero?
This would be the sandbox example:
collapse (mean) INCINVST [pw=perwt], by(statefip bpld)
Thank you in advance for your help!