![]() When data are collected, each piece of information is tied to a particular case. Now that you know how to enter data, it is important to discuss a special type of variable called an ID variable. If we do not include ALL, SPSS will throw out any variables not named in the /KEEP statement. The ALL option can only be used at the end of the line the code will fail if you try to put it before other variable names. The ALL option at the end of the line says to retain all remaining variables in their current order. The /KEEP statement tells SPSS the specific order of the variables you want: we list the variables by name, in the order we want, separated by spaces, on the right side of the equals sign. In the MATCH FILES command, FILE=* says to act on the the current active dataset. *Reorder the variables to place the new variable in the desired position.*/ We can use this syntax to perform these tasks: /*Compute new variable containing blanks (system-missing values).*/ Suppose we want to insert a new column of blank values into the sample dataset after the first variable, ids. You'll then use the MATCH FILES command to actually re-order the variables. You'll first use the COMPUTE command to initialize the new variable. Instead, you'll need to use two syntax commands. Is it possible to insert a variable using syntax? Technically, there's no direct syntax command to do so. You can enter values for the new variable by clicking the cells in the column and typing the values associated with each case (row). You should also define the variable's other properties (type, label, values, etc.) at this time.Īll values for the newly created variable will be missing (indicated by a “.” in each cell in Data View, by default) since you have not yet entered any values. Once in the Variable View, under the column “Name,” type a new name for the variable name you wish to change. You can quick-jump to the Variable View screen by double-clicking on the generic variable name at the top of the column. You can enter a new name for the variable on the Variable View tab. New variables will be given a generic name (e.g.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |