|
Stan Jones wrote:
>
> In article <3408DE54.7712@overnet.com.ar>, hmaletta@overnet.com.ar wrote:
> >Raeleen Mautner wrote:
> >>
> >> Can anyone tell me how and where to set up the syntax command for
> >> value labels?
> >> that is, if you have a bunch of items that are using the same
> >> values (1=agree, 2= etc..) and you want to save some time
> >> by not retyping the same scheme for a number of variables?
> >>
> >
> >You'll have to create a TEMPLATE (see the DATA menu, and proceed to
> >modify one of the existing templates to suit your needs), then apply it
> >to all the appropriate variables.
> >Unaccountably, SPSS is not able to create a template based on an
> >existing variable. You must start with the template, then apply it to
> >the variables. Also, you don't create templates from nothing: you've
> >only got to modify existing templates.
> >
> Hector is wrong. There is a simple syntax:
>
> VALUE LABELS varname1 to varname3 1 'Label1' 2 'Label2' 3 'Label3' /
> varname4 1 'LabelA' 2 'LabelB'.
> EXECUTE.
>
> You can also do missing values.
>
> MISSING VALUES varname1 to varname4 (9).
Stan,
Of course, I did know the syntax, I've written commands like those for
years. But the question came from someone who may not know what to do
with syntax, so I tried to give a solution based on the menu rather than
requiring him to write commands in a syntax file.
You also wrote:
>
> A good way to check the syntax is to do a templates and then look at the
> output. It appears to me that templates actually generates the VARIABLE
> LABELS / VALUE LABELS, etc. syntax.
Stan,
Almost all menu options in SPSS for Windows just perform an SPSS
command which can be also invoked through syntax. Menu options do not
actually 'generate the syntax', they just do the thing required (for
instance, they put labels in the variable); the syntax as such can be
'generated' (and later executed) if you choose 'Paste' instead of 'OK'
in any dialog box. The end result is the same. But I suspect many users
don't care about syntax, and will use SPSS as long as they get their
results by clicking on the menu.
Hector Maletta
Universidad del Salvador
Buenos Aires, Argentina
|