SlideShare una empresa de Scribd logo
1 de 43
2- DAYS WORKSHOP ON SPSS SYNTAX
(28th and 29th October, 2010)
Organized by: Indian Institute of Psychometry,
Kolkata
Dr. Debdulal Dutta Roy, Ph.D.
Psychology Research Unit
Indian Statistical Institute, Kolkata
Dr. D. Dutta Roy, ISI., Kolkata
What is SPSS ?
 Initially, SPSS is
considered as
statistical package for
social sciences. But it
is noted that SPSS is
used by many non
social scientists.
Therefore it is
considered as
software for statistical
data analysis. Now,
SPSS is managed by
IBM.
ICONS OF SPSS
Dr. D. Dutta Roy, ISI., Kolkata
SPSS facilities
 The software includes several facilities as
 File management
 creating new file, opening spss formatted file, extracting non SPSS file,
merging file, splitting file, transposing data
 Variable management
 creating new variables, recoding variable
 Case management
 adding cases, select cases, sorting cases
 Text data analysis or Text analytics
 text categorization, text clustering, concept/entity extraction, document
summarization, and entity relation modeling (i.e., learning relations between
named entities).
 Numeric data analysis
 Describing the data, data quality or fitting the data into statistical models,
data association, data clustering, data reliability and validity using different
statistical tools.
Dr. D. Dutta Roy, ISI., Kolkata
SPSS WORKSHEET
 Variable view
 Data view
 Create variables :
 Name :
 Type : String, Numeric, Comma and others
 Width : Length of digit
 Decimal:
 Label: Meaning of variable code name
 Values: m=male, f=female or 1=male and 2=female
 Missing: np/ 9/99/ extreme values
 Columns :
 Align : left, right, center
 Measure: nominal, ordinal, scale
Dr. D. Dutta Roy, ISI., Kolkata
Assignment
 In SPSS worksheet
 Prepare worksheet with five variables as gender, first
name, middle name , surname and age.
 Prepare list of names.
 Examine their distribution using graphs and tables.
 Retrieving data from excel
 Retrieving data from note pad
 Write in this way <Ms., Ratna, kumari, Roy, 25> in
the note pad. Retrieve the list using SPSS command
Dr. D. Dutta Roy, ISI., Kolkata
Assignment
Cross tabulation is useful to determine
association of two categorical variables.
 Prepare spss worksheet to compute cross
tabulation between gender and anxiety.
 Use both text and numeric data.
 Compute chi-square.
Dr. D. Dutta Roy, ISI., Kolkata
Solution
Dr. D. Dutta Roy, ISI., Kolkata
Summary -1
 SPSS is useful software for analysis of both text
and numeric data.
 SPSS worksheet has two windows – data
window and value window. Later is used to
customize the variable.
 The data saved in SPSS file can be transformed
to Excel or text.
 Again, the data saved in Excel or in text format
can be retrieved into SPSS worksheet.
Dr. D. Dutta Roy, ISI., Kolkata
SPSS - SYNTAX
Dr. D. Dutta Roy, ISI., Kolkata
What is SPSS-Syntax ?
 Syntax is a set of rules that are associated with the
language or command. SPSS syntax is useful for data
management and archiving the procedure of data
analysis. In the dissertation, presence of syntax helps
examiner to understand the procedure followed by the
researcher.
 The syntax can be written in notepad and in word
document. SPSS syntax is the alternative to the point
and click mode.
 It is more user friendly as user can do repetitive tasks
using syntax and can see what procedures are followed
by him for data analysis.
Dr. D. Dutta Roy, ISI., Kolkata
Problems of point and click
 Point and click procedure provides many information.
Sometimes they are not relevant to researcher.
Researcher can restrict analytical information according
to needs.
 Point and click procedure varies with different interfaces
or versions of SPSS. But syntax works well in almost all
the versions.
 Statistical tool not available in SPSS can be developed by
syntax if author knows how to write syntax for example,
moderated regression analysis.
Dr. D. Dutta Roy, ISI., Kolkata
Syntax error
 A syntax error occurs when the researcher
or individual who wrote the code had not
followed the rules of the language, the
flow chart, causing the program to fail.
 The common error is missing terminator
and columns for the command line.
General command is first line starts at the
first column and the others are in the
second line starts at second column.
Dr. D. Dutta Roy, ISI., Kolkata
Syntax window
Command
Terminator
Dr. D. Dutta Roy, ISI., Kolkata
ASSIGNMENT
 Write the below in syntax window and run the
program.
 DESCRIPTIVES VARIABLES = ABANY ABDEFECT
ABHLTH ABNOMORE ABPOOR ABRAPE
ABSINGLE ADULTS AGE
 /STATISTICS=MEAN STDDEV.
Observation:
Do you get your results ? If not, what is missing ?
Put terminators in both lines and run the program.
What is your observation ?
Can you find out continuation line ?
Dr. D. Dutta Roy, ISI., Kolkata
Summary -2
 Syntax rule guides program in analysis of
data according to user needs.
 Statements are written systematically
following syntax rules in syntax window .
 One can control unnecessary output by
using syntax.
Dr. D. Dutta Roy, ISI., Kolkata
FLOW CHART
Dr. D. Dutta Roy, ISI., Kolkata
What is flow chart ?
 The flowchart is a
means of visually
presenting the flow of
data through an
information
processing systems,
the operations
performed within the
system and the
sequence in which
they are performed.
Dr. D. Dutta Roy, ISI., Kolkata
Standard symbols
 Start or end of the program
 Computational steps or
processing function of a
program
 Input or output operation
 Decision making and
branching
 Connector or joining of two
parts of program
Dr. D. Dutta Roy, ISI., Kolkata
Guidelines of flow charting
In drawing a proper flowchart, all necessary requirements
should be listed out in logical order.
The flowchart should be clear, neat and easy to follow. There
should not be any room for ambiguity in understanding
the flowchart.
 The usual direction of the flow of a procedure or system
is from left to right or top to bottom.
 Only one flow line should come out from a process
symbol.
 Only one flow line should enter a decision symbol, but
two or three flow lines, one for each possible answer,
should leave the decision symbol.
 Only one flow line is used in conjunction with terminal
symbol.
 Write within standard symbols briefly. As necessary, you
can use the annotation symbol to describe data or
computational steps more clearly.
 If the flowchart becomes complex, it is better to use
connector symbols to reduce the number of flow lines.
Avoid the intersection of flow lines if you want to make
it more effective and better way of communication.
 Ensure that the flowchart has a logical start and finish.
 It is useful to test the validity of the flowchart by
passing through it with a simple test data.
Reference: http://www.nos.org/htm/basic2.htm
Dr. D. Dutta Roy, ISI., Kolkata
Flow chart of correlations
INPUT TWO
SETS OF
METRIC DATA
IS THERE
MISSING DATA ?
DELETE
IS THERE
OUTLIER ?
Y
Y
N
IS STANDARD
DEVIATION = 0 ?
Y
N
DO CORRELATIONS
N
Dr. D. Dutta Roy, ISI., Kolkata
Summary - 3
 Use of any statistical tool requires set of
specific assumptions. Flow chart helps us
to incorporate all the assumptions
systematically. This will reduce errors in
data analysis.
 Therefore, syntax writer should study
thoroughly all the assumptions and their
systematic uses before selection of
statistical tool in analysis.
Dr. D. Dutta Roy, ISI., Kolkata
SYNTAX RULES
Dr. D. Dutta Roy, ISI., Kolkata
Command
Each command must begin in the first column of a
new line.
Continuation lines must be indented at least one
space.
The period at the end of the command is
optional.
If you generate command syntax by pasting dialog
box choices into a syntax window, the format of
the commands is suitable for any mode of
operation.
Dr. D. Dutta Roy, ISI., Kolkata
Variable names
Variable names ending in a period can cause errors in commands
created by the dialog boxes. You cannot create such variable names
in the dialog boxes, and you should generally avoid them.
SPSS command syntax is case insensitive, and three-letter
abbreviations can be used for many command specifications. You
can use as many lines as you want to specify a single command.
You can add space or break lines at almost any point where a single
blank is allowed, such as around slashes, parentheses, arithmetic
operators, or between variable names. For example,
FREQUENCIES
VARIABLES=JOBCAT GENDER
/PERCENTILES=25 50 75
/BARCHART.
and
freq var=jobcat gender /percent=25 50 75 /bar.
Dr. D. Dutta Roy, ISI., Kolkata
Creating new variable
 There are some situations
where in new variable is
to be created in research.
For example, you are
interested to add or
multiply some weight to
any variable or you want
to multiply two variables.
 Use COMPUTE command
 EXERCISE
* age2 is new variable
COMPUTE age2=Age - 5.
EXECUTE.
DESCRIPTIVES
VARIABLES=age, age2
/STATISTICS=MEAN
STDDEV MIN MAX.
Descriptive Statistics
N
Minimu
m
Maximu
m Mean
Std.
Deviatio
n
Age 542 7 15 9.54 1.117
age2 542 2 10 4.5406 1.11667
Valid N (listwise) 542
Dr. D. Dutta Roy, ISI., Kolkata
Finding out lost file
Researcher sometimes forgets the location
of file using click menu. He can find the
file using ‘GET FILE’ syntax.
 Get the file
File>new>syntax
Write below syntax
GET FILE=‘c:windowsdesktopddr.sav’.
Dr. D. Dutta Roy, ISI., Kolkata
Check your file
 You can check validity of lost file using DISPLAY
command. This will help you to get the variable names.
 GET FILE='E:ses_data_final.sav'.
* Display all variables
DISPLAY.
/* Display data of all variables
LIST
/* Display data of single variable
LIST VARIABLES = <var1>.
 Here * is used for beginning comment and /* is used for
middle comment.
Dr. D. Dutta Roy, ISI., Kolkata
Data checking by total score
 Data checking is made using if
command. Box 8.5 represents
syntax for checking the data. Here
is the assumption that total score
should not be more than 10.
Therefore the command
‘if(total>10) t2=9’ is used. After the
if command, execute command
with period sign (.) is necessary.
Output file is saved in the specific
location finally.
 Exercise
GET File=
'E:ses_data_final.sav'.
if(total>10) t2=9.
Execute.
LIST variables=name, total, t2.
save outfile='e:sesout.sav'.
Output
NAME total t2
TANIA PARVIN 8 .00
BACCHU MONDAL 9 .00
HABIBUL ISLAM 9 .00
KARIM RAHAMAN 10 .00
AKTAR HUSSAIN 10 .00
LALTU MONDAL 10 .00
RAHIM RAHAMAN 10 .00
NOOR ALAM 10 .00
***** 11 9.00
SADIK JAMAL 12 9.00
TAJMIR KHATUN 8 .00
FIROJ MONDAL . .
Dr. D. Dutta Roy, ISI., Kolkata
Is your data good for analysis ?
Data entry error is a serious concern
for analysis of data. Extreme data
or outlier is assumed as error.
Presence of outlier sometimes
changes mean and standard
deviation. SD becomes higher
than mean. It is not necessary to
delete the outlier first as outlier
sometimes provide valid
information. It gives you
information about inequality in
distribution of data. But finding
out the outlier is important. Box
whisker plot is useful to find out
outlier.
Write this in syntax window:
EXAMINE VARIABLES=abany abd
efect
/COMPARE VARIABLE
/PLOT=BOXPLOT
/STATISTICS=NONE
/NOTOTAL
/MISSING=LISTWISE.
 Another way is to study
frequencies of variables.
Frequencies variables=abany.
Dr. D. Dutta Roy, ISI., Kolkata
How can you find out case error?
 Box-whisker plot sometimes can
not find out the cases who have
done systematic error. Suppose
you have collected job satisfaction
data using five point rating scale
of 20 items where in 10 items are
in reverse. And one case assigns 3
across all the items. Box plot can
not locate the case.
 Under such condition, you can
transpose the data and compute
mean and SD for each case. Case
error can be identified if SD is
0.00 or is higher than mean. By
using FLIP command you can
transpose the data.
EXERCISE
FLIP VARIABLES=
DESCRIPTIVES
VARIABLES=
Dr. D. Dutta Roy, ISI., Kolkata
Relational operator
 Relational operator is
used to compare values.
It is used with if
command
 A relation is a logical
expression that compares
two values using a
relational operator. In the
command
 IF (X EQ 0) Y=1 the
variable X and 0 are
expressions that yield the
values to be compared by
the EQ relational
operator. The following
are the relational
operators:
Symbol Definition
EQ or = Equal to
NE or ~= or ¬ = or <> Not equal to
LT or < Less than
LE or <= Less than or equal to
GT or > Greater than
GE or >= Greater than or equal to
Dr. D. Dutta Roy, ISI., Kolkata
Select case
When researcher wants to compute specific
statistics for specific cases, the command
select case is useful.
SELECT IF (AGE=8).
DESCRIPTIVES VARIABLES=ACH.
Dr. D. Dutta Roy, ISI., Kolkata
Command to filter variable
Researcher can analyze the data of specific group. Box 8.2 shows
syntax for descriptive statistics of age for the cases who are living in
specific block of district (code=1).
USE ALL.
COMPUTE filter_$=(Block_code=1).
VARIABLE LABEL filter_$ 'Block_code=1 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMAT filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.
DATASET ACTIVATE DataSet1.
DESCRIPTIVES variables=age.
Dr. D. Dutta Roy, ISI., Kolkata
Summary -4
 Syntax rules are important to write the
programs in syntax window.
 By writing the programs, one can import
and export file, check file, list variables,
evaluate data entry error, create new
variable, select case and filter variable.
Dr. D. Dutta Roy, ISI., Kolkata
STATISTICAL ANALYSIS
Dr. D. Dutta Roy, ISI., Kolkata
Item-item correlation of
five point rating scale
GET
FILE='C:UsersddroyDesktopIIP_SPSS
syntax_workshopinnovation data.sav'.
CORRELATIONS
/VARIABLES=AW1 AW2 AW6 AW10 AW18
AW19
/PRINT=TWOTAIL NOSIG
/MISSING=PAIRWISE.
 There are 6 items measuring
awareness of environment. It
is assumed that 6 items are
related to each other. One can
use AW1 TO AW19 also.
 This program assesses inter
correlation among 6 items.
 Pair wise missing data are
deleted and level of
significance is shown.
 Two tail is applicable when
direction of relationship is not
pre assumed.
 NOSIG is used to flag
significant values.
Dr. D. Dutta Roy, ISI., Kolkata
Item total correlations
GET
FILE='C:UsersddroyDesktopIIP_
SPSS syntax_workshopinnovation
data.sav'.
compute total=AW1+ AW2+ AW6 +A
W10 +AW18+ AW19.
CORRELATIONS
/VARIABLES=AW1 to AW19, total
/PRINT=TWOTAIL NOSIG
/MISSING=PAIRWISE.
 Compute command is
used to determine
total score. Later it is
used for item total
correlation.
Dr. D. Dutta Roy, ISI., Kolkata
Multiple regression
GET
FILE='C:UsersddroyDesktopIIP_SPSS
syntax_workshopinnovation data.sav'.
compute total=AW1+ AW2+ AW6 +AW10
+AW18+ AW19.
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA CHANGE
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT total
/METHOD=ENTER AW1 AW2 AW6 AW10 AW18.
Run command should
select all otherwise
total score will not be
used.
In this model total
score is predicted by
each item.
Dr. D. Dutta Roy, ISI., Kolkata
Mean differences
When data were collected from two
different groups. Command of
independent t-test is
T-TEST GROUPS=IC3(3)
/MISSING=LISTWISE
/VARIABLES=total
/CRITERIA=CI(.9500).
 Here IC3 is independent
variable and total is
dependent variable.
 Ic3 (3) indicates 3 as cut
off points to make two
different groups.
 IC3(1 2) indicates
categorization based on
value 1 and 2.
Dr. D. Dutta Roy, ISI., Kolkata
Chi-square statistics
CROSSTABS
/TABLES=AW1 BY AW2
/FORMAT=AVALUE TABLES
/STATISTICS=CHISQ PHI
/CELLS=COUNT
/COUNT ROUND CELL.
 This examines association
between items . For multiple
items command is
 TABLES=AW1 BY AW2 AW10
AW18 AW19 AW6
 In above AW1 IS ROW AND
OTHERS ARE IN COL.
Dr. D. Dutta Roy, ISI., Kolkata
One-WAY ANOVA
ONEWAY total BY EXP
/MISSING ANALYSIS.
 Here total is
dependent variable
 EXP is independent
variable.
Dr. D. Dutta Roy, ISI., Kolkata
COMPUTE SIZE OF SAMPLE
/*-----------------------------
GETTING INPUT FILE----------------------
-------------------- .
GET
FILE='C:UsersddroyDesktopIIP_SPSS
syntax_workshopinnovation data.sav'.
/*-----------------------------
SIZE OF SAMPLE --------------------------
---------------- .
compute n=0.
compute n=n+1.
descriptives n, AW1.
 n=0 indicates initialization.
N=n+1 indicates summing value
following loop.
DESCRIPTIVES <n, AW1> indicates
comparison between computed n
and aw1.
 Here AW1 (numeric type and
scaling measure) is used to verify
the computed N or size of sample.
Dr. D. Dutta Roy, ISI., Kolkata
Summary - 5
 SPSS-Syntax makes the researcher more
systematic in analysis of data. Researcher
can fulfill all the assumptions of statistical
tool systematically by writing the
programs.
 The compute command is very powerful
as it assists researcher to write own
program for analysis of data.
Dr. D. Dutta Roy, ISI., Kolkata

Más contenido relacionado

La actualidad más candente

Research methodology unit6
Research methodology unit6Research methodology unit6
Research methodology unit6Aman Adhikari
 
Data Creation and Importing in IBM SPSS
Data Creation and Importing in IBM SPSSData Creation and Importing in IBM SPSS
Data Creation and Importing in IBM SPSSThiyagu K
 
Displaying data using charts and graphs
Displaying data using charts and graphsDisplaying data using charts and graphs
Displaying data using charts and graphsCharles Flynt
 
Pivot table presentation
Pivot table presentationPivot table presentation
Pivot table presentationSha Tibnjn
 
Graph Algorithms
Graph AlgorithmsGraph Algorithms
Graph AlgorithmsAshwin Shiv
 
Apa style 7th edition
Apa style 7th editionApa style 7th edition
Apa style 7th editioneogrady1
 
Advanced Microsoft Excel
Advanced Microsoft ExcelAdvanced Microsoft Excel
Advanced Microsoft ExcelEric Metelka
 
Chi square tests using SPSS
Chi square tests using SPSSChi square tests using SPSS
Chi square tests using SPSSParag Shah
 
Data Analytics Using MS Excel
Data Analytics Using MS ExcelData Analytics Using MS Excel
Data Analytics Using MS ExcelRajesh Math
 
Data array and frequency distribution
Data array and frequency distributionData array and frequency distribution
Data array and frequency distributionraboz
 
Research methods
Research methodsResearch methods
Research methodskbolinsky
 
Excel for research
Excel  for researchExcel  for research
Excel for researchJamalBhai
 
univariate and bivariate analysis in spss
univariate and bivariate analysis in spss univariate and bivariate analysis in spss
univariate and bivariate analysis in spss Subodh Khanal
 
SPSS How to use Spss software
SPSS How to use Spss softwareSPSS How to use Spss software
SPSS How to use Spss softwareDebashis Baidya
 
MS Excel Pivot Table Reports & Charts
MS Excel Pivot Table Reports & ChartsMS Excel Pivot Table Reports & Charts
MS Excel Pivot Table Reports & Chartsdnbakhan
 
Statistical analysis, presentation on Data Analysis in Research.
Statistical analysis, presentation on Data Analysis in Research.Statistical analysis, presentation on Data Analysis in Research.
Statistical analysis, presentation on Data Analysis in Research.Leena Gauraha
 

La actualidad más candente (20)

Research methodology unit6
Research methodology unit6Research methodology unit6
Research methodology unit6
 
Data Creation and Importing in IBM SPSS
Data Creation and Importing in IBM SPSSData Creation and Importing in IBM SPSS
Data Creation and Importing in IBM SPSS
 
Displaying data using charts and graphs
Displaying data using charts and graphsDisplaying data using charts and graphs
Displaying data using charts and graphs
 
Pivot table presentation
Pivot table presentationPivot table presentation
Pivot table presentation
 
Graph Algorithms
Graph AlgorithmsGraph Algorithms
Graph Algorithms
 
Apa style 7th edition
Apa style 7th editionApa style 7th edition
Apa style 7th edition
 
SPSS
SPSSSPSS
SPSS
 
Advanced Microsoft Excel
Advanced Microsoft ExcelAdvanced Microsoft Excel
Advanced Microsoft Excel
 
Chi square tests using SPSS
Chi square tests using SPSSChi square tests using SPSS
Chi square tests using SPSS
 
Data Management in Excel
Data Management in ExcelData Management in Excel
Data Management in Excel
 
Data Analytics Using MS Excel
Data Analytics Using MS ExcelData Analytics Using MS Excel
Data Analytics Using MS Excel
 
Data array and frequency distribution
Data array and frequency distributionData array and frequency distribution
Data array and frequency distribution
 
Research methods
Research methodsResearch methods
Research methods
 
Excel for research
Excel  for researchExcel  for research
Excel for research
 
univariate and bivariate analysis in spss
univariate and bivariate analysis in spss univariate and bivariate analysis in spss
univariate and bivariate analysis in spss
 
SPSS How to use Spss software
SPSS How to use Spss softwareSPSS How to use Spss software
SPSS How to use Spss software
 
USING VLOOKUP FUNCTION
USING VLOOKUP FUNCTIONUSING VLOOKUP FUNCTION
USING VLOOKUP FUNCTION
 
Spss training notes
Spss training notesSpss training notes
Spss training notes
 
MS Excel Pivot Table Reports & Charts
MS Excel Pivot Table Reports & ChartsMS Excel Pivot Table Reports & Charts
MS Excel Pivot Table Reports & Charts
 
Statistical analysis, presentation on Data Analysis in Research.
Statistical analysis, presentation on Data Analysis in Research.Statistical analysis, presentation on Data Analysis in Research.
Statistical analysis, presentation on Data Analysis in Research.
 

Destacado

Psychoinformatics in management
Psychoinformatics in managementPsychoinformatics in management
Psychoinformatics in managementD Dutta Roy
 
Teaching pedagogy
Teaching pedagogyTeaching pedagogy
Teaching pedagogyD Dutta Roy
 
Problems and solution of Technology Adoption in Agriculture
Problems and solution of Technology Adoption in AgricultureProblems and solution of Technology Adoption in Agriculture
Problems and solution of Technology Adoption in AgricultureD Dutta Roy
 
Psychological data science
Psychological data sciencePsychological data science
Psychological data scienceD Dutta Roy
 
Geriatric, Need hierarchy, Psychology
Geriatric, Need hierarchy, PsychologyGeriatric, Need hierarchy, Psychology
Geriatric, Need hierarchy, PsychologyD Dutta Roy
 
Performing Art Therapy in Geriatric Care
Performing Art Therapy in Geriatric CarePerforming Art Therapy in Geriatric Care
Performing Art Therapy in Geriatric CareD Dutta Roy
 
HIV AIDS presentation
HIV AIDS presentationHIV AIDS presentation
HIV AIDS presentationjschmied
 

Destacado (8)

Psychoinformatics in management
Psychoinformatics in managementPsychoinformatics in management
Psychoinformatics in management
 
Teaching pedagogy
Teaching pedagogyTeaching pedagogy
Teaching pedagogy
 
Problems and solution of Technology Adoption in Agriculture
Problems and solution of Technology Adoption in AgricultureProblems and solution of Technology Adoption in Agriculture
Problems and solution of Technology Adoption in Agriculture
 
Psychological data science
Psychological data sciencePsychological data science
Psychological data science
 
Geriatric, Need hierarchy, Psychology
Geriatric, Need hierarchy, PsychologyGeriatric, Need hierarchy, Psychology
Geriatric, Need hierarchy, Psychology
 
Performing Art Therapy in Geriatric Care
Performing Art Therapy in Geriatric CarePerforming Art Therapy in Geriatric Care
Performing Art Therapy in Geriatric Care
 
Stress theories
Stress theoriesStress theories
Stress theories
 
HIV AIDS presentation
HIV AIDS presentationHIV AIDS presentation
HIV AIDS presentation
 

Similar a SPSS-SYNTAX

Data processing & Analysis: SPSS an overview
Data processing & Analysis: SPSS an overviewData processing & Analysis: SPSS an overview
Data processing & Analysis: SPSS an overviewATHUL RAVI
 
A Metadata-Driven Approach to Computing Financial Analytics in a Relational D...
A Metadata-Driven Approach to Computing Financial Analytics in a Relational D...A Metadata-Driven Approach to Computing Financial Analytics in a Relational D...
A Metadata-Driven Approach to Computing Financial Analytics in a Relational D...inscit2006
 
Data science | What is Data science
Data science | What is Data scienceData science | What is Data science
Data science | What is Data scienceShilpaKrishna6
 
Accounting serx
Accounting serxAccounting serx
Accounting serxzeer1234
 
Accounting serx
Accounting serxAccounting serx
Accounting serxzeer1234
 
Topic 4 intro spss_stata
Topic 4 intro spss_stataTopic 4 intro spss_stata
Topic 4 intro spss_stataSM Lalon
 
Automated Essay Grading using Features Selection
Automated Essay Grading using Features SelectionAutomated Essay Grading using Features Selection
Automated Essay Grading using Features SelectionIRJET Journal
 
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdfExploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdfJamieDornan2
 
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdfExploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdfStephenAmell4
 
Presentaion on data structure mms-a-28
Presentaion on  data structure mms-a-28Presentaion on  data structure mms-a-28
Presentaion on data structure mms-a-28KhanSayeed2
 
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionary
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionarySe 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionary
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionarybabak danyal
 
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdfExploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdfJamieDornan2
 
Exploratory Data Analysis
Exploratory Data AnalysisExploratory Data Analysis
Exploratory Data AnalysisKaty Allen
 
Library management sytem
Library management sytemLibrary management sytem
Library management sytemashu6
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresSteven Johnson
 

Similar a SPSS-SYNTAX (20)

Data processing & Analysis: SPSS an overview
Data processing & Analysis: SPSS an overviewData processing & Analysis: SPSS an overview
Data processing & Analysis: SPSS an overview
 
Uses of SPSS and Excel to analyze data
Uses of SPSS and Excel   to analyze dataUses of SPSS and Excel   to analyze data
Uses of SPSS and Excel to analyze data
 
A Metadata-Driven Approach to Computing Financial Analytics in a Relational D...
A Metadata-Driven Approach to Computing Financial Analytics in a Relational D...A Metadata-Driven Approach to Computing Financial Analytics in a Relational D...
A Metadata-Driven Approach to Computing Financial Analytics in a Relational D...
 
Data science | What is Data science
Data science | What is Data scienceData science | What is Data science
Data science | What is Data science
 
UNIT 4.pptx
UNIT 4.pptxUNIT 4.pptx
UNIT 4.pptx
 
Accounting serx
Accounting serxAccounting serx
Accounting serx
 
Accounting serx
Accounting serxAccounting serx
Accounting serx
 
Topic 4 intro spss_stata
Topic 4 intro spss_stataTopic 4 intro spss_stata
Topic 4 intro spss_stata
 
Spss
SpssSpss
Spss
 
fINAL ML PPT.pptx
fINAL ML PPT.pptxfINAL ML PPT.pptx
fINAL ML PPT.pptx
 
Automated Essay Grading using Features Selection
Automated Essay Grading using Features SelectionAutomated Essay Grading using Features Selection
Automated Essay Grading using Features Selection
 
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdfExploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdf
 
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdfExploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdf
 
Presentaion on data structure mms-a-28
Presentaion on  data structure mms-a-28Presentaion on  data structure mms-a-28
Presentaion on data structure mms-a-28
 
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionary
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionarySe 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionary
Se 381 - lec 21 - 23 - 12 may09 - df-ds and data dictionary
 
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdfExploratory Data Analysis - A Comprehensive Guide to EDA.pdf
Exploratory Data Analysis - A Comprehensive Guide to EDA.pdf
 
Exploratory Data Analysis
Exploratory Data AnalysisExploratory Data Analysis
Exploratory Data Analysis
 
Library management sytem
Library management sytemLibrary management sytem
Library management sytem
 
Sq lite module2
Sq lite module2Sq lite module2
Sq lite module2
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome Measures
 

Más de D Dutta Roy

Inroads to consciousness
Inroads to consciousnessInroads to consciousness
Inroads to consciousnessD Dutta Roy
 
Revisiting the fundamental concepts and assumptions of statistics pps
Revisiting the fundamental concepts and assumptions of statistics ppsRevisiting the fundamental concepts and assumptions of statistics pps
Revisiting the fundamental concepts and assumptions of statistics ppsD Dutta Roy
 
Paradigm shift and measurement issues of subjective well being
Paradigm shift and measurement issues of subjective well beingParadigm shift and measurement issues of subjective well being
Paradigm shift and measurement issues of subjective well beingD Dutta Roy
 
Data visualization in Health related research
Data visualization in Health related researchData visualization in Health related research
Data visualization in Health related researchD Dutta Roy
 
Checklist research and applications
Checklist research and applicationsChecklist research and applications
Checklist research and applicationsD Dutta Roy
 
Research Methodology in management
Research Methodology in management Research Methodology in management
Research Methodology in management D Dutta Roy
 
Socio cultural &amp; socio-economic dimensions pps
Socio cultural &amp; socio-economic dimensions ppsSocio cultural &amp; socio-economic dimensions pps
Socio cultural &amp; socio-economic dimensions ppsD Dutta Roy
 
Happiness & Rabindrik psychotherapy
Happiness &  Rabindrik psychotherapy Happiness &  Rabindrik psychotherapy
Happiness & Rabindrik psychotherapy D Dutta Roy
 
Orientation workshop on Rabindrik Psychotherapy
Orientation workshop on Rabindrik PsychotherapyOrientation workshop on Rabindrik Psychotherapy
Orientation workshop on Rabindrik PsychotherapyD Dutta Roy
 
Discrete data mapping
Discrete data mappingDiscrete data mapping
Discrete data mappingD Dutta Roy
 
Rabindrik psychotherapy rotary
Rabindrik psychotherapy rotaryRabindrik psychotherapy rotary
Rabindrik psychotherapy rotaryD Dutta Roy
 
Clustering of Rabindrik Human Values
Clustering of Rabindrik  Human Values Clustering of Rabindrik  Human Values
Clustering of Rabindrik Human Values D Dutta Roy
 
Workers Education
Workers EducationWorkers Education
Workers EducationD Dutta Roy
 
Tribal education
Tribal educationTribal education
Tribal educationD Dutta Roy
 
Psychiatric classificationshow
Psychiatric classificationshowPsychiatric classificationshow
Psychiatric classificationshowD Dutta Roy
 
Box whisker show
Box whisker showBox whisker show
Box whisker showD Dutta Roy
 
Rabindrik psychotherapy
Rabindrik psychotherapyRabindrik psychotherapy
Rabindrik psychotherapyD Dutta Roy
 
Introduction to Sensation, Perception and Attention
Introduction to Sensation, Perception and AttentionIntroduction to Sensation, Perception and Attention
Introduction to Sensation, Perception and AttentionD Dutta Roy
 
Rabindrasangeet, Psychotherapy, Consciousness, Integral psychology
Rabindrasangeet, Psychotherapy, Consciousness, Integral psychologyRabindrasangeet, Psychotherapy, Consciousness, Integral psychology
Rabindrasangeet, Psychotherapy, Consciousness, Integral psychologyD Dutta Roy
 

Más de D Dutta Roy (20)

Inroads to consciousness
Inroads to consciousnessInroads to consciousness
Inroads to consciousness
 
Revisiting the fundamental concepts and assumptions of statistics pps
Revisiting the fundamental concepts and assumptions of statistics ppsRevisiting the fundamental concepts and assumptions of statistics pps
Revisiting the fundamental concepts and assumptions of statistics pps
 
Paradigm shift and measurement issues of subjective well being
Paradigm shift and measurement issues of subjective well beingParadigm shift and measurement issues of subjective well being
Paradigm shift and measurement issues of subjective well being
 
Data visualization in Health related research
Data visualization in Health related researchData visualization in Health related research
Data visualization in Health related research
 
Checklist research and applications
Checklist research and applicationsChecklist research and applications
Checklist research and applications
 
Research Methodology in management
Research Methodology in management Research Methodology in management
Research Methodology in management
 
Socio cultural &amp; socio-economic dimensions pps
Socio cultural &amp; socio-economic dimensions ppsSocio cultural &amp; socio-economic dimensions pps
Socio cultural &amp; socio-economic dimensions pps
 
Happiness & Rabindrik psychotherapy
Happiness &  Rabindrik psychotherapy Happiness &  Rabindrik psychotherapy
Happiness & Rabindrik psychotherapy
 
Orientation workshop on Rabindrik Psychotherapy
Orientation workshop on Rabindrik PsychotherapyOrientation workshop on Rabindrik Psychotherapy
Orientation workshop on Rabindrik Psychotherapy
 
Discrete data mapping
Discrete data mappingDiscrete data mapping
Discrete data mapping
 
Rabindrik psychotherapy rotary
Rabindrik psychotherapy rotaryRabindrik psychotherapy rotary
Rabindrik psychotherapy rotary
 
Clustering of Rabindrik Human Values
Clustering of Rabindrik  Human Values Clustering of Rabindrik  Human Values
Clustering of Rabindrik Human Values
 
Workers Education
Workers EducationWorkers Education
Workers Education
 
Tribal education
Tribal educationTribal education
Tribal education
 
Psychiatric classificationshow
Psychiatric classificationshowPsychiatric classificationshow
Psychiatric classificationshow
 
Box whisker show
Box whisker showBox whisker show
Box whisker show
 
Rabindrik psychotherapy
Rabindrik psychotherapyRabindrik psychotherapy
Rabindrik psychotherapy
 
Introduction to Sensation, Perception and Attention
Introduction to Sensation, Perception and AttentionIntroduction to Sensation, Perception and Attention
Introduction to Sensation, Perception and Attention
 
Rabindrasangeet, Psychotherapy, Consciousness, Integral psychology
Rabindrasangeet, Psychotherapy, Consciousness, Integral psychologyRabindrasangeet, Psychotherapy, Consciousness, Integral psychology
Rabindrasangeet, Psychotherapy, Consciousness, Integral psychology
 
Reliability
ReliabilityReliability
Reliability
 

SPSS-SYNTAX

  • 1. 2- DAYS WORKSHOP ON SPSS SYNTAX (28th and 29th October, 2010) Organized by: Indian Institute of Psychometry, Kolkata Dr. Debdulal Dutta Roy, Ph.D. Psychology Research Unit Indian Statistical Institute, Kolkata Dr. D. Dutta Roy, ISI., Kolkata
  • 2. What is SPSS ?  Initially, SPSS is considered as statistical package for social sciences. But it is noted that SPSS is used by many non social scientists. Therefore it is considered as software for statistical data analysis. Now, SPSS is managed by IBM. ICONS OF SPSS Dr. D. Dutta Roy, ISI., Kolkata
  • 3. SPSS facilities  The software includes several facilities as  File management  creating new file, opening spss formatted file, extracting non SPSS file, merging file, splitting file, transposing data  Variable management  creating new variables, recoding variable  Case management  adding cases, select cases, sorting cases  Text data analysis or Text analytics  text categorization, text clustering, concept/entity extraction, document summarization, and entity relation modeling (i.e., learning relations between named entities).  Numeric data analysis  Describing the data, data quality or fitting the data into statistical models, data association, data clustering, data reliability and validity using different statistical tools. Dr. D. Dutta Roy, ISI., Kolkata
  • 4. SPSS WORKSHEET  Variable view  Data view  Create variables :  Name :  Type : String, Numeric, Comma and others  Width : Length of digit  Decimal:  Label: Meaning of variable code name  Values: m=male, f=female or 1=male and 2=female  Missing: np/ 9/99/ extreme values  Columns :  Align : left, right, center  Measure: nominal, ordinal, scale Dr. D. Dutta Roy, ISI., Kolkata
  • 5. Assignment  In SPSS worksheet  Prepare worksheet with five variables as gender, first name, middle name , surname and age.  Prepare list of names.  Examine their distribution using graphs and tables.  Retrieving data from excel  Retrieving data from note pad  Write in this way <Ms., Ratna, kumari, Roy, 25> in the note pad. Retrieve the list using SPSS command Dr. D. Dutta Roy, ISI., Kolkata
  • 6. Assignment Cross tabulation is useful to determine association of two categorical variables.  Prepare spss worksheet to compute cross tabulation between gender and anxiety.  Use both text and numeric data.  Compute chi-square. Dr. D. Dutta Roy, ISI., Kolkata
  • 7. Solution Dr. D. Dutta Roy, ISI., Kolkata
  • 8. Summary -1  SPSS is useful software for analysis of both text and numeric data.  SPSS worksheet has two windows – data window and value window. Later is used to customize the variable.  The data saved in SPSS file can be transformed to Excel or text.  Again, the data saved in Excel or in text format can be retrieved into SPSS worksheet. Dr. D. Dutta Roy, ISI., Kolkata
  • 9. SPSS - SYNTAX Dr. D. Dutta Roy, ISI., Kolkata
  • 10. What is SPSS-Syntax ?  Syntax is a set of rules that are associated with the language or command. SPSS syntax is useful for data management and archiving the procedure of data analysis. In the dissertation, presence of syntax helps examiner to understand the procedure followed by the researcher.  The syntax can be written in notepad and in word document. SPSS syntax is the alternative to the point and click mode.  It is more user friendly as user can do repetitive tasks using syntax and can see what procedures are followed by him for data analysis. Dr. D. Dutta Roy, ISI., Kolkata
  • 11. Problems of point and click  Point and click procedure provides many information. Sometimes they are not relevant to researcher. Researcher can restrict analytical information according to needs.  Point and click procedure varies with different interfaces or versions of SPSS. But syntax works well in almost all the versions.  Statistical tool not available in SPSS can be developed by syntax if author knows how to write syntax for example, moderated regression analysis. Dr. D. Dutta Roy, ISI., Kolkata
  • 12. Syntax error  A syntax error occurs when the researcher or individual who wrote the code had not followed the rules of the language, the flow chart, causing the program to fail.  The common error is missing terminator and columns for the command line. General command is first line starts at the first column and the others are in the second line starts at second column. Dr. D. Dutta Roy, ISI., Kolkata
  • 13. Syntax window Command Terminator Dr. D. Dutta Roy, ISI., Kolkata
  • 14. ASSIGNMENT  Write the below in syntax window and run the program.  DESCRIPTIVES VARIABLES = ABANY ABDEFECT ABHLTH ABNOMORE ABPOOR ABRAPE ABSINGLE ADULTS AGE  /STATISTICS=MEAN STDDEV. Observation: Do you get your results ? If not, what is missing ? Put terminators in both lines and run the program. What is your observation ? Can you find out continuation line ? Dr. D. Dutta Roy, ISI., Kolkata
  • 15. Summary -2  Syntax rule guides program in analysis of data according to user needs.  Statements are written systematically following syntax rules in syntax window .  One can control unnecessary output by using syntax. Dr. D. Dutta Roy, ISI., Kolkata
  • 16. FLOW CHART Dr. D. Dutta Roy, ISI., Kolkata
  • 17. What is flow chart ?  The flowchart is a means of visually presenting the flow of data through an information processing systems, the operations performed within the system and the sequence in which they are performed. Dr. D. Dutta Roy, ISI., Kolkata
  • 18. Standard symbols  Start or end of the program  Computational steps or processing function of a program  Input or output operation  Decision making and branching  Connector or joining of two parts of program Dr. D. Dutta Roy, ISI., Kolkata
  • 19. Guidelines of flow charting In drawing a proper flowchart, all necessary requirements should be listed out in logical order. The flowchart should be clear, neat and easy to follow. There should not be any room for ambiguity in understanding the flowchart.  The usual direction of the flow of a procedure or system is from left to right or top to bottom.  Only one flow line should come out from a process symbol.  Only one flow line should enter a decision symbol, but two or three flow lines, one for each possible answer, should leave the decision symbol.  Only one flow line is used in conjunction with terminal symbol.  Write within standard symbols briefly. As necessary, you can use the annotation symbol to describe data or computational steps more clearly.  If the flowchart becomes complex, it is better to use connector symbols to reduce the number of flow lines. Avoid the intersection of flow lines if you want to make it more effective and better way of communication.  Ensure that the flowchart has a logical start and finish.  It is useful to test the validity of the flowchart by passing through it with a simple test data. Reference: http://www.nos.org/htm/basic2.htm Dr. D. Dutta Roy, ISI., Kolkata
  • 20. Flow chart of correlations INPUT TWO SETS OF METRIC DATA IS THERE MISSING DATA ? DELETE IS THERE OUTLIER ? Y Y N IS STANDARD DEVIATION = 0 ? Y N DO CORRELATIONS N Dr. D. Dutta Roy, ISI., Kolkata
  • 21. Summary - 3  Use of any statistical tool requires set of specific assumptions. Flow chart helps us to incorporate all the assumptions systematically. This will reduce errors in data analysis.  Therefore, syntax writer should study thoroughly all the assumptions and their systematic uses before selection of statistical tool in analysis. Dr. D. Dutta Roy, ISI., Kolkata
  • 22. SYNTAX RULES Dr. D. Dutta Roy, ISI., Kolkata
  • 23. Command Each command must begin in the first column of a new line. Continuation lines must be indented at least one space. The period at the end of the command is optional. If you generate command syntax by pasting dialog box choices into a syntax window, the format of the commands is suitable for any mode of operation. Dr. D. Dutta Roy, ISI., Kolkata
  • 24. Variable names Variable names ending in a period can cause errors in commands created by the dialog boxes. You cannot create such variable names in the dialog boxes, and you should generally avoid them. SPSS command syntax is case insensitive, and three-letter abbreviations can be used for many command specifications. You can use as many lines as you want to specify a single command. You can add space or break lines at almost any point where a single blank is allowed, such as around slashes, parentheses, arithmetic operators, or between variable names. For example, FREQUENCIES VARIABLES=JOBCAT GENDER /PERCENTILES=25 50 75 /BARCHART. and freq var=jobcat gender /percent=25 50 75 /bar. Dr. D. Dutta Roy, ISI., Kolkata
  • 25. Creating new variable  There are some situations where in new variable is to be created in research. For example, you are interested to add or multiply some weight to any variable or you want to multiply two variables.  Use COMPUTE command  EXERCISE * age2 is new variable COMPUTE age2=Age - 5. EXECUTE. DESCRIPTIVES VARIABLES=age, age2 /STATISTICS=MEAN STDDEV MIN MAX. Descriptive Statistics N Minimu m Maximu m Mean Std. Deviatio n Age 542 7 15 9.54 1.117 age2 542 2 10 4.5406 1.11667 Valid N (listwise) 542 Dr. D. Dutta Roy, ISI., Kolkata
  • 26. Finding out lost file Researcher sometimes forgets the location of file using click menu. He can find the file using ‘GET FILE’ syntax.  Get the file File>new>syntax Write below syntax GET FILE=‘c:windowsdesktopddr.sav’. Dr. D. Dutta Roy, ISI., Kolkata
  • 27. Check your file  You can check validity of lost file using DISPLAY command. This will help you to get the variable names.  GET FILE='E:ses_data_final.sav'. * Display all variables DISPLAY. /* Display data of all variables LIST /* Display data of single variable LIST VARIABLES = <var1>.  Here * is used for beginning comment and /* is used for middle comment. Dr. D. Dutta Roy, ISI., Kolkata
  • 28. Data checking by total score  Data checking is made using if command. Box 8.5 represents syntax for checking the data. Here is the assumption that total score should not be more than 10. Therefore the command ‘if(total>10) t2=9’ is used. After the if command, execute command with period sign (.) is necessary. Output file is saved in the specific location finally.  Exercise GET File= 'E:ses_data_final.sav'. if(total>10) t2=9. Execute. LIST variables=name, total, t2. save outfile='e:sesout.sav'. Output NAME total t2 TANIA PARVIN 8 .00 BACCHU MONDAL 9 .00 HABIBUL ISLAM 9 .00 KARIM RAHAMAN 10 .00 AKTAR HUSSAIN 10 .00 LALTU MONDAL 10 .00 RAHIM RAHAMAN 10 .00 NOOR ALAM 10 .00 ***** 11 9.00 SADIK JAMAL 12 9.00 TAJMIR KHATUN 8 .00 FIROJ MONDAL . . Dr. D. Dutta Roy, ISI., Kolkata
  • 29. Is your data good for analysis ? Data entry error is a serious concern for analysis of data. Extreme data or outlier is assumed as error. Presence of outlier sometimes changes mean and standard deviation. SD becomes higher than mean. It is not necessary to delete the outlier first as outlier sometimes provide valid information. It gives you information about inequality in distribution of data. But finding out the outlier is important. Box whisker plot is useful to find out outlier. Write this in syntax window: EXAMINE VARIABLES=abany abd efect /COMPARE VARIABLE /PLOT=BOXPLOT /STATISTICS=NONE /NOTOTAL /MISSING=LISTWISE.  Another way is to study frequencies of variables. Frequencies variables=abany. Dr. D. Dutta Roy, ISI., Kolkata
  • 30. How can you find out case error?  Box-whisker plot sometimes can not find out the cases who have done systematic error. Suppose you have collected job satisfaction data using five point rating scale of 20 items where in 10 items are in reverse. And one case assigns 3 across all the items. Box plot can not locate the case.  Under such condition, you can transpose the data and compute mean and SD for each case. Case error can be identified if SD is 0.00 or is higher than mean. By using FLIP command you can transpose the data. EXERCISE FLIP VARIABLES= DESCRIPTIVES VARIABLES= Dr. D. Dutta Roy, ISI., Kolkata
  • 31. Relational operator  Relational operator is used to compare values. It is used with if command  A relation is a logical expression that compares two values using a relational operator. In the command  IF (X EQ 0) Y=1 the variable X and 0 are expressions that yield the values to be compared by the EQ relational operator. The following are the relational operators: Symbol Definition EQ or = Equal to NE or ~= or ¬ = or <> Not equal to LT or < Less than LE or <= Less than or equal to GT or > Greater than GE or >= Greater than or equal to Dr. D. Dutta Roy, ISI., Kolkata
  • 32. Select case When researcher wants to compute specific statistics for specific cases, the command select case is useful. SELECT IF (AGE=8). DESCRIPTIVES VARIABLES=ACH. Dr. D. Dutta Roy, ISI., Kolkata
  • 33. Command to filter variable Researcher can analyze the data of specific group. Box 8.2 shows syntax for descriptive statistics of age for the cases who are living in specific block of district (code=1). USE ALL. COMPUTE filter_$=(Block_code=1). VARIABLE LABEL filter_$ 'Block_code=1 (FILTER)'. VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'. FORMAT filter_$ (f1.0). FILTER BY filter_$. EXECUTE. DATASET ACTIVATE DataSet1. DESCRIPTIVES variables=age. Dr. D. Dutta Roy, ISI., Kolkata
  • 34. Summary -4  Syntax rules are important to write the programs in syntax window.  By writing the programs, one can import and export file, check file, list variables, evaluate data entry error, create new variable, select case and filter variable. Dr. D. Dutta Roy, ISI., Kolkata
  • 35. STATISTICAL ANALYSIS Dr. D. Dutta Roy, ISI., Kolkata
  • 36. Item-item correlation of five point rating scale GET FILE='C:UsersddroyDesktopIIP_SPSS syntax_workshopinnovation data.sav'. CORRELATIONS /VARIABLES=AW1 AW2 AW6 AW10 AW18 AW19 /PRINT=TWOTAIL NOSIG /MISSING=PAIRWISE.  There are 6 items measuring awareness of environment. It is assumed that 6 items are related to each other. One can use AW1 TO AW19 also.  This program assesses inter correlation among 6 items.  Pair wise missing data are deleted and level of significance is shown.  Two tail is applicable when direction of relationship is not pre assumed.  NOSIG is used to flag significant values. Dr. D. Dutta Roy, ISI., Kolkata
  • 37. Item total correlations GET FILE='C:UsersddroyDesktopIIP_ SPSS syntax_workshopinnovation data.sav'. compute total=AW1+ AW2+ AW6 +A W10 +AW18+ AW19. CORRELATIONS /VARIABLES=AW1 to AW19, total /PRINT=TWOTAIL NOSIG /MISSING=PAIRWISE.  Compute command is used to determine total score. Later it is used for item total correlation. Dr. D. Dutta Roy, ISI., Kolkata
  • 38. Multiple regression GET FILE='C:UsersddroyDesktopIIP_SPSS syntax_workshopinnovation data.sav'. compute total=AW1+ AW2+ AW6 +AW10 +AW18+ AW19. REGRESSION /MISSING LISTWISE /STATISTICS COEFF OUTS R ANOVA CHANGE /CRITERIA=PIN(.05) POUT(.10) /NOORIGIN /DEPENDENT total /METHOD=ENTER AW1 AW2 AW6 AW10 AW18. Run command should select all otherwise total score will not be used. In this model total score is predicted by each item. Dr. D. Dutta Roy, ISI., Kolkata
  • 39. Mean differences When data were collected from two different groups. Command of independent t-test is T-TEST GROUPS=IC3(3) /MISSING=LISTWISE /VARIABLES=total /CRITERIA=CI(.9500).  Here IC3 is independent variable and total is dependent variable.  Ic3 (3) indicates 3 as cut off points to make two different groups.  IC3(1 2) indicates categorization based on value 1 and 2. Dr. D. Dutta Roy, ISI., Kolkata
  • 40. Chi-square statistics CROSSTABS /TABLES=AW1 BY AW2 /FORMAT=AVALUE TABLES /STATISTICS=CHISQ PHI /CELLS=COUNT /COUNT ROUND CELL.  This examines association between items . For multiple items command is  TABLES=AW1 BY AW2 AW10 AW18 AW19 AW6  In above AW1 IS ROW AND OTHERS ARE IN COL. Dr. D. Dutta Roy, ISI., Kolkata
  • 41. One-WAY ANOVA ONEWAY total BY EXP /MISSING ANALYSIS.  Here total is dependent variable  EXP is independent variable. Dr. D. Dutta Roy, ISI., Kolkata
  • 42. COMPUTE SIZE OF SAMPLE /*----------------------------- GETTING INPUT FILE---------------------- -------------------- . GET FILE='C:UsersddroyDesktopIIP_SPSS syntax_workshopinnovation data.sav'. /*----------------------------- SIZE OF SAMPLE -------------------------- ---------------- . compute n=0. compute n=n+1. descriptives n, AW1.  n=0 indicates initialization. N=n+1 indicates summing value following loop. DESCRIPTIVES <n, AW1> indicates comparison between computed n and aw1.  Here AW1 (numeric type and scaling measure) is used to verify the computed N or size of sample. Dr. D. Dutta Roy, ISI., Kolkata
  • 43. Summary - 5  SPSS-Syntax makes the researcher more systematic in analysis of data. Researcher can fulfill all the assumptions of statistical tool systematically by writing the programs.  The compute command is very powerful as it assists researcher to write own program for analysis of data. Dr. D. Dutta Roy, ISI., Kolkata