Administrator
|
This post was updated on .
Hanging my head in shame:
I confess to being the original perpetrator of this flavor of dynamic syntax generation (or maybe I should blame Neila Nessa ). Some who will remain nameless have referred to it as a "horrible hack" ;-) Many people will credit RL for this (or cite his site as example) but that is historically inaccurate. OTOH, I am not entirely certain I wish to be credited with it either given it's widespread deprecation. One thing which is a crying shame is that all of the SPSS archives before 1996 have been bit bucketed . Does anyone know why or how 6-10 years of archives have gone the way of Roanoke (I don't know exactly when SPSSX-L first started but Wikipedia INCORRECTLY cites 1996. I was posting gems (or what I thought were so at the time) way back in 1991. ----- DO IF ($CASENUM EQ 1). WRITE /"spsscode....". END IF. EXE. .... INCLUDE (or use/refer to it somewhere else)...
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
I started doing such things (WRITEing out syntax) in late 90s when I
knew nothing about� SPSSX-L or Raynald and I thought I was the only
one in the world who experiments with SPSS syntax. :-)
11.12.2012 13:40, David Marso пишет: Hanging my head in shame: I confess to being the original perpetrator of this flavor of dynamic syntax generation (or maybe I should blame Neila Nessa ). Some who will remain nameless have referred to it as a "horrible hack" ;-) Many people will credit RL for this (or cite his site as example) but that is historically inaccurate. One thing which is a crying shame is that all of the SPSS archives before 1996 have been bit bucketed . Does anyone know why or how 6-10 (I don't know when SPSSX-L first started but Wikipedia INCORRECTLY cites 1996. I was posting gems (or what I thought were at the time) way back in 1991. ----- DO IF ($CASENUM EQ 1). WRITE /"spsscode....". END IF. EXE. .... INCLUDE (or use/refer to it somewhere else)... |
Administrator
|
This post was updated on .
In reply to this post by Zuluaga, Juan
I have looked at R and NumPy and in many cases both involve resisting the compulsion to sharpening a spoon to gouge my eyes out! I am bRamaged beyond repair after prolonged exposure to what I can best describe as R-adioactive code.
"Perhaps IBM/SPSS has realized that they can't compete for that type of user." Well compare SPSS MATRIX to SAS IML and I say SHAME SPSS/IBM for dropping the ball and pandering to the RSREMCL $trata and completely forgetting the needs of power users (aside from providing PR hooks).
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Administrator
|
In reply to this post by Kirill Orlov
Well then you are clearly a sick man ;-)
--
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
In reply to this post by Jon K Peck
David,
Please elaborate on >> DO IF ($CASENUM EQ 1). >> WRITE /"spsscode....". >> END IF. >> EXE. Re: Matrix. Couldn't the (sub)program be characterized as having a Fortran-language set of functions perhaps from IMSL or other source of known code wrapped inside of a command processor/interpreter/error checker shell probably written in a language other than fortran. Gene Maguin -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of David Marso Sent: Tuesday, December 11, 2012 5:11 AM To: [hidden email] Subject: Re: The agony and the ecstasy: Development of complex MATRIX programs. Well then you are clearly a sick man ;-) -- Kirill Orlov wrote > I started doing such things (WRITEing out syntax) in late 90s when I > knew nothing about SPSSX-L or Raynald and I thought I was the only > one in the world who experiments with SPSS syntax. :-) > > > 11.12.2012 13:40, David Marso пишет: >> Hanging my head in shame: >> I confess to being the original perpetrator of this flavor of dynamic >> syntax generation (or maybe I should blame Neila Nessa ). Some who >> will remain nameless have referred to it as a "horrible hack" ;-) >> Many people will credit RL for this (or cite his site as example) but >> that is historically inaccurate. >> One thing which is a crying shame is that all of the SPSS archives >> before >> 1996 have been bit bucketed . >> Does anyone know why or how 6-10 (I don't know when SPSSX-L first >> started but Wikipedia INCORRECTLY cites 1996. I was posting gems (or >> what I thought were at the time) way back in 1991. >> ----- >> DO IF ($CASENUM EQ 1). >> WRITE /"spsscode....". >> END IF. >> EXE. >> .... >> INCLUDE (or use/refer to it somewhere else)... >> ----- Please reply to the list and not to my personal email. Those desiring my consulting or training services please feel free to email me. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/The-agony-and-the-ecstacy-Development-of-complex-MATRIX-programs-tp5716810p5716867.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
Administrator
|
Second question first:
"Re: Matrix. Couldn't the (sub)program be characterized as having a Fortran-language set of functions perhaps from IMSL or other source of known code wrapped inside of a command processor/interpreter/error checker shell probably written in a language other than fortran." It would seem that all of the source already exists within the SPSS code itself. Someone would need to harvest it and wrap it then make it callable from MATRIX. I don't see what the development issues are aside from the innards of much of SPSS are probably pretty scary from a modularization perspective. First question: "Please elaborate on >> DO IF ($CASENUM EQ 1). >> WRITE /"spsscode....". >> END IF. >> EXE." Please no, do I really have to? ;-(( - <SHAME > For a classic example peer inside the cancorr.sps syntax . Unless that has been modified since my circa 1996 rewrite there lies festering an ugly mess which I am not particularly proud of perpetrating. The problem which was being solved here was running out of memory when scoring large data sets (MATRIX was/is not really a happy camper when dealing with 100,000 cases and 100-200 variables as it requires the data to be in memory (yes there were some savage DU's who actually complained about this)). Basically to cut to the chase... The following brilliant brain fart actually made it into distribution and AFAIK may still be lurking in the void of developmental inertia (if it ain't broken down fix it and/or eeeeewwww, I'm not touching that (instinctive recoil of any sane maintainence programmer)). --- <horrible mess> SELECT IF $CASENUM=1. DO REPEAT V=!SET1. COMPUTE V=1. END REPEAT. DO REPEAT V=!SET2. COMPUTE V=2. END REPEAT. STRING VARNAME (A8). COMPUTE VARNAME='SET_NUM'. FLIP VARIABLES !SET1 !SET2 / NEWNAMES=VARNAME . COMPUTE VARSEQ=1. SPLIT FILE BY SET_NUM. CREATE VARSEQ=CSUM(VARSEQ). SAVE OUTFILE 'CC_NAMES.SAV'. GET FILE 'CC__SIZE.SAV' . *---------------------------------------------------------------------------. * Set up required information to create compute statements for scoring. *---------------------------------------------------------------------------. WRITE OUTFILE 'CC__AB.INC' /'STRING @NMA001 TO @NMA',COL1 (N3), ' (A8)' /' @NMB001 TO @NMB',COL2 (N3), ' (A8)' /'VECTOR @NMA= @NMA001 TO @NMA',COL1 (N3) /' @NMB= @NMB001 TO @NMB',COL2 (N3) /'COMPUTE N_A='COL1 (N3) /'COMPUTE N_B='COL2 (N3) /'IF (SET_NUM=1) @NMA(VARSEQ)=CASE_LBL' /'IF (SET_NUM=2) @NMB(VARSEQ)=CASE_LBL' /'COMPUTE @=1' /'AGGREGATE OUTFILE "CC__SPRD.SAV" / BREAK @' / ' / N_A=MAX(N_A) / N_B=MAX(N_B)' / ' / @NMA001 TO @NMA',COL1 (N3) '=MAX (@NMA001 TO @NMA',COL1 (N3),')' / ' / @NMB001 TO @NMB',COL2 (N3) '=MAX (@NMB001 TO @NMB',COL2 (N3),')' / 'GET FILE "CC__AB.SAV"' / 'COMPUTE @=1' / 'MATCH FILES FILE * / TABLE "CC__SPRD.SAV"/BY @' / 'VECTOR @NMA= @NMA001 TO @NMA',COL1 (N3) / ' @NMB= @NMB001 TO @NMB',COL2 (N3) / ' COEF= COL1 TO @'. EXECUTE. GET FILE 'CC_NAMES.SAV'. INCLUDE FILE 'CC__AB.INC'. SET PRINTBACK OFF. *---------------------------------------------------------------------------. * Write out the compute statements for scoring. *---------------------------------------------------------------------------. STRING @SCNM@ (A8). STRING @OLDNM@ (A8). COMPUTE @SCNM@=CONCAT('S1_CV',STRING($CASENUM,N3)). WRITE OUTFILE 'CC__.INC' /'COMPUTE ',@SCNM@ ,'= 0'. LOOP CC@@@ = 1 TO N_A. COMPUTE @OLDNM@=@NMA(CC@@@). COMPUTE @COEF@ =COEF(CC@@@). WRITE OUTFILE 'CC__.INC' / ' +',@COEF@ (comma18.16),' * ',@OLDNM@ . END LOOP. COMPUTE @SCNM@=CONCAT('S2_CV',STRING($CASENUM,N3)). WRITE OUTFILE 'CC__.INC' /'COMPUTE ',@SCNM@ ,'= 0'. LOOP CC@@@=1 TO N_B. COMPUTE @OLDNM@=@NMB(CC@@@). COMPUTE @COEF@ =COEF(CC@@@+N_A). WRITE OUTFILE 'CC__.INC' / ' +',@COEF@ (comma18.16),' * ',@OLDNM@ . END LOOP. EXECUTE. *---------------------------------------------------------------------------. * Get the original data and run the scoring program. *---------------------------------------------------------------------------. GET FILE 'cc__tmp1.sav'. INCLUDE FILE 'CC__.INC' . </horrible mess> GACK!!!! So if you are still standing after having your brain assaulted by that horrible hack ...You probably need a cup of coffee or a shot of something stronger. Maybe a mid morning nap? Perhaps a cranial enema? ;-) </SHAME> Now you have done it. I feel really dirty ;-)!!! --
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Free forum by Nabble | Edit this page |