BookmarkSubscribeRSS Feed
Demographer
Pyrite | Level 9

Complex iterative proportional fitting

 

I have first a microdata set including individuals by country of residence (region), age (agegr), sex (sexR), education (edu), education of the mother (edum) and place of birth (pob), and sample weights (weight).

 

I  have a second dataset that contains aggregated population by country of residence (region), agegr, sex, edu, pob and duration of residence (dur_res) in 4 categories.

 

I have a third dataset that contains aggregated population by agegr, sex, edu, pob, duration of residence (dur_res) in 4 categories, and age at immigration (immstat) in 3 categories.

 

I want to impute the value of the duration of residence and the age at immigration from dataset 2 and 3 to the first one containing individuals. Other variables already match perfectly. Is there any straightforward procedure to do this?

3 REPLIES 3
StatDave
SAS Super FREQ

Your post title mentions iterative proportional fitting. IPF is a method to adjust a table of observed cell counts such that it has specified margins, where the specified margins are for the same variables as in the observed table. From your description, it isn't clear that that method can apply since you seem to have three data sets which have only some variables in common. In any case, the IPF method is available in SAS/IML via the IPF function. See the "Adjusting a Table from Marginals" section of the IPF function documentation which illustrates adjusting an observed table to a set of specified margins. You can decide if your data are suitable to use the method.

Rick_SAS
SAS Super FREQ

In addition to the documentation examples, which show how to handle n-way tables (more than 2 variables in the model), you might want to start with the blog post "Iterative proportional fitting in SAS," which explains the main ideas.

 

My advice: start with two variables and completely understand the how to handle a 2-D (r x c) table before moving on to three or more variables.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 528 views
  • 0 likes
  • 4 in conversation