Post on 21-Jan-2018
Zagazig university
Faculty of Veterinary Medicine
Animal Wealth Development Department
Session#2:
Starting SPSS
M.Afifi
M.Sc., Biostatistics (Joint Supervision with ISSR, Cairo University)
Ph.D., Candidate (AVC, UPEI, Canada)
E-mail: M.Afifi.edu.zu.eg, Afifi-stat6@hotmail.com
Tel: +201060658185
Good Morning
S P S S
Statistical Package for the Social Sciences
SPSS is
A software package (program) used for statistical analysis.
Long produced by SPSS Inc., (Incorporation )it was acquired by IBM in 2009
($ 1.2 billion in cash). The current versions (2014) are officially named IBM
SPSS Statistics.
widely used for statistical analysis in social science, market researchers, health
researchers, survey companies, government, education researchers, marketing,
data miners
Why SPSS???
Popular and has been used extensively in medical and biological
researches.
More user-friendly GUI (data analysis presentation) than other
statistical software (e.g., S-Plus, R, SAS) (Drop down menus not
commands!).
Contain all statistical procedures which the researcher is in need
Installation
Check your OS
Installation
Opening SPSS
Double Click on SPSS Icon
Two main SPSS windows
SPSS data editor
Spreadsheet for creating,
editing, and viewing data.
Output window
Opens after completion of the computations.
Results of SPSS operations
(Tables & Graphs)
SPSS data editor
2 Views
Variable
- Characteristic that takes on different values or varies;
- Columns of the data set
Case
- Observation, value taken
by variable
- Rows of a data set.
Data editor has two “views”
Data View Shows actual data values
Variable View Shows variable information for all
variables.
Two tabs at on the bottom of the left hand side switching between
them.
Variables
Cases
3 Variables
Breed
Milk yield
Udder size
Case 1= 1st cow
under study
No. of cases = no. of experimental units e.g. individuals -animals
Data View
Variable View
Variable View
create variable names and define the attributes of each variable.
Name name for each variable.
only of letters, and the underbar (_)
No pure numbers - space - dot .
Type specify type the variable. string or numeric type.
Width space the entries in the Data View will be for this variable.
Decimals decimal places will be shown for this variable in the Data View.
Label give a variable a label or title. makes all output much more readable.
Values specify numerical values for each category of categorical variable.
For example for the variable SEX 1 for Male, 2 for Females .
Missing specify values for a variable indicate missing data.
Columns spaces will be allocated for the variable in the Data View. different
from width in that width limits the number of spaces for the actual number.
Columns limits how many spaces will be visible in the Data View.
Align either left aligns, centers, or right aligns the entries for the variable.
Measure type of variable.
A scale variable is a quantitative variable.
An ordinal variable categorical variable where the categories have a
natural order such as poor, fair, good, better, best.
A nominal variable categorical variable no natural order to the categories,
such as male, female.
Entering and Saving Data
Data entry
Directly into SPSS
.sav file
Excel spreadsheet
(.xls, .xlsx)
SPSS
SPSS Importing functionCut and paste
method
Data in TEXT (.txt) or DATA file(.dat) can also used through Import command
FILE >> OPEN >> DATA then change FILES OF TYPE to TEXT or
DATA, click on:
Practical Example
7.4.4 Example
Consider the comparison of the mean body weights at the time of mating in one
group of ewes which have been flushed (put on a high plane of nutrition for 2–3
weeks prior to mating) and another group which have not. Each ewe in a random
sample of 54 ewes is randomly allocated to the flushed or control group. Table
7.2 shows the weights of two samples of 24 flushed and 30 control ewes.
How many variables in this data set ?
2 Variables:
Ewe Weight (Quantitative)
Group (Qualitative): 0;Flushed, 1;control
Open Data entry.xlxs
Assign values for categorical variable for example
Flushed Control
0 1
1 2
So Open blank SPSS spread sheet >> Click variable view to define variable
Copy and Paste Method
Variable View
Name
Default Var
Ewe
Diet
Decimal (according to values of the variable under the study variable.)
Type
Numeric
String
Label (Optional)
Ewe Body Weight
Values (to code for levels of qualitative variable)
Diet
0 Flushed
1 Control
Value Label Dialogue box:
Type 1 in Value box
Drug A or A in Label box
Click Add button
Continue to enter codes for the 5 drugs using Add repeatedly
Click Ok
Missing (none)
(Formatting Options)
Width (default)
Column (default)
Align (default) (center) is preferable
Measure
Ewe Scale
Diet Nominal
Switch to data View
Enter the values
To enter the data the codes you have made using down or Enter button to pass
through the cases
For Titer variable
Open Excel Sheet
Copy Titer column for each drug
Paste it in the corresponding cases on SPSS
Finally save your SPSS file (sav.)
From File menu: Save or Save as
Importing From SPSS
Open blank SPSS Sheet
File >> Open>> Data
Navigate the folder containing the file you want Data set1 (Data entry)
Change File type to Excel (xls, xlsx, xlsm)
Select IBD titre.xlsx >> Open
Important Notes
If the variable names were in the first row, make sure this box (see blue arrow)
is checked. Otherwise, leave it unchecked.
If your excel file has multiple sheets, use Worksheets to make sure you have the
right one (by default it will usually be right) (Red arrow)
Then Click OK
Bibliographic citations
Popular APA system considered a formal reference or bibliographic citation is
not necessary. And that, SPSS is considered sufficiently well known that only the
version or release number is required.
You can see the precise release number by clicking on Help>About in the menus.
If you need to include a citation, versions produced by SPSS Inc. prior to the IBM acquisition (Versions 18 and earlier)
would be given an origin or publisher of SPSS Inc. in Chicago. Versions released after the acquisition would be given an
origin or publisher of IBM Corp. in Armonk, NY. For example:
SPSS Inc. Released 2007. SPSS for Windows, Version 16.0. Chicago, SPSS Inc.
SPSS Inc. Released 2008. SPSS Statistics for Windows, Version 17.0. Chicago: SPSS Inc.
SPSS Inc. Released 2009. PASW Statistics for Windows, Version 18.0. Chicago: SPSS Inc.
IBM Corp. Released 2010. IBM SPSS Statistics for Windows, Version 19.0. Armonk, NY: IBM Corp.
IBM Corp. Released 2011. IBM SPSS Statistics for Windows, Version 20.0. Armonk, NY: IBM Corp.
IBM Corp. Released 2012. IBM SPSS Statistics for Windows, Version 21.0. Armonk, NY: IBM Corp.
IBM Corp. Released 2013. IBM SPSS Statistics for Windows, Version 22.0. Armonk, NY: IBM Corp.