Ibm Spss Presentation 2

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 8

1

Statistical Packages for the Social Science Version 19.0 – (SPSS)

Use in Data Analysis

CHANGING THE IBM SPSS ‘OPTIONS’ (EDIT>OPTIONS)


GENERAL TAB:

IN VARIABLE LISTS SECTION /// FILE OR ALPHABETICAL

DATA TAB:
IN DISPLAY FORMAT FOR NEW NUMERIC VARIABLES SECTION //// CHANGE THE DECIMAL PLACES
VALUE TO 0

DATA EDITOR WINDOW

VIEWER WINDOW

MENU BAR AND MENUS

DATA EDITOR TOOL BAR (if not showing, click view>toolbar>data editor
toolbar)

DIALOGUE BOXES:

SORTING VARIABLE: RIGHT CLICK>SORT ALPHABETICALLY

RESET: THIS BUTTON IS USED TO CLEAR THE DIALOGUE BOX OF ALL THE
PREVIOUS
COMMANDS YOU MIGHT HAVE GIVEN WHEN YOU LAST USED THIS
PARTICULAR
STATISTICAL TECHNIQUE OR PROCEDURE.

Icons: Numeric / String / Date / Time

VARIABLE VIEW

ATTRIBUTES: Name/Type(eg numeric string,

date)/Width/Decimals/Label/Value/Missing/Columns/Align/Measure(scale,
ordinal,
2

nominal)

DATA VIEW

Arrangement Of Data In Rows And Columns

Case/row/record

Variable/columns

DATA ENTRY
THROUGH KEYBOARD / NEW DATA FILE : FILE>NEW>DATA

OPENING AN EXISTING DATA FILE : FILE>OPEN>DATA>OPEN


FILE

IMPORTING EXCEL FILE INTO SPSS

File>Open>Data from the menu at the top of the screen.


In the section labelled Files of type, choose Excel. Click on the file so
that it appears in the File name section.
Click on the Open button. A screen will appear labelled Opening
Excel Data
Source. Make sure there is a tick in the box Read variable names
from the
first row of data. Click on OK.
In the Data Editor, Variable view, you will now need to define each of the
Labels,
Values and Measure information (see instructions presented earlier). You
may also
want to reduce the width of the columns as they often come in from Excel
with a width
of 11.

DATA MODIFICATION SPSS

Copy, Cut And Paste (IN DATA VIEW)


click on a cell , then right click and drag down to select all desired cells , Right click with
your mouse pointer in one of the highlighted cells,

and click Cut/Copy.


3

right click in the destination cell , then select and click Paste.

Delete a case (data view): Click once to highlight the row. Press the
Delete
Insert a case between existing cases(data view): Click the case (row)
immediately
below where you would like the new case to appear. Click on
the
Edit>Insert Cases
Delete a variable(variable view) : click the column you wish to
delete. Click once
to highlight the whole column. Press the Delete
Insert a variable between existing variables(variable
view): click the
variable to the right of where you would like the new variable
to appear.
Click on the Edit> Insert Variable
Move a variable(in data view): click the variable, drag to the desired
spot horizontally

BASIC SPSS FUNCTIONALITIES

Sort the data file


IBM SPSS can sort your data file according to values on one of your variables
(e.g. sex, age).
1. Click on the Data menu
2. choose Sort Cases and specify which variable will be used to sort
by.
3. Choose either Ascending or Descending. Click on OK.
4. To return your file to its original order repeat the process, asking IBM
SPSS to sort the file by ID.

Select cases
For selecting a subset of your sample (e.g. only males).

1. Click on the Data menu and choose the Select Cases option.
2. Click on the If condition is satisfied button.
3. Click on the button labelled IF.
4. Choose the variable that defines the group that you are interested in (e.g.
sex).
5. Click on the arrow button to move the variable name into the box. Click on the
= key
4

from the keypad displayed on the screen.


6. Type in the value that corresponds to the group you are interested in .For
example, if males
in this sample are coded 1, therefore you would type in
1. The command line should read: sex = 1.
7. Click on Continue and then OK.
Example: lets compute average to apply to only the selected case.

To turn select case off:


1. Click on the Data menu and choose Select Cases option.
2. Click on the first All cases option. Click on OK.

Merging files by adding cases.


the column/headings must match, there shouldn’t be duplicate ID,

Making ID unique
open one of the files, choose Transform from the
menu, and then Compute Variable. Type ID in the Target Variable box,
and then
ID + 1000 in the Numeric Expression box (or some number that is
bigger than the
number of cases in the file). Click on the OK button, and then on OK in
the dialogue
box that asks if you wish to change the variable. This will create new ID
numbers for
this file starting at 1001, 1002 and so on

Merging steps
1. Open the first file that you wish to merge.
2. Go to the Data menu, choose Merge Files and then Add Cases.
3. In the dialogue box, click on An external SPSS data file and choose the file
that you
wish to merge with. (If your second file is already open it will be listed in the top
box,
An open dataset.)
4. Click on Continue and then on OK. Save the new data file using a different
name by
using File, Save As.

Merging files by adding variables


For adding additional information for each case (with the matching IDs)

Go to the Data > Merge files >Add Variables.


In the dialogue box, click on An external SPSS data file and choose the file
that you
5

wish to merge with. (If your second file is already open it will be listed in the top
box,
An open dataset.)
In the Excluded variables box, you should see the ID variable listed (because
it exists
in both data files). (If you have any other variables listed here, you will need to
click on
the Rename button to change the variable name so that it is unique.)
Click on the ID variable, and then on the box Match cases on key variables
and on the
arrow button to move ID into the Key Variables box. This means that all
information will
be matched by ID. Click on OK.
6. Save your merged file under a different name (File, Save As).

Computing Average
Click Transform > Compute Variable , Type avg_pts in the Target Variable box (this is the
name of your new variable as it will appear in the Data View screen).

Click the Type & Label box, and the Compute Variable: Type and Label window opens and
floats in front of the Compute Variable window,

In the Label box, type the new variable name (this is your new variable’s label)

Click Continue, Click the parentheses key on the keypad (which will move the

parentheses to the Numeric Expression box). Click any of the variable name (found in the
variable list on the left side of the window), then click the arrow to the right of the variable
list.

Click the + sign on the keypad, then click another variable to add to the first one, then click
the arrow.

Click to the right of the parentheses in the Numeric Expression box, Click the forward slash
key on the keypad, and then click the number 2 on the keypad.

Click OK, and the Output Viewer opens.

Computing Grade
Click Transform > click Recode into Different Variables (the Recode into Different Variables
window Opens).
6

Click the average obtained above, and then click the arrow.

Click the Name box, and type Grade. Click the Label box, and type Final Letter Grade.

Click Change (which moves the soon to be created new output

variable to the center panel, which now looks like avg_pts -->

Grade,

Click Old and New Values (the Recode into Different Variables: Old

and New Values window opens)

Click Range, and then type 0 in the upper box and 49.9 in the lower box.

Check/tick the Output variables are strings box (located on the lower right side of this
window).

Click the Value box, and type uppercase F in the box; then click Add.

Click the Range box, and then type 50 in the upper box and 69.9 in the lower box.

Click the Value box, and type uppercase D in the box; then click Add.

Click the Range box, and then type 70 in the upper box and 79.9 in the lower box.

Click the Value box, and type uppercase C in the box; then click Add.

Click the Range box, and then type 80 in the upper box and 89.9 in the lower box.

Click the Value box, and type uppercase B in the box; then click Add.

Click the Range box, and then type 90 in the upper box and 100 in the lower box.

Click the Value box, and type uppercase A in the box.

Click Add. Click Continue, and then click OK. Output Viewer opens. (Note that only some file
information appears in the Output Viewer.)

DATA TRANSFORMATION
Examples of transformation: the square root transformation, the logarithmic
transformation, and the inverse (reciprocal) transformation.
7

Computing Square Root

Click Transform, >Compute variable. A window titled Compute Variable will open.

In the Target Variable box, type sqrtexam1(name of new variable to hold the sqrt

In the panel titled Function Group on the right, click Arithmetic. In the lower panel titled
Functions and Special Variables, scroll down and click Sqrt.

Click the upward-pointing arrow to place SQRT in the Numeric Expression box.

In the left panel, click the variable to find the square root, and then click the right arrow
to place it in the parentheses following SQRT in the Numeric Expression box. Click OK.

FILE MANAGEMENT FUNCTIONS

SAVING FILE: FILE>SAVE/SAVE AS


FILE FORMATS: FILE FORMATS: .SAV .DAT .XLS .SPV(OUTPUT) .SPS(SYNTAX)

EXPORT VIEWER OUTPUT TO OTHER FORMAT


FILE>EXPORT>BROWSE> CHOSE A NAME AND FORMAT>SAVE

PRINT
FILE>PRINT

GRAPHS - Chart Builder

Click Graphs > Chart Builder.

A small window may or may not open titled Chart Builder, then click OK.

Two windows open, one next to the other. The one on the left is titled Chart Builder
(it is a different window from the one having the same name in the prior step), and
8

the other is called Element Properties. You can activate one or the other by simply
clicking it

Click the Chart Builder window ; Click Gallery , Click Bar , Double click the Simple Bar
found on the right to move a simple bar to the Chart preview window located above,

Click and drag the desired variable (eg. gender) to the box titled X-Axi found in the Chart
preview

Click OK. Your graph of the nominal variable appears in the Output Viewer.

You might also like