Statistical programming, matrix languages, and more

Using IPF, further questions

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

Using IPF, further questions

Hi,

thanks a lot for the helpful document (http://support.sas.com/techsup/technote/ts131.html) you mentioned to me.

I am on the way to adapt the described procedure to our data and have some more questions:

1. Meaning und use of CONFIG and DIM

   The given example nr. 2 uses CONFIG = {2 3 4} und DIM = {2 3 2 4} for the variables school, sex, age and region.

   What do the 2, 3, 4 in the CONFIG-statement mean? Why does SAS know which variables are meant?

   What's about the order of the elements of CONFIG and DIM with regard to the INITAB matrix?

   The DIM_statement gives four dimensions whereas there are only three variables given in the CONFIG-statement. What's the reason for this? 

2. In case of adjusting data from one source to two new margins specifying a model with main effects and two-factor-effects (CONFIG = {1, 2}) I got  

   different results depending on the input matrix TABLE. I used the “greedy algorithm” and the “Get independent table from margins” to fill the matrix

   TABLE. The STATUS parameter showed that only two iteration steps were needed in both cases.  What might be the reason for these different cell 

   estimates depending on the input matrix TABLE?

3. Is there any possibility to test the goodness of fit of the obtained model or its parameters?

Thanks!

sasstat


Accepted Solutions
Solution
‎10-31-2012 07:45 AM
SAS Super FREQ
Posts: 3,618

Re: Using IPF, further questions

I'm not an expert in this area, but here are some answers/hints. The doc is at http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_langref_sect19...

1) For CONFIG, see the section "Additional Details", subsection "The config Parameter."  For the relationship between CONFIG, DIM, and INITAB, see the subsection "The Shape of the table Parameter."  The DIM vector has four elements because there are 4 variables in the table.

There are only three elements in the CONFIG statement because your model contains three effects. As the doc says, "The columns of this matrix specify which interaction effects should be included in the model," so the model contains the main effects age (var2), sex (var3), and school (var4).

2) I don't know the reason. I'd suggest reading Maura Stokes' book on categorical data analysis to understand the "why."

3) The IPF call doesn't produce GOF statistics. You can construct a chi-square test of predicted vs observed values in IML. Or, there are other procedures such as CATMOD and GENMOD that handle log-linear models of categorical variables. See http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_catmod_examp...

or

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect0...

View solution in original post


All Replies
Solution
‎10-31-2012 07:45 AM
SAS Super FREQ
Posts: 3,618

Re: Using IPF, further questions

I'm not an expert in this area, but here are some answers/hints. The doc is at http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_langref_sect19...

1) For CONFIG, see the section "Additional Details", subsection "The config Parameter."  For the relationship between CONFIG, DIM, and INITAB, see the subsection "The Shape of the table Parameter."  The DIM vector has four elements because there are 4 variables in the table.

There are only three elements in the CONFIG statement because your model contains three effects. As the doc says, "The columns of this matrix specify which interaction effects should be included in the model," so the model contains the main effects age (var2), sex (var3), and school (var4).

2) I don't know the reason. I'd suggest reading Maura Stokes' book on categorical data analysis to understand the "why."

3) The IPF call doesn't produce GOF statistics. You can construct a chi-square test of predicted vs observed values in IML. Or, there are other procedures such as CATMOD and GENMOD that handle log-linear models of categorical variables. See http://support.sas.com/documentation/cdl/en/statug/65328/HTML/default/viewer.htm#statug_catmod_examp...

or

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_genmod_sect0...

Occasional Contributor
Posts: 6

Re: Using IPF, further questions

Thanks a lot!

I am going to check these hints.

sasstat

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 281 views
  • 3 likes
  • 2 in conversation