LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2006)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 17 Aug 2006 19:14:23 +0200
Reply-To:     "Kooij, A.J. van der" <KOOIJ@fsw.leidenuniv.nl>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Kooij, A.J. van der" <KOOIJ@fsw.leidenuniv.nl>
Subject:      Re: Correspondence Analysis Macro
Content-Type: text/plain; charset="iso-8859-1"

If you use the supplementary subcommand, the supplementary rows and columns ARE projected in the plots created by CORRESPONDENCE. So, I'm not sure what exactly you want to do. ? Regards, Anita van der Kooij Data Theory Group Leiden University.

________________________________

From: SPSSX(r) Discussion on behalf of Brandon Paris Sent: Thu 17/08/2006 18:31 To: SPSSX-L@LISTSERV.UGA.EDU Subject: Correspondence Analysis Macro

> Hi -- > > I have a situation where I have run a correspondence analysis on an > existing data set. In the future, I will have periodic data that I > would like to project onto the plots created with the original > dataset. I'd like to set this up the syntax so it can be used via the > SPSS Production Utility. Here the setup: > > * My original data file has 122 row levels. The file has one > record for each row-column combination. For instance, with 122 row > items and 20 column items, there would be 2440 records containing 3 > variables -- rownum, columnum, score. > * The new data sets that will come in will have varying numbers of > rows. One data set may have 5; the next may have 10 or 12. All > columns are still the same. > * To avoid having empty rows in my output, I do pre-processing on > the new data to start the row label at 122+1=123. I then merge the > new data with the old. > * I weight by score, which gives the cell counts when a table > using rownnum*columnnum is created. > * The CORRESPONDENCE procedure has a call (SUPPLEMENTARY) to > indicate which rows or columns in the data are supplemental to the > analysis (generate CA positions but don't use them as inputs to the > CA). > * Once CORRESPONDENCE runs, I can use OMS to pull the row points > table for charting. > > Now, here's the issue: > * Many people will be using this code, some who are unfamiliar > with SPSS syntax-- hence the Production Utility. I want to allow for > as few mistakes as possible. > * Assume I have 5 new products that I want to project onto the > original map. I would like to send a command like > /SUPPLEMENTARY = rownum(123 124 125 126 127). > * I would have the user pass on the number of new products (in > this case 5) from the Product window. I then calculate a Macro > variable of the last rownum index (num rows from original data + num > rows from new data = 122 + 5 = 127) > * THE PROBLEM: I cannot figure out a way to pass the > SUPPLEMENTARY rows in a short-list format (or blow out my list in a > way that handles the dynamic nature of the data from dataset to > dataset). Given what I can come up with, I can pass a call like > /SUPPLEMENTARY = rownum(123 !maxprod), but this only treats rows 123 > and 127 as supplemental rows. Is there a way to do this in a Macro > framework? > > My other option is to allow the user to pass through a string of > numbers like @newrows = 123 124 125 126 127 and make the call > /SUPPLEMENTARY = rownum(@newrows), but this adds room for error. Does > anyone have any advice? The macro portion of my code (minus the > pre-processing) is below (thanks to Raynald Levesque's website for > addition using Macro variables trick). > > Brandon L. Paris > Manager, Analytic Innovation > > DEFINE !getca (). > > !LET !a = 122 . > !LET !b = 5 . > !LET !maxprod = !length(!concat(!blanks(!a), !blanks(!b))) . > > CORRESPONDENCE > TABLE = rownum(1 !maxrow) BY colnum(1, 20) > /SUPPLEMENTARY = rownum(123,!maxprod) > /DIMENSIONS = 2 > /MEASURE = CHISQ > /STANDARDIZE = RCMEAN > /NORMALIZATION = SYMMETRICAL > /PRINT = TABLE RPOINTS CPOINTS . > !ENDDEFINE . > > OMS > /SELECT TABLES > /IF COMMANDS = ['Correspondence'] > SUBTYPES = ['Overview Row Points'] > /DESTINATION FORMAT=SAV OUTFILE='c:\temp.sav' . > > !getca . > > OMSEND . > >

********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************


Back to: Top of message | Previous page | Main SPSSX-L page