Re: How to calculate multiple variable in a calculation thru loop/macro

Posted by Art Kendall on
URL: http://spssx-discussion.165.s1.nabble.com/How-to-calculate-multiple-variable-in-a-calculation-thru-loop-macro-tp5741015p5741017.html

I notice in your syntax that you use "=" both as (1) an assignment operator and (2) as a logical operator.

IFF done properly that will work.  However, 50 years of using SPSS and helping others use SPSS has taught me that one will shoot oneself in the foot less often if one uses the character logical operators {EQ, LT, LE, etc.} rather than the symbolic logical operators {=, <, <=, etc}.

In reading between the lines (what David call ESPSS) it seems like you may be attempting to get a frequency count across a set of variables?

That is given a set of variables (a mrset), you would like to see a table that that has a list of all the values that occur in any of the variables.

CTABLES is one way to get a frequency count across a set of variables.


It is helpful that you posted your attempted syntax.  
A more detailed explanation of what you are trying to do, will frequently let  list members relate what you are trying to do to existing SPSS procedures.

Many users find it helpful to cobble up a small example dataset, and a small example of what you would like to do.
Art Kendall
Social Research Consultants