Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: What form of data needed for ipf function?


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: What form of data needed for ipf function?
Date   Fri, 15 Aug 2008 18:30:46 +0100 (BST)

The original article is freely available from :
http://www.stata.com/products/stb/journals/stb55.pdf

There are example datasets accompanying this package, you can download
them by typing -findit ipf- click on ipf, than click on "click here to
get" behind ancillary files.

Hope this helps,
Maarten

--- [email protected] wrote:

> I apparently don't have my data in a form that allows stata v 10.1 to
>  
> run the ipf function.
> 
> I have a dataset of 262 observations coded by 6 variables, all  
> categorical and all, hypothetically, independent.
> 
> varlist is
> genre
> race
> type
> condition
> fda_cat
> page_size
> 
> 
>   I ran a multiple correspondence analysis (using XLStat) to look at 
> 
> patterns with and without the binary variable (race).  It was  
> recommended that I should also run log-linear models on the data.
> 
> What form does the data need to be in for stata to perform the ipf  
> command?  I have tried several forms:
> 1. full spreadsheet data of 262 observations, each observation coded 
> 
> with string variables.  Six variables of interest, range from  
> dichotomous choices, three choices, or five choices.  None are  
> ordinal.  All categorical.
> describe
> 
> Contains data
>    obs:           262
>   vars:             6
>   size:        14,410 (99.9% of memory free)
>
---------------------------------------------------------------------------------
>                storage  display     value
> variable name   type   format      label      variable label
>
---------------------------------------------------------------------------------
> genre           str3   %9s
> race            byte   %8.0g
> type            str7   %9s
> condition       str28  %28s
> fda_cat         str4   %9s
> page_size       str4   %9s
> 
> 2. multiway contingency (freq) table, where freq counts of 262  
> observations were combined into like combinations showing 63 similar 
> 
> observations (rows).  The frequencies (cell counts) for each of the
> 63  
> rows ranged from 1 to 35.
> 
> Contains data from C:\Documents and Settings\LaVera  
> Crawley\Desktop\transformed
> >  log linear data.dta
>    obs:            63
>   vars:             7                          14 Aug 2008 20:52
>   size:         1,008 (99.9% of memory free)
>
-------------------------------------------------------------------------------
>                storage  display     value
> variable name   type   format      label      variable label
>
-------------------------------------------------------------------------------
> genre           byte   %8.0g
> race            byte   %8.0g
> type            byte   %8.0g
> condition       byte   %8.0g
> fda_cat         byte   %8.0g
> page_size       byte   %8.0g
> freq            int    %8.0g
> ------------------------------------------
> 
> Neither form of the data worked. I still get the error r(109) type  
> mismatch message as below (despite what linear equation I use - with 
> 
> or without interaction terms):
> For example:
> . ipf [fw=freq], fit( race+ genre+ type+ condition+ fda_cat+
> page_size)
> Deleting all matrices......
> 
> Expansion of the various marginal models
> ----------------------------------------
> marginal model 1 varlist :  race
> marginal model 2 varlist :  genre
> marginal model 3 varlist :  type
> marginal model 4 varlist :  condition
> marginal model 5 varlist :  fda_cat
> marginal model 6 varlist :  page_size
> unique varlist  race genre type condition fda_cat page_size
> invalid syntax
> r(198);
> 
> 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

Send instant messages to your online friends http://uk.messenger.yahoo.com 
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index