Help using Base SAS procedures

Looking for examples of Call IPF subroutine in Proc IML

Reply
N/A
Posts: 1

Looking for examples of Call IPF subroutine in Proc IML

I need to use an iterative proportional fit technique on a series of tables and wanted to use the Call IPF subroutine in IML, however most of the examples I have found show the tables hardcoded into the program (not an option due to the number of tables involved). Does anyone know of an example that pulls the margins and starting values from a dataset? Also, I am not terribly familiar with IML and would be open to other suggestions on IPF programming.
SAS Super FREQ
Posts: 3,475

Re: Looking for examples of Call IPF subroutine in Proc IML

Look at the USE and READ statements in the IML documentation to read IML matrices/vectors from a SAS data set. For an (r x c) table, the basic syntax is:
use libref.mytable;
read all var into InitialTable;
close libref.mytable;

use libref.rowmargin;
read all var into rowMargin; /* or read all var {nameOfVar} */
close libref.rowmargin;

use libref.colmargin;
read all var into colMargin;
close libref.colMargin;
Ask a Question
Discussion stats
  • 1 reply
  • 128 views
  • 0 likes
  • 2 in conversation