Statrting spss

52
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, [email protected] Tel: +201060658185

Transcript of Statrting spss

Page 1: Statrting spss

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, [email protected]

Tel: +201060658185

Page 2: Statrting spss

Good Morning

Page 3: Statrting spss

S P S S

Statistical Package for the Social Sciences

Page 4: Statrting spss

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

Page 5: Statrting spss

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

Page 6: Statrting spss

Installation

Check your OS

Page 7: Statrting spss

Installation

Page 8: Statrting spss

Opening SPSS

Double Click on SPSS Icon

Page 9: Statrting spss

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)

Page 10: Statrting spss

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.

Page 11: Statrting spss

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.

Page 12: Statrting spss

Variables

Cases

Page 13: Statrting spss

3 Variables

Breed

Milk yield

Udder size

Case 1= 1st cow

under study

No. of cases = no. of experimental units e.g. individuals -animals

Page 14: Statrting spss

Data View

Page 15: Statrting spss

Variable View

Page 16: Statrting spss

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.

Page 17: Statrting spss

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.

Page 18: Statrting spss

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.

Page 19: Statrting spss

Entering and Saving Data

Page 20: Statrting spss

Data entry

Directly into SPSS

.sav file

Excel spreadsheet

(.xls, .xlsx)

SPSS

SPSS Importing functionCut and paste

method

Page 21: Statrting spss

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:

Page 22: Statrting spss

Practical Example

Page 23: Statrting spss

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.

Page 24: Statrting spss
Page 25: Statrting spss

How many variables in this data set ?

Page 26: Statrting spss

2 Variables:

Ewe Weight (Quantitative)

Group (Qualitative): 0;Flushed, 1;control

Page 27: Statrting spss

Open Data entry.xlxs

Assign values for categorical variable for example

Flushed Control

0 1

1 2

Page 28: Statrting spss

So Open blank SPSS spread sheet >> Click variable view to define variable

Page 29: Statrting spss

Copy and Paste Method

Page 30: Statrting spss
Page 31: Statrting spss

Variable View

Page 32: Statrting spss

Name

Default Var

Ewe

Diet

Page 33: Statrting spss

Decimal (according to values of the variable under the study variable.)

Page 34: Statrting spss

Type

Numeric

String

Page 35: Statrting spss

Label (Optional)

Ewe Body Weight

Page 36: Statrting spss

Values (to code for levels of qualitative variable)

Diet

0 Flushed

1 Control

Page 37: Statrting spss

Value Label Dialogue box:

Type 1 in Value box

Drug A or A in Label box

Click Add button

Page 38: Statrting spss

Continue to enter codes for the 5 drugs using Add repeatedly

Click Ok

Page 39: Statrting spss

Missing (none)

Page 40: Statrting spss

(Formatting Options)

Width (default)

Column (default)

Align (default) (center) is preferable

Page 41: Statrting spss

Measure

Ewe Scale

Diet Nominal

Page 42: Statrting spss

Switch to data View

Enter the values

Page 43: Statrting spss

To enter the data the codes you have made using down or Enter button to pass

through the cases

Page 44: Statrting spss

For Titer variable

Open Excel Sheet

Copy Titer column for each drug

Paste it in the corresponding cases on SPSS

Page 45: Statrting spss

Finally save your SPSS file (sav.)

From File menu: Save or Save as

Page 46: Statrting spss

Importing From SPSS

Open blank SPSS Sheet

File >> Open>> Data

Page 47: Statrting spss

Navigate the folder containing the file you want Data set1 (Data entry)

Change File type to Excel (xls, xlsx, xlsm)

Page 48: Statrting spss

Select IBD titre.xlsx >> Open

Page 49: Statrting spss

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

Page 50: Statrting spss

Bibliographic citations

Page 51: Statrting spss

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.

Page 52: Statrting spss

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.