I am having difficulty in using IPFWEIGHT for iterative proportional fitting.
I have one file, from a less reliable sample, of population counts by age group, sex, year, and state. This is the sample.
I have another file, from a more reliable source, of population counts by age group, sex, and year (no state - just the totals for the US). This is the control.
I would like to adjust the sample cells, by age groups, sex, year, and state so that they add up to the national totals for age group, sex, and year.
Notes: I am presuming both files should be in long-form, I think part of the issue might be that the data are in different files, and if there is a simpler approach I'd be open to suggestions.
I have one file, from a less reliable sample, of population counts by age group, sex, year, and state. This is the sample.
I have another file, from a more reliable source, of population counts by age group, sex, and year (no state - just the totals for the US). This is the control.
I would like to adjust the sample cells, by age groups, sex, year, and state so that they add up to the national totals for age group, sex, and year.
Notes: I am presuming both files should be in long-form, I think part of the issue might be that the data are in different files, and if there is a simpler approach I'd be open to suggestions.