Creating and Editing a Data File PDF

Document Details

VersatileDivisionism

Uploaded by VersatileDivisionism

University of Economics Ho Chi Minh City

Nguyen Van Dung Ph.D.

Tags

SPSS data file data analysis variable types

Summary

This document is a presentation on creating and editing data files in SPSS. It covers different variable types (numeric and string), their properties (width, decimals, labels, values, and missing data). It also describes various display options for the data and variable properties in SPSS.

Full Transcript

CREATING AND EDITING A DATA FILE Nguyen Van Dung Ph.D. 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1.1 Name 1. Creating and Editing a Data File  Each var...

CREATING AND EDITING A DATA FILE Nguyen Van Dung Ph.D. 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1.1 Name 1. Creating and Editing a Data File  Each variable name you use must adhere to the following rules:  Each variable may be any length but shorter than 10 characters is usually desirable.  It must begin with a letter, but after that any letters, numbers, a period, or the symbols @, #, _, or $ may be used. However, the name may not end with a period.  All variable names must be unique; duplicates are not allowed.  Variable names are not sensitive to upper or lower case. ID, Id, and id are all identical to SPSS.  Because they have a unique meaning in SPSS, certain variable names may not be used, including: all, ne, eq, to, le, lt, by, or, gt, and, not, ge, and with 1. Creating and Editing a Data File 1.2 Type 1. Creating and Editing a Data File  Most of variables will be numeric  default setting.  Two nonnumeric variables in the grades.sav file, lastname and firstname. For those two variables you will click on the grayed box to select String.  A variable that contains letters (rather than only numbers) is called a string variable. String variables may contain numbers (e.g., type2, JonesIII) or even consist of numbers, but SPSS treats strings as nonnumeric, and only a very limited number of operations may be conducted with strings as variables.  Screen 3.3  eight different variable types are available. Numeric and String are by far the most frequently used options. 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1.3 Decimals  Decimal column  identify the number of decimal places for each variable.  In the grades.sav file only the GPA variable requires decimals (the default 2 places), so all other variables will be assigned a “0” in the decimals column.  For string variables the number of decimals is 0 by default. 1. Creating and Editing a Data File 1.4 Width  In the Width column you determine the largest number or longest string that will occur for each variable.  For id the width will be 6 because all ID numbers in the data set have six digits.  For lastname we might select 10. While there may be a student with a last name longer than 10 letters, that is typically long enough for identification.  For gpa the width will be 4: one digit left of the decimal, two digits to the right of the decimal, and one more space for the decimal point. 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1.5 Label  The Label column allows you to label any variable whose meaning is not clear from the variable name.  Many times the meaning is clear from the variable name itself (e.g., id, gender, quiz1, quiz2) and no label is required. Other times the meaning is NOT clear and a label is very useful.  The cells in the Label column are simply text boxes and you type the label you desire.  The maximum length is 256 characters, but something that long is very cumbersome. Twenty or thirty characters is usually plenty to get your point across. 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1.6 Values  Value labels allow you to identify levels of a variable (e.g., gender: 1 = female, 2 = male; marital: 1 = married, 2 = single, 3 = divorced, 4 = widowed).  Entering value labels for variables that have several distinct groups is absolutely critical for clarity in interpretation of output.  SPSS can do the arithmetic (số học) whether or not you include value labels, but you’ll never remember whether a 3 means single or divorced.  Another advantage of value labels is that SPSS can display these labels in your data file and in Output following analyses.  SPSS allows up to 60 characters for each value label, but clearly something shorter is more practical. 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1.7 Missing  The Missing column is rarely used. Its purpose is to designate different types of missing values in your data.  For instance, subjects who refused to answer the ethnicity question might be coded 8 and those who were of different ethnicity than those listed might be coded 9. If you have entered these values in the Missing value column, then you may designate that 8s and 9s do not enter into any of the analyses that follow. 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1.8 Columns  The Columns column allows you to identify how much room to allow for your data and labels (Tab data View).  If you have wide columns you can see the entire variable name and thus seem less crowded.  If you have narrow columns, you have the advantage of getting many variables visible on the screen at one time but you may have to truncate variable names.  For instance if you have columns that are 3 characters wide you are able to fit 33 variables into the visible portion of the data screen (depending on your monitor); if the columns are all 8 characters wide (the default), you can fit only 12  Default number: 8 1. Creating and Editing a Data File 1. Creating and Editing a Data File 1.9 Align  The Align column provides a drop-down menu that allows you to align the data in each cell right, left, or center.  By default,  Numeric variables align to the right.  String variables align to the left. 1. Creating and Editing a Data File 1.10 Measure  The Measure column also provides a drop-down menu that allows you to select three options based on the nature of your data: Scale (tỷ lệ), Ordinal (theo thứ bậc), and Nominal (danh nghĩa).  Scale measures: have intrinsic numeric meaning that allow typical mathematical manipulations (thao tác).  For instance, age is a scale variable: 16 is twice as much as 8, 4 is half as much as 8, the sum of a 4 and 8 is 12, and so forth. Scale is the default for all numeric variables.  Scale measures = continuous (liên tục) measures.  Other examples: dollars, length, or weight 1. Creating and Editing a Data File 1.10 Measure  Ordinal measures: have intrinsic order but mathematical manipulations are typically meaningless.  On an aggression scale of 1 to 10, someone higher on the scale is more aggressive than someone lower on the scale, but someone who rates 4 is not twice as aggressive as someone who rates 2.  Rating a service as poor (0), average (1), good (2), very good (3), or excellent (4) 1. Creating and Editing a Data File 1.10 Measure  Nominal measures: are used for identification but have no intrinsic order such as gender, ethnicity, marital status, and most string variables.  Nominal data may be used for categorization and other statistical procedures.  Sometimes it can be difficult to choose between scale and ordinal. If so, don’t worry too much. In all analysis, SPSS handles both ordinal and scale variables identically. 1. Creating and Editing a Data File 1.11 Role  The Role column made its appearance for the first time in SPSS 18.  This function is designed for large data sets in which the researcher wishes to keep track of which variables are undesignated (Input, the default), which are dependent variables (Target), and other functions unique to certain experimental designs.  For most studies this column may be ignored. 1. Creating and Editing a Data File 1.12 Entering Data  Entering Data in the Data View tab. 1. Creating and Editing a Data File 1.13 Search for data  This function is most frequently used for two different purposes:  If you have a large file that includes names, you can quickly find a particular name that is embedded within the file.  If you discover errors in your data file, the search function can quickly find those errors for correction. 1. Creating and Editing a Data File Ctrl + F 1. Creating and Editing a Data File 2. The Compute Procedure: Creating Variables  Compute two new variables called total and percent.  total (the sum of all five quizzes and the final)  percent (100 times the total divided by possible points, 125) 2. The Compute Procedure: Creating Variables 2. The Compute Procedure: Creating Variables Thank you

Use Quizgecko on...
Browser
Browser