SPSS … The when and why of Syntax

Slides:



Advertisements
Similar presentations
Document Properties: adding information to your Microsoft Office documents Step 1: Add information to Document Properties What are Document Properties.
Advertisements

Data Analysis using SPSS By Dr. Shaik Shaffi Ahamed Ph. D
Tutorial 8: Developing an Excel Application
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Why python? Automate processes Batch programming Faster Open source Easy recognition of errors Good for data management What is python? Scripting programming.
2440: 211 Interactive Web Programming JavaScript Fundamentals.
Introduction to SPSS Allen Risley Academic Technology Services, CSUSM
Ann Arbor ASA ‘Up and Running’ Series: SPSS Prepared by volunteers of the Ann Arbor Chapter of the American Statistical Association, in cooperation with.
Descriptive Statistics In SAS Exploring Your Data.
Customizing Word Microsoft Office Word 2007 Illustrated Complete.
A Simple Guide to Using SPSS© for Windows
Using the Visual Basic Editor Visual Basic for Applications 1.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Microsoft Excel 2003 Illustrated Complete Excel and Advanced Worksheet Management Customizing.
SPSS 1: An Introduction to the Statistical Package SPSS Suzie Cro MRC Clinical Trials Unit.
Introduction to SPSS Short Courses Last created (Feb, 2008) Kentaka Aruga.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Record & run a macro Record & run a macro Save as a macro-
Automating Tasks with Visual Basic. Introduction  When can’t find a readymade macro action that does the job you want, you can use Visual Basic code.
Microsoft Excel Macros & Excel Solver (IENG490)
Data Analysis Using SPSS
Chapter 11: Introduction to the Visual Basic Environment Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
© Copyright 2000, Julia Hartman 1 Next An Interactive Tutorial for SPSS 10.0 for Windows © by Julia Hartman Using Command Syntax.
INSERT BOOK COVER 1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Excel 2010 by Robert Grauer, Keith.
Social Science Research Design and Statistics, 2/e Alfred P. Rovai, Jason D. Baker, and Michael K. Ponton Modifying Syntax PowerPoint Prepared by Alfred.
Math 3400 Computer Applications of Statistics Lecture 1 Introduction and SAS Overview.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
OCC Network Drives  H:\  P:\ 
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
Developed By Information Technology Services University Of Saskatchewan.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
A Simple Guide to Using SPSS ( Statistical Package for the Social Sciences) for Windows.
SPSS- Tutorial The following power-point slides show you how to use some of the features in SPSS. A survey of 20 randomly selected companies asked them.
CENTER FOR SOCIAL SCIENCE COMPUTATION AND RESEARCH (CSSCR) UNIVERSITY OF WASHINGTON SPRING 2013 CONSULTANT: SHIN HAENG LEE Introduction to SPSS.
1.Introduction to SPSS By: MHM. Nafas At HARDY ATI For HNDT Agriculture.
Introduction to Microsoft Excel Macros COE 201- Computer Proficiency.
16a. Accessing Data: Means in SPSS ®. 16a. Accessing Data: Means in SSPS ® 1 Prerequisites Recommended modules to complete before viewing this module.
Data Management Research Methods Professional Development Institute December 4, 2015.
1 PEER Session 02/04/15. 2  Multiple good data management software options exist – quantitative (e.g., SPSS), qualitative (e.g, atlas.ti), mixed (e.g.,
Data Analysis with SPSS Lee Pierce Keith Mulbery Jason Archibald.
Using SPSS Note: The use of another statistical package such as Minitab is similar to using SPSS.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
 2007 Pearson Education, Inc. All rights reserved Introduction to the Visual Basic Express 2005 IDE.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
An Interactive Tutorial for SPSS 10.0 for Windows©
Excel Tutorial 8 Developing an Excel Application
Session 15 Merging Data in SPSS
Visual Basic.NET Windows Programming
Chapter 2: The Visual Studio .NET Development Environment
Downloading and Preparing a StudentVoice File for SPSS
Tutorial 5: Working with Excel Tables, PivotTables, and PivotCharts
Chapter 1: An Introduction to Visual Basic 2015
INTRODUCING Adams/CHASSIS
By Dr. Madhukar H. Dalvi Nagindas Khandwala college
Microsoft Office Illustrated Fundamentals
Using SPSS Note: The use of another statistical package such as Minitab is similar to using SPSS.
DEPARTMENT OF COMPUTER SCIENCE
Microsoft Office Illustrated
Microsoft Excel 2003 Illustrated Complete
Microsoft Excel 2003 Illustrated Complete
Designing and Debugging Batch and Interactive COBOL Programs
Exploring Microsoft Excel
Hands-on Introduction to Visual Basic .NET
CIS16 Application Development Programming with Visual Basic
Using JDeveloper.
Using SPSS Note: The use of another statistical package such as Minitab is similar to using SPSS.
WinSLAMM Batch Editor Module 23
Microsoft Excel 2007 – Level 2
Presentation transcript:

SPSS … The when and why of Syntax JENA GRADUATE ACADEMY Dr. Friedrich Funke

Before we start … What is the »philosophy« behind my approach? Self Empowerment! Development assistance?

Learning Objectives – What do you expect? Frustration is the disappointment of expectations What is YOUR point?

Learning Objectives What will you have learnt today? What is Syntax How do I get it Why and when do I use it Examples Makros and Skripts Helpful ressources

What is Syntax? MVA VARIABLES = set_quest_T1 set_quest_T2 set_quest_both set_migration set_country set_consistent set_subsamples set_unit_missingness set_wavefilter_T1 set_wavefilter_T2 /MAXCAT = 25 /CATEGORICAL = set_subsamples set_unit_missingness set_wavefilter_T1 set_wavefilter_T2 /TTEST PROB PERCENT=5 /CROSSTAB PERCENT=5 /MISMATCH PERCENT=5 /DPATTERN DESCRIBE=set_quest_T1 set_quest_T2 set_quest_both set_migration set_country set_consistent set_subsamples set_unit_missingness /MPATTERN DESCRIBE=set_quest_T1 set_quest_T2 set_quest_both set_migration /TPATTERN PERCENT=1 DESCRIBE=set_quest_T1 set_quest_T2 set_quest_both set_migration set_country set_consistent set_subsamples set_unit_missingness /LISTWISE /PAIRWISE /EM ( TOLERANCE=0.001 CONVERGENCE=0.0001 ITERATIONS=25 ) /REGRESSION ( TOLERANCE=0.001 FLIMIT=4.0 ADDTYPE=RESIDUAL ) .

Any ideas what is done here? What is Syntax? T-TEST GROUPS = gender_both(1 2) /MISSING = ANALYSIS /VARIABLES = prejud_t1 /CRITERIA = CI(.95) . Command Subcommand Subcommand = KEYWORD Subcommand = Specification Any ideas what is done here?

Structure of Syntax The example syntax can be used to generate descriptive statistics:       DESCRIPTIVES         VARIABLES=educ         /STATISTICS=MEAN STDDEV MIN MAX . First, know the difference between commands and subcommands. The command name is always on the first line. If it is a procedure that generates statistical output, then the names of variables to be included in the analysis will immediately follow. Here, the command name is DESCRIPTIVES followed by the subcommand, VARIABLES, on the following line. After the VARIABLES subcommand, the variable name educ appears, which tells the SPSS processor the variable on which to calculate descriptive statistics. This could also be a list of variables if you want to generate statistics on more than one variable at a time. The /STATISTICS subcommand also illustrates the use of options in a subcommand. Following the equals sign, there is a list of four statistics, MEAN STDDEV MIN MAX, which are four of several possible descriptive statistics that can be specified in this command. Notice the period following the last line of the above code. It indicates the end of a command and is always  placed after the last subcommand for a particular procedure.

Do I have to learn a thousand new commands? Fortunately: no!

How to obtain Syntax GUI syntax Results

How to obtain Syntax

How to obtain Syntax GUI syntax Results Remind me in the end of the session, that I reveal a little secret about the hidden syntax!

How to obtain Syntax GUI Results Results syntax syntax Run T-TEST GROUPS = gender_both(1 2) /MISSING = ANALYSIS /VARIABLES = prejud_t1 /CRITERIA = CI(.95) .

How to obtain Syntax GUI Results Results GUI Results syntax syntax Run GUI syntax Results Paste Run

How to obtain Syntax GUI Results GUI Results syntax syntax Paste Run Excel modify

Excel as a mighty editor

Integrate syntax files in macros, scripts and 3rd party software How to obtain Syntax Integrate syntax files in macros, scripts and 3rd party software GUI syntax Results syntax Results Run GUI syntax Results Paste Run GUI syntax Results Paste Run Excel modify syntax Results batch syntax syntax

Production facility The Production Facility The Production Facility is an application that stands apart from the standard SPSS application. It can be accessed from the Window's Start menu. The Production Facility's primary purpose is to process syntax files in batch mode. You can process as many syntax files as you like by using the Add button to add syntax files to the list of files in the Syntax Files box

Macros !ENDDEFINE. DESCRIPTIVES VARIABLES=varlist . Macros SPSS provides the capability to create macros that contain text and SPSS command syntax. Macros can perform the same command repeatedly, combine several procedures, or calculate user-defined statistics. Any functions you can perform using SPSS syntax can be incorporated into a macro. When a macro is called, it is expanded so that any text including commands will be used in its place. There are two commands used to create a macro: DEFINE and !ENDDEFINE. To begin the definition of a macro, type the DEFINE command in the Syntax Editor followed immediately by the user-defined macro name. Be careful in choosing this name as it will activate the macro whenever it is used. It should be a name that does not appear elsewhere in your syntax. Following the user-defined macro name are parentheses. These required parentheses may or may not contain parameters. Next, you can type syntax or any other text that will be called each time your macro is called. After you have entered all of the text or syntax that you want to include in your macro, type !ENDDEFINE to end the definition. The following syntax illustrates the use of a macro that contains a list of variables names. The macro is then used in the DESCRIPTIVES procedure.        DEFINE varlist ()              educ jobcat salary salbegin jobtime !ENDDEFINE. DESCRIPTIVES         VARIABLES=varlist .

Macros       DEFINE varlist ()              educ jobcat salary salbegin jobtime       !ENDDEFINE.       DEFINE descrip ()       DESCRIPTIVES              VARIABLES=varlist       !ENDDEFINE.       DESCRIP. The above macro is identical to the prior example except that the DESCRIPTIVES command has been included in a new macro called descrip, which is then called after the macro definition

Scripts Scripts using Visual Basic The SPSS scripting facility enables you to add numerous custom features to SPSS. It uses the Visual Basic programming language to operate on most any feature of the SPSS environment. You can use any commands available in Visual Basic in addition to the Visual Basic commands that are unique to SPSS's scripting facility.

Do I have to learn a thousand new commands? Fortunately: no!

http://www.spsstools.net/

http://www.spss.com/spss/SPSSdatamgmt_4e.pdf

Special Scripts and Macros http://www.comm.ohio-state.edu/ahayes/SPSS%20programs/indirect.htm

http://spss.wikia.com/wiki/SPSS_Wiki

SPSS … The when and why of Syntax Summary JENA GRADUATE ACADEMY Dr. Friedrich Funke

When and why should we use Syntax? More efficient with large datasets Exclusive commands for special analyses ReUsage of common algorithms Documentation More conscious use of statistics

Feedback and Giveaway of the day