Date: Sun, 22 Aug 2010 23:11:28 -0700
Reply-To: "Hurtz, Gregory M" <ghurtz@saclink.csus.edu>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Hurtz, Gregory M" <ghurtz@saclink.csus.edu>
Subject: Re: how do I define an alias for a set of vars?
In-Reply-To: <4C71BAA3.70802@pacbell.net>
Content-Type: text/plain; charset="us-ascii"
Jan,
I would use a simple macro in the syntax file. At the top of the file (or anywhere before the first time you want to use the "alias") put the following:
DEFINE !varset () var1 var2 var3 .... var25.
!ENDDEFINE.
You can change the name "varset" if you want but keep the exclamation point, and obviously replace var1 ... var25 with the names of your 25 variables.
Now, you simply use !varset as an "alias" for the 25 names. For example, in the following command you will get frequency tables for each of the 25 variables:
FREQUENCIES VARIABLES = !varset.
--
Greg Hurtz, Ph.D.
Associate Professor
Industrial & Organizational Psychology
California State University, Sacramento
http://www.csus.edu/indiv/h/hurtzg
________________________________________
From: SPSSX(r) Discussion [SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of J McClure [mc006@pacbell.net]
Sent: Sunday, August 22, 2010 5:02 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: how do I define an alias for a set of vars?
Hi,
I want to do repeated analysis on a set of 25 variables that are not
contiguous in the dataset. I can cut and past them in each time but it
takes a lot of space in the editor so I want to give them an alias. I
know I can make a new file with a subset of variables in it but I would
rather just work out of one file. I tried defining them as a variable
set from the menu and then using the name of the set to replace the
variable names in a freq command but that did not work.
I see there is a syntax subcommand called varsets but not sure if that
will work?
Thanks,
Jan
=====================
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
=====================
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