I am looking to examine the gender gap over time for a filtered sample of ASEC. I downloaded the ASEC dataset I need and I have filtered for working age, full-time workers, etc. Since the dataset includes person-level weights, is it justified to drop variables to filter my sample? Or will I be encountering errors in my analysis? Would I need to filter for these before I download them from IPUMS to obtain correct weights from my filtered sample?
Also, is it sufficient to use asecwt and earnwt if I want to explore the affect on earnings? Or would I need to replicate the weights using the guide? From what I understand, I should be able to use svyset [pweight = earnwt]. How would I use these for plotting graphs?
The Census Bureau recommends using replicate weights (REPWTP) to calculate standard errors for estimates using CPS ASEC microdata. You will want to use replicate weights in conjunction with a probability weight (e.g. ASECWT, EARNWT) to generate estimates that are representative of your population of interest. EARNWT is the correct probability weight to use in any analyses that incorporate Earner Study variables. If you are only using ASEC variables without any of the Earner Study variables, you should use ASECWT for calculating person level estimates.
Regarding your question on restricting your sample, the IPUMS CPS User Guide on Replicate Weights provides sample code for running analyses that incorporate all relevant sample design information. In Stata, the recommendation is to use the svy, subpop() option rather than dropping observations. This will produce more robust standard errors, but will not affect your point estimates. For plotting graphs, I recommend referring to other online forums that provide more targeted support for Stata.