ebook img

Using SPSS Syntax: A Beginner's Guide PDF

217 Pages·2009·3.336 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Using SPSS Syntax: A Beginner's Guide

SPSS syntax is the command language used by SPSS to carry out all of its commands and functions. In this book, Jacqueline Collier introduces the use of syntax to those who have not used it before, or who are taking their first steps in using syntax. Without requiring any knowledge of programming, the text outlines: • how to become familiar with the syntax commands; • how to create and manage the SPSS journal and syntax files; and • how to use them throughout the data entry, management and analysis process. Collier covers all aspects of data management from data entry through to data analysis, Using U including managing the errors and the error messages created by SPSS. Syntax s commands are clearly explained and the value of syntax is demonstrated through more i n than 100 examples. g This book also supports the use of SPSS syntax alongside the usual drop-down, menu- S P driven graphical interface (GIF), using the two methods together in a complementary S SPSS Syntax way. The book enables the reader to pick and choose how much one method is relied S upon over the other, encouraging them to be used side-by-side, with a gradual increase S in the use of syntax as knowledge, skills and confidence develop. y n Most examples in the book are based upon the SPSS sample datasets which are ta provided with SPSS software. You can reproduce the syntax examples yourself to see x A Beginner’s Guide how they work and what outcomes they produce. Alternatively the syntax used in the examples can be downloaded from the companion website at www.sagepub.co.uk/ colliersyntax to enable you to run them more easily. This book is ideal for all those carrying out quantitative research in the health and social sciences who can benefit from SPSS syntax’s capacity to save time, reduce errors and allow a data audit trail. Jacqueline Collier is an experienced author and a well-respected name in healthcare J a research. She is Professor of Health Services Research at the University of Nottingham. c q u e l i n www.sagepub.co.uk/colliersyntax e C o l l i e r Jacqueline Collier Cover image © iStockphoto Cover design by Joni Strudwick ISBN 978-1-4129-2218-0 9 781412 922180 11mm Using SPSS Syntax 55229977--CCoolllliieerr--FFMM..iinndddd ii 99//2222//22000099 11::4455::5599 PPMM 55229977--CCoolllliieerr--FFMM..iinndddd iiii 99//2222//22000099 11::4466::0000 PPMM Using SPSS Syntax A Beginner’s Guide Jacqueline Collier 55229977--CCoolllliieerr--FFMM..iinndddd iiiiii 99//2222//22000099 11::4466::0000 PPMM © Jacqueline Collier 2010 First published 2010 Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted under the Copyright, Designs and Patents Act, 1988, this publication may be reproduced, stored or transmitted in any form, or by any means, only with the prior permission in writing of the publishers, or in the case of reprographic reproduction, in accordance with the terms of licences issued by the Copyright Licensing Agency. Enquiries concerning reproduction outside those terms should be sent to the publishers. All material on the accompanying website can be printed off and photocopied by the purchaser/user of the book. The web material itself may not be reproduced in its entirety for use by others without prior written permission from SAGE. The web material may not be distributed or sold separately from the book without the prior written permission of SAGE. Should anyone wish to use the materials from the website for conference purposes, they would require separate permission from us. All material is © Jacqueline Collier, 2010 SAGE Publications Ltd 1 Oliver’s Yard 55 City Road London EC1Y 1SP SAGE Publications Inc. 2455 Teller Road Thousand Oaks, California 91320 SAGE Publications India Pvt Ltd B 1/I 1 Mohan Cooperative Industrial Area Mathura Road New Delhi 110 044 SAGE Publications Asia-Pacifi c Pte Ltd 33 Pekin Street #02-01 Far East Square Singapore 048763 Library of Congress Control Number: 2009920677 British Library Cataloguing in Publication data A catalogue record for this book is available from the British Library ISBN 978-1-4129-2217-3 ISBN 978-1-4129-2218-0 (pbk) Typeset by Glyph International, Bangalore, India Printed by CPI Antony Rowe, Chippenham, Wiltshire Printed on paper from sustainable resources 55229977--CCoolllliieerr--FFMM..iinndddd iivv 99//2222//22000099 11::4466::0000 PPMM Contents List of Syntax Command Examples ix Preface xiii Acknowledgments xiv 1. Introduction 1 Explanations and Illustrations of the Log and the Journal 2 The Journal – What it Is, and How to Set the Journal Options Appropriately for Syntax Use 2 How to Set the Journal 4 The Log – What it Is, and How to Set the Log Options Appropriately for Syntax Use 6 Syntax Files 8 Methods for Opening the Syntax Editor 9 Writing a Syntax File Using the Log 12 Creating a Repeat Analysis Syntax File 13 Summary 14 SPSS Conventions 16 2. Syntax for Data Entry 18 Different Methods of Data Entry in SPSS 19 Summary 28 Resources 30 3. Increasing the Usability of the Datafi le 33 Variable Names 34 Labelling the Variables 36 Labelling the Values of Data in the Datafi le 39 Missing Values 41 Checking the Datafi le Layout and Variable Content 43 Summary 44 4. Amending the Datafi le 45 Extracting to a Smaller Datafi le 46 55229977--CCoolllliieerr--FFMM..iinndddd vv 99//2222//22000099 11::4466::0000 PPMM vi Contents Adding New Variables to a Dataset 47 Adding New Cases to an Existing Datafi le 49 Summary 52 5. Syntax Involving String Variables 53 Converting Numeric Values to Text Representations of Numbers 54 Converting Text Representations of Numbers to Numeric Values 55 Converting Categorical Text to Numeric Values 58 Date as Text into Date Format 66 Manipulating String Variables 68 Summary 70 6. Syntax Involving Date and Time Variables 71 How SPSS Works with Dates and Time 71 Date and Time Wizard 72 Setting the Date and Time Formats 74 Extracting Month, Day of Week, Year 77 Calculations Including Both Date and Time 78 Summary 81 7. Syntax for Manipulating Numeric Variables 83 Basic Principles to Observe in Transforming Data and Creating Variables 84 Advantages of Using Syntax 85 Deleting Variables 85 Routine/Simple Data Manipulation 86 Creating Categories from Continuous Numerical Data 89 Counting Data Values 92 Summary 94 8. Syntax for Data Exploration 95 Data Analysis Plans 96 Exploring Categorical Data 97 Exploring (or Describing) Numerical Data 102 Statistics to Examine the Distribution of Data 108 Summary 109 9. Syntax to Enable the Use of Only Sub-sections of the Data 111 Selecting only a Certain Part of Your Data to Be Included in the Analysis 112 Enabling the Analysis to Be Presented Separately for Certain Groups 116 Use of the TEMPORARY and SELECT IF Commands 119 Summary 122 10. Syntax for Graphs 123 Overview of Creating Graphs in SPSS 123 Templates 125 55229977--CCoolllliieerr--FFMM..iinndddd vvii 99//2222//22000099 11::4466::0000 PPMM Contents vii Graphs Created from Legacy Dialogs via the Interactive Option 127 Graphs Created from Legacy Dialogs via Individual Graph Type Options 131 Graphs Created from Chart Builder 136 Summary 141 11. Syntax for Univariate Analysis 143 Categorical Data 144 Ordinal Data – Differences 147 Interval Data – Differences 152 Correlations 161 Summary 164 12. Syntax for Linear and Logistic Regression Analysis 166 Linear Regression 167 Logistic Regression 171 Usefulness of Syntax 173 Summary 177 13. Understanding Error Messages and Warnings 179 Differences between ERROR and WARNING messages 181 Summary 192 Glossary 194 References 196 Index 197 Index of Commands and Keywords 200 55229977--CCoolllliieerr--FFMM..iinndddd vviiii 99//2222//22000099 11::4466::0000 PPMM 55229977--CCoolllliieerr--FFMM..iinndddd vviiiiii 99//2222//22000099 11::4466::0011 PPMM List of Syntax Command Examples 1:1 Journal entry for opening a fi le and running a frequency 3 2:1 Raw data entry in syntax using DATA LIST 21 2:2 Raw data entry in syntax using DATA LIST LIST 22 2:3 Importing from a non-SPSS datafi le by pasting a GET DATA command 24 2:4 Amending the GET DATA command 25 2:5 Printing data in the output fi le using the LIST command 26 2:6 Saving a dataset using the SAVE OUTFILE command 27 2:7 Annotating syntax fi les via the COMMENT command and via an asterisk beginning a command line 27 3:1 Changing the names of existing variables using RENAME VARIABLES 35 3:2 Adding variable labels through the use of the VARIABLE LABELS command 37 3:3 Adding value labels through the use of the command VALUE LABELS 40 3:4 Indicating missing data with the MISSING VALUES command (using discrete numbers) 41 3:5 Indicating missing data with the MISSING VALUES command (using ranges) 42 3:6 Printing the variable information for a fi le using the DISPLAY DICTIONARY command 43 4:1 Creating a new dataset using the SAVE OUTFILE command 46 4:2 Adding variables to existing cases using the MATCH FILES command 47 4:3 SORT CASES (example embedded in MATCH FILES) 49 4:4 Changing the variable format using the FORMATS command 50 4:5 Adding new cases to an existing datafi le using the ADD FILES command 51 4:6 Adding new cases to an existing datafi le where variable names differ using RENAME command (embedded in ADD FILES) 51 55229977--CCoolllliieerr--FFMM..iinndddd iixx 99//2222//22000099 11::4466::0011 PPMM

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.