Date: Fri, 23 Sep 2011 12:31:49 -0700
Reply-To: David Marso <david.marso@gmail.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: David Marso <david.marso@gmail.com>
Subject: Re: the intricacies of using do if-end if and execute
In-Reply-To: <OF228FB2C5.02ADD9BD-ON87257914.0062C727-87257914.0062D698@us.ibm.com>
Content-Type: text/plain; charset=UTF-8
OTOH: From the FM, SHIFT VALUES results in a data pass!!
Hence I suspect cannot be done in a LOOP or DO REPEAT and with HUGE data
sets WILL result in
unacceptable performance hits.
For example:
DO REPEAT X = X1 TO X10 / Y=Y1 TO Y10 / L=1 TO 10 .
+ COMPUTE X=LAG(Xvar,L).
+ COMPUTE Y=LAG(Yvar,L).
END REPEAT.
If recast as a set of SHIFT VALUE commands would result in 20 data passes
and require either a MACRO or 20 separate commands.
Sacrificing performance for a minor gain in "intuitiveness" is hardly
laudible ;-)
Jon K Peck wrote:
>
> Lag is tricky. You might find the SHIFT VALUES behavior to be more
> intuitive.
>
> Jon Peck (no "h")
> Senior Software Engineer, IBM
> peck@us.ibm.com
> new phone: 720-342-5621
>
>
>
>
> From: "Pirritano, Matthew" <MPirritano@ochca.com>
> To: SPSSX-L@LISTSERV.UGA.EDU
> Date: 09/23/2011 11:49 AM
> Subject: Re: [SPSSX-L] the intricacies of using do if-end if and
> execute
> Sent by: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
>
>
>
> Thanks David & Rick,
>
> It looks like it probably has something to do with the fact that lag is
> calculated after all other transformations even if it precedes them. So my
> select if is actually happening before the compute using lag that the
> select if is supposed to be based on.
>
> Thanks
> Matt
>
> Matthew Pirritano, Ph.D.
> Research Analyst IV
> Medical Services Initiative (MSI)
> Orange County Health Care Agency
> (714) 568-5648
>
> From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
> Rick Oliver
> Sent: Friday, September 23, 2011 10:25 AM
> To: SPSSX-L@LISTSERV.UGA.EDU
> Subject: Re: the intricacies of using do if-end if and execute
>
> I don't know what the original problem was. But if lag is an issue, go
> here:
>
> http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/index.jsp
>
> And then enter "lag function" in the Search field.
>
> It may shed some light on the problem.
>
>
>
> From: David Marso <david.marso@gmail.com>
> To: SPSSX-L@listserv.uga.edu
> Date: 09/23/2011 12:12 PM
> Subject: Re: the intricacies of using do if-end if and execute
> Sent by: "SPSSX(r) Discussion" <SPSSX-L@listserv.uga.edu>
>
>
>
>
> "Whereas if I insert an exe after the do-if I get what I want, a removal
> of
> all dups and primary cases, those instances that are a credit debit wash.
> I
> don’t even see where primary cases are being selected here. Hopefully my
> story is not too convoluted and someone has followed it."
>
> Matt,
> It has *NOTHING* specifically to do with DO IF and *EVERYTHING* to do with
> the LAG!!!
> Yeah, your story is way too convoluted. Since I don't use that silly
> dialog
> to DEDUP, I have *NO* idea what convoluted syntax you are beating your
> head
> against. Example of the data might be useful and the specific desired
> result. OTOH, whenever selection is done based on variables created by
> LAG
> you typically need a procedure to pass the data so things don't get
> FUBARed.
> (Might be best to use that data pass to get something informative? Perhaps
> freqs/XTABS on some variables you have just created as reality checks ;-)
> HTH, David
>
>
> --
> View this message in context:
> http://spssx-discussion.1045642.n5.nabble.com/the-intricacies-of-using-do-if-end-if-and-execute-tp4834252p4834370.html
>
> Sent from the SPSSX Discussion mailing list archive at Nabble.com.
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> LISTSERV@LISTSERV.UGA.EDU (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
>
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/the-intricacies-of-using-do-if-end-if-and-execute-tp4834252p4834871.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (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
|