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 (December 1996)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 10 Dec 1996 17:40:12 -0600
Reply-To:     marso@spss.com
Sender:       "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From:         David Marso <marso@SPSS.COM>
Organization: SPSS Inc
Subject:      Re: SPSS MAcro syntax: help needed
Content-Type: text/plain; charset=iso-8859-1

EXCELLENT questions. The macros which ship with the Advanced Statistics module are intended to be run by using an INCLUDE command to make them available for invocation in the SPSS session. See the section of the SPSS Syntax Reference Guide on Universals : Running SPSS Commands. You will find a discussion of Interactive Mode and Batch Mode. You will also see reference to the 'extra characters in column one' . These are useful to allow intentations of the commands to show programming structure (nesting of loops and do if commands etc). By the way, in SPSS 7.5 the macros have been modified to have periods in appropriate places so that one can load them either using INCLUDE, or by bringing them into a Syntax Window, selecting and running the entire command file. Basically, command terminators are ok in either interactive or batch mode. The decision was to place them into the macros as there was more than occasional confusion as to the correct way to run them. In addition, portions of CANCORR.SPS have been rewritten to permit larger problems to run . This new version is being distributed with Advanced Statistics version 7.5 . I hope this helps. David Marso

Hekon Finne wrote: > > David Marso <marso@spss.com> wrote: > >In the SPSS MACRO language, the !IF operator is used to conditionally > >direct > >program flow dependent upon values passed to the macro. !IF is not > >sensitive > >to values of variables. > > Thank you for the instructive example. I notice from other examples that are distributed with the > software itself that commands to not have a period as a command terminator. Also, some extra > characters pop up in column one (either a dot or a plus), but I cannot figure out how. Look at > these two exampes. > > Extract from matrix section of cancorr.sps: > > loop #l=1 to n > + compute tem=tem*wlam(n-#l+1) > + compute df(n-#l+1)=(p1-n+#l)*(p2-n+#l) > + compute dof=df(n-#l+1) > + compute bart2(n-#l+1)=-(ns-0.5*(p1+p2+3))*ln(tem) > + compute chi=bart2(n-#l+1) > + compute sig(n-#l+1)=1-chicdf(chi,dof) > + compute wilk(n-#l+1)=tem > end loop > > Extract from matrix section of ridgereg.sps: > > loop l=1 to iter > compute b = inv(xpx+(k &* ident(nv,nv)))*xy > compute rsq= 2* t(b)*xy - t(b)*xpx*b > compute keep(l,1)=k > compute keep(l,2)=rsq > compute keep(l,3:(nv+2))=t(b) > compute k=k+inc > end loop > > What is the significance of the missing terminators and the extra column one characters? > > Thanks again. > > Hekon Finne


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