Absolut … Your Investments
 
 
Investments. Yes. 

After you’ve been an SPSS novice for several years, you do get a dawning sense that you have a quite specific set of investments in the program, and your relation to it. Of course, there’s the general improvement of your grasp of – quite a number of things. Statistics, if you’re a novice in that as well. Programming – if you’ve always been allergic to that, but find yourself using syntax. And that general and highly important area of familiarity with the package, that turns out to strengthen your facility with other packages, as the vague similarities of situations impress themselves on you. (For those who are not novices, maybe what follows can help you remember how it feels, particularly the fear.) 

But then there are specifics. Specific investments. One day, you venture into the "Options" choices, and, with a sense of daring, start revising. Page lengths are not fixed in marble. You can change the appearance of titles on each tiny page. (This will mean less to those whose learning began with Windows versions.) Before long, on your own machine, in one-off goes, you create an environment you like and in which you feel at home. Then you go somewhere else, and all is changed: and you can’t remember what you did. The more this happens to you, and the more packages it happens to you with, the more you will start off looking for where the options are – and the less of a novice you feel. The options that work for you, and your easy access to them, are an investment. 
So much so, that if you learned in version n, and when n+1 turns up, your carefully hoarded know-how is a mere line in an easy dialog box, you feel cheated. 

Your real sense of investment comes when you save your first little bit of syntax, and reuse it on further occasions. You did it, it works, and it’s useful outside the original circumstances. Then you realise that that’s what it meant in the manual, when it told you to copy some code and modify it. It wasn’t being stupidly unimaginative about how stupidly unimaginative you are, thinking that you could program or understand what that meant or did. Put a bit of time in, play about with it, make it yours, Invest. 

I have been told by programmers that this is not so much utterly familiar to them, as the way they work. Get some code that works, and tailor it. And look at the way the post-Windows SPSS packages help: the PASTE instruction. Stagger through your dialog-box instructions, get it working, then PASTE it. Then hoard it. Maybe carry it around with you on a floppy. Realise that a .SPS file is a text file you can edit wherever you like . . . even in a WORD PROCESSOR. You can have multiple versions. 

DOS "Tables" was not a user-friendly place. With the manual, around a month and plenty of experimenting would have got you to near-mastery. As a way of getting neat tables out for the Exam Board on Friday, it was not recommended. Even so, if you copied some of the syntax in, and modified it, a bit at a time, you got there. I hoarded code written this way for years, until the new versions won’t read it any more……(Of course, there are now easier ways of doing it.) 

Even now: suppose you are merging two complex files, adding cases rather than variables. Some variables you want in, some you want out. Some variables should have had the same name, but haven’t, so you make them equivalent. All in an initially forbidding but thoroughly usable dialog box. This job can take hours and go wrong easily. When you switch off, or load another file, you lose it. Instead: PASTE it and save it as a .SPS file. It looks awful: for example, the procedure renames variables that it is going to drop, as one operation, and drops them later, as another. 

Ok, so you’ve made a mistake. You can go back to the dialog box, and do it again. (Hours.) Alternatively, you can try editing the pasted syntax file. You will need to modify the renamed variables in two places, probably: their new names are numeric, and you have to count, but it is – believe me – much easier than doing the whole job again with the dialog box. Courage is needed. Remember, however, that your existing files are unaffected, and that the program constructs the new merged file as NEWDATA, so you can junk it without loss if the merge is wrong. (You will have saved copies of your existing files elsewhere, anyway.) 

In general, you can use all the time-saving word-processor type features on your hoarded syntax files. You can edit them, use search and replace on them, multiply them, add them one to another. (All in SPSS, as well. Its editing features seem pretty good to me.) Suppose you want an output from a number of variables, with the same calculations applied to each, successively. Do the first in a dialog box, paste the syntax, then duplicate the syntax by copy - and - paste, and add in the new variable name. Repeat for all the other variables. Then Select All in the syntax box and Run the whole thing. 

(Keep the code. Take it out at night and cackle over it.) As you get into using syntax files, you will begin to keep resources (e.g. recurring variable names, possibly value labels, maybe test titles or explanations for inclusion in output) in separate text files from which you can copy and paste them in. 

Everybody who had learned it loved the old DOS "Data Entry". One thing it had that still seems to me superior to later versions (although I have not yet tried the new Data Entry) was a facility to borrow the structure of an existing file (the Dictionary) and use it to read new data from a text file. This meant that your earlier labelled files were a real investment, if incoming data had plenty in common. Even without this facility, you can do this by pasting the work you do on the dictionary of a file, and saving it. PASTE from the Read ASCII Data dialog box. (Although you cannot preserve labels this way, directly.) Modify it for new files. A few successful tries at this, and you will probably be happy to try a full Data List command in Syntax, complete with all labels. If you are getting pretty repetitive types of ASCII file, (or other kinds of input file) this can save you immense time, even given a few problems in modifying the syntax file to match your new data. 

Another loved feature was a quick copy facility on Value Labels. If you had typed in a value label entry for one variable, you could copy it instantly to any number of others. When the switch to Windows came, some colleagues hung grimly on to DOS Data Entry for this reason alone. There was a substitute, which took a little initial learning: TEMPLATES. This illustrates perfectly what I mean by an investment – if you haven’t made much use of it, yet, here are a few tips. 

It’s in the manuals and textbooks, but quite shy. A first off-put is that as it is set up you have to modify an existing template rather than write wholly from new. What you are doing is to modify then ADD a new template. Or, better when starting, add and modify. So you get an existing template up, then change its name, and ADD it to the list of templates. Then go back to it, to DEFINE, (and the additional windows you get then, especially Value Labels) and change the options to what you want. ADD saves it, APPLY changes as many variables as you have highlighted in the Data Editor, to the specification in your template. 

Ten minutes spent with the two dialog windows, trying out the options and applying them, will be very well worth while. 

Your list lives not in the SPSS directory, but in the WINDOWS directory. The file name is SPSS.tpl. It is independent of the particular file you are using, so your template file is a real investment – save all your value labelling this way, for multiple re-use. More than one machine or installation? Save SPSS.tpl on a floppy, and carry it around with you. If you want to keep the existing template sets on each machine, rename them, and put the working one in Windows as SPSS.tpl. So (presuming you have not been systematic from the beginning, which is hard) you will finish up with a set of .tpl files on your floppy. Here live all your value labels, so you never need to type them out in full ever again. Of course, once you get into using a syntax file to read your original data, you will have all your value labels in text files ready to go into that, and you may replace TEMPLATES in your own working practices. You may still be an SPSS novice, but you will be a veteran novice, with fat floppies full of successful investments. 
 

ASSESS Home Page | List of online newsletters | Table of Contents for this issue ]