syntax beginner

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

syntax beginner

Scott Collier
I have a dataset with 50 variables at baseline and the same 50 at T2.  I'm
simply trying to calculate change from baseline to t2 by subtracting one
from the other and create a third variable for each of the 50 (i.e. Q1,
Q1T2, and ChangeInQ1).  What is the easiest way to create those 50 change
variables?  Ideally, I would be able to have it recalculate every time new
data is added and I know the GUI is not best.

Thanks in advance -

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: syntax beginner

Maguin, Eugene
Scott,

This is a very compact way to do it. Let T1Q1 to T1Q50 be the T1 vars, T2Q1
to T2Q50 be the T2 vars and ChangeQ1 to ChangeQ50 be the change.

Do repeat T1=T1Q1 to T1Q50/T2=T2Q1 to T2Q50/Change=ChangeQ1 to ChangeQ50.
+  Compute Change=T2-T1.
End repeat.


Gene Maguin

=====================
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