BookmarkSubscribeRSS Feed
sasstat
Calcite | Level 5

Hi,

to adjust an observed table of cell frequencies to a set of new margins I want to use the CALL IPF subroutine in IML. In the SAS-Manual this is shown for a 2-dimensional table.

I would like to do this several times for adjusting cell frequencies to e. g. 3 marginals.

In the first step I would run the call ipf routine to fit cell frequencies to margin1 and margin2. The estimated cell frequencies then become the new marginal marginnew. In a second step estimated cell frequencies can be fitted to marginnew and margin3.

My questions are:

Is this a possibility to get estimated cell frequencies for e. g. a 3-dimensional table?

What happens in the second step? The values of marginnew have numerical values instead of observations. Is this a problem?

Do you know another way to include three or more 1-dimensional margins directly in the call ipf routine?

Thanks!

sasstat

2 REPLIES 2
Rick_SAS
SAS Super FREQ

I'm pretty sure that the IPF routine enables you to request whichever marginals you want.  You ought to be able to get all three marginals directly.

In the IPF doc there is an example of a three-way table for Education, Religion, and Self-esteem:

http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_langref_sect19...

Although that example is for the MARG call, you can use it to experiment with the IPF call for three-way tables. Use the CONFIG parameter to specify the interactions, and make sure that the DIM parameter agrees with the way that the table is stored.

You might want to look at this Tech Support doc: http://support.sas.com/techsup/technote/ts131.html

sasstat
Calcite | Level 5

Thank you for your information!

I am going to try, if it works in my case.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 2 replies
  • 955 views
  • 0 likes
  • 2 in conversation