1 / 23

Data Manipulation I Data Import & Export

Data Manipulation I Data Import & Export. SPSS Training Thomas V. Joshua , MS July, 2012. College of Nursing. Lecture Overview. Importing & Exporting Data Files Selecting Sorting Standardizing. Importing Data from Excel Files.

enrico
Download Presentation

Data Manipulation I Data Import & Export

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Manipulation I Data Import & Export SPSS Training Thomas V. Joshua, MS July, 2012 College of Nursing

  2. Lecture Overview • Importing & Exporting Data Files • Selecting • Sorting • Standardizing

  3. Importing Data from Excel Files • To open an Excel file, select the following options from the menu in the Data Editor window in SPSS: File -> Open -> Data...

  4. Importing Data from Excel Files • Your Excel spreadsheet should have all variable names on the top row, so leave the Read variable names option checked. • The Worksheet drop-down menu allows you to choose which worksheet you wish to open. Note: If you are working with a spreadsheet in another software package, you may want to save your data as an Excel file, then import it into SPSS.

  5. Importing Data from ASCIIFiles • Data are often stored in an ASCII file format, alternatively known as a text or flat file format. Typically, columns of data in an ASCII file are separated by a space, tab, comma, or some other character. File -> Read Text Data...

  6. Step 2 Step 1

  7. Step 4 Step 3

  8. Step 6 Step 5

  9. Exporting Data • File -> Save As...

  10. Inserting and Deleting Cases and Variables • The Data Editor provides menu options that allow you to add new variables or cases to an existing dataset. • Use the insert options available in the Data menu in the Data Editor: Data -> Insert Variable Data -> Insert Case • Delete Variable Case

  11. Sorting Cases • Here, gender was the first variable entered, followed by salary; accordingly, the data would first be sorted by gender, then, within each gender, data would be sorted by salary.

  12. Selecting Cases • You can analyze a specific subset of your data by selecting only certain cases in which you are interested. • The Select Cases menu option will either temporarily or permanently remove cases you don't want from the dataset. Data -> Select Cases...

  13. Selecting Cases • Output gives you the option of temporarily or permanently removing data from the dataset. • The Filter option will remove data from subsequent analyses until the All Cases option is reset, at which time all cases will again be active and used in further analyses. • The Copy option will save the selected cases to a new dataset. • The Delete option will remove unselected cases from the working dataset; be very careful with this option, because if the dataset is subsequently saved, these cases will be permanently deleted.

  14. Selecting Cases • If… button opens the following Select Cases: If dialog box.

  15. Selecting Cases • We select all of the cases in the dataset that meet a specific criterion: Female employees that have non-missing value of the Minority Classification. • After this selection has been made, subsequent analyses will use only this subset of the data. • Because we selected the Filter option in the previous dialog box, SPSS will indicate the inactive cases in the Data Editor by placing a slash over the row number. • To select the entire dataset again, return to the Select Cases dialog box and select the All Cases option.

  16. Selecting CasesEx. IF gender = 1 & minority ~= 9

  17. Selecting Cases • Random sample of cases This option allows us to select a specified proportion of the cases or a fixed number of cases at random. After selecting the corresponding radio button, we click on the "Sample" button to bring up a dialogue box that allows us to specify either an approximate percentage of cases or to sample an exact number of cases at random.

  18. Selecting Cases –Random sample of cases

  19. Selecting Cases This option allows us to specify a range of cases based on the internal case number. Thus, by typing in "4" and "8", we can select only cases 4, 5, 6, 7, and 8. • Based on time or case range • Use filter variable This option uses a special variable type – a filter variable that has values of 1 or 0 only: the cases with a 1 are included, and the cases with 0 on the filter variable are excluded.

  20. Use filter variable

  21. value - x ¯ _______________ Standardized = s Standardizing Data • BY “standardized” we mean

  22. Standardizing Data

  23. Thank You

More Related