Statistics & SPSS
Learning Resources
Publications & CV
Inter Alia
Contact Details & Links

Syntax, data and teaching/learning resources associated with this book are available below:

Inference and Statistics in SPSS is not just another SPSS manual but an integrated approach to learning introductory statistics using one of the world’s best-selling statistical software packages.  It will be an invaluable resource for students of business or social science who want to use statistics in the real world, to tackle real research problems, using real data. 

Further details at the bottom of this page. The book can be purchased from www.amazon.co.uk or other mainstream retailers.

Intro to SPSS:

Task Sheet for SPSS 18

Notes for SPSS 18

Stata for dummies -- for lab notes clear here.

Task sheet for Intro to SPSS

General Introduction to SPSS:

Lecture Structure:

A. Data Types

      1. Variables

      2. Constants

B. Introduction to SPSS

      1. SPSS Menu Bar

      2. File Types

C. Tabulating Data

      1. Categorical variables

      2. Continuous variables

D. Graphing Data

      1. Categorical variables

      2. Continuous variables

The following slides provide an introduction to basic statistical concepts and offer a brief overview of the one semester course, Social Statistics I:

  • For M&S Lecture 1 click here
  • For M&S Lecture 2 click here
  • For M&S Lecture 3 click here
  • For M&S Lecture 4 click here
  • For M&S Lecture 5 click here
  • For M&S Lecture 6 click here
  • For M&S Tutorial, await update.

For the 2009/2010 lab exercises & guide to reading, click here.

2009 Assignment: Social Science Statistics 1 Course Assignment (due Tues 15th December 2009)

Click on the links below to access the files needed for the assignment:

  • For revised version of project brief click here.
  • For main dataset click here (SPSS data file).

For examples of the superheroes developed by the primary school children see:

Other files that may be needed for the assignment:

SSS1 Lecture 1: Density curves and the CLT

Lecture Structure:

  1. Measures of Central Tendency and Dispersion

  2. Density curves & Symmetrical Distributions

  3. Normal Distribution

  4. Central Limit Theorem

SSS1 Lecture 2: Calculating z-Scores 

Lecture Structure:

  1. Find probabilities from zi (click here for table of probabilities)

  2. Find zi from a given probability

  3. Find zi and probability from xi

  4. Apply z scores to sampling distributions

SSS1 Lecture 3: Introduction to Confidence Intervals 

Lecture Structure:

  1. Intuition behind confidence intervals

  2. Three steps of confidence interval estimation

  3. Large sampe confidence interval for the mean

  4. Small sample confidence interval for the mean

SSS1 Lecture 4: Confidence Intervals for Various Applications 

Lecture Structure:

  1. CI for two independent means

       1.1 Pooled Variances

       1.2 Different Variances

  2. CI for two paired means

  3. CI for one proportion

  4. Sample size determination

SSS1 Lecture 5: Introduction to Hypothesis Tests 

Lecture Structure:

  1. Statistical Significance

  2. The four steps of hypothesis testing

  3. Hypotheses about the population mean

SSS1 Lecture 6: Hypothesis Tests for Proportions & 2 Populations

Lecture Structure:

  1. Review of Significance

  2. Review of one sample tests on the mean

  3. Hypothesis tests about Two population means

  • Homogenous variances
  • Heterogeneous variances

  4. Deciding on whether variances are equal

  5. Hypothesis tests about proportions

  • One population
  • Two populations

SSS1 Lecture 7: Relationships Between Categorical Variables 

Lecture Structure:

  1. Independent Events

  2. Contingent Events

  3. Chi-square Test for Independence

  4. Further Study

SSS1 Lecture 8: Regression

Lecture Structure:

  1. Linear and non-linear relationships

  2. Fitting a line using Ordinary Least Squares

  3. Inference in Regression

  4. Omitted Variables and R2

  5. Categorical Explanatory Variables 

  6. Summary

SSS1 Slides from 2006:

  • For Quants I Lecture 2 click here
  • For Quants I Lecture 3 click here
  • For Quants I Lecture 4 click here
  • For Quants I Lecture 5 click here
  • For Quants I Lecture 6 click here
  • For Quants I Lecture 7 click here
  • For Quants I Lecture 8 click here

Click here for table of probabilities for the z-distribution

For the syntax "answers" for selected lab exercises, click on the relevant link below (these files assume you are using a lab computer):

If you are working from your own PC (as opposed to a lab PC) you will find the following versions of files more useful since the syntax refers to the C:\ drive, rather than the Q:\ and H:\ drives:

Data for Social Science Statistics I:

Click here for a zipped folder that contains all the data files (except for the x_bar__ dataset) for the Inference and Statistics textbook or click on the link below:

These files should be copied into a folder on your C: drive called STATISTICS (i.e. C:\STATISTICS).  The datasets are also available below as separate files:

These files should also be available from the Q:\QUANTS folder of the Adam Smith Labs.  If you plan to use these data sets on campus but from other lab computers, you might want to copy these files onto your H:\ drive.

Macros for Social Science Statistics I: For Home Use

The lab machines will hopefully have the macros installed by the time you come to need them (if not, see the next section).  If you plan to use the macros on your own PC, however, you will need to download the following four files to utilise the macros described in the text (save the files to C:QUANTS directory which you will need to create if you have not done so already).  Click on the file names to download or open them:

Once you have downloaded the files it will improve ease of use if you customise the syntax-window menu bar in SPSS. Detailed instructions on how to do this are given in the installation instructions:

If you would rather not install these macros on your hard-drive, you can instead save only the datafile one.sav to the C:QUANTS directory (which you will need to create if it does not already exist), and open and run the entire QUANTSCOMMANDS.SPS file directly from this website each time you open up SPSS. You should then be able to use all the macros listed in the textbook.

Macros for Social Science Statistics I: For ASB Labs

If the macros have not been installed on the lab machine you are using, you can still access the macros by opening the file below, highlighting all its contents by pressing CTRL+A and running the whole lot as though it were one command. You will need to do this every time you start a new session in SPSS.

Mind Maps for Social Science Statistics I:

Mindmaps can be viewed using Mindjet's free viewer software which can be downloaded by clicking here and selecting the button labelled Get Mindjet MindManager Viewer.

  • For overview of SSS I course, click here
  • For mindmap of Confidence Intervals, click here (coming soon)
  • For mindmap of Hypothesis tests, click here (coming soon)

SSSII Lecture 1: Correlation and Regression 

Lecture Structure:

    1. Covariance & Correlation Coefficients

    2. Multiple Regression

    3. Interpreting Coefficients

    4. Inference

    5. Coefficient of Determination

SSSII Lecture 2: Prediction and ANOVA

Lecture Structure:

    1. Prediction

    2. ANOVA in regression

    3. F-Test

    4. Regression assumptions

    5. Properties of OLS estimates

SSSII Lecture 3: Non-Linearities

Lecture Structure:

    1. Consequences of non-linearities

    2. Testing for non-linearities

         (a) visual inspection of plots
         (b) t-statistics
         (c) structural break tests

    3. Solutions

         (a) transform variables
         (b) split the sample
         (c) dummies
         (d) use non-linear estimation techniques

SSSII Lecture 4: F-Tests

Lecture Structure:

    1. General Test for a set of linear restrictions

    2. Testing homogenous restrictions

    3. Testing for a relationship

    4. Testing for Structural Breaks

Excel Template for F-Tests.

SSSII Lecture 5: Ommitted Variables & Measurement Errors

Lecture Structure:

    1. Regression Assumptions

    2. Ommitted Variables

    3. Irrelevant Variables

    4. Errors in Variables

    5. Error Term with zero mean

SSSII Lecture 6: Heteroscedasticity

Lecture Structure:

    1. What is heteroscedasticity?

    2. Causes

    3. Consequences

    4. Detection

    5. Solutions

SSSII Lecture 7: Multicolinearity & Modeling Strategies

Lecture Structure:

    1. What is multicolinearity?

    2. Causes

  • Dummy variable trap
  • Conceptual linear sum
  • Two measures of the same effect
  • Measurement failure to distinguish between effects

    3. Consequences

  • Failure of regression estimation
  • Increased standard errors
  • Coefficient value and sign unstable

    4. Detection

  • Check for unstable parameters
  • Check t-ratios
  • Tolerance & VIF
  • Condition Index

    5. Solutions

  • Drop reference category dummy
  • Do nothing!
  • Factor analysis/principle components
  • Drop variables with low t-values
  • Ridge regression

    6. Modelling Strategies

  • General to Specific
  • Specific to General

SSSII Lecture 8:  Binary Dependent Variable Estimation

    1. Overview of Non-Continuous Dependent Variables

  • Binary dependent variables
  • Ordinal dependent variables
  • Nominal dependent variables
  • Count dependent variables
  • Censored dependend variables
  • Constrained dependent variables
  • Grouped dependent variable
  • Ambiguity & Consequence

    2. Linear Probability Model

  • Advantages: simple to estimate & interpret
  • Disadvantages: incorrect functional form

    3. Logit

  • Logistic transformation
  • Goodness of fit

    4. Logit Estimation & Interpretation

  • Maximum Likelihood
  • Interpreting Logit Output

    5. Multiple Logit Regression   

  • Multiple explanatory variables
  • Using Odds Ratios

Please note your final assignment for SSS2 is due for submission Thursday 14th April 2011.
When submitting your assignment please supply the following:

Assignments must be deposited in the mailbox outside the College Office, now located in room 107 of Florentine House, 53 Hillhead Street (next to the Library and Fraser Building).

Any assignments failing to meet the above conditions will not be marked until the submission is completed and may be subject to a marking penalty.

Details of the assignment, data and other resources are available below: 

Data for SSSII:

SSSII Lecture Slides from 2006/2007:

  • To download Lecture 1 click here.
  • To download Lecture 2 click here.
  • To download Lecture 3 click here.
  • To download Lecture 4 click here.
  • To download Lecture 5 click here.
  • To download Lecture 6 click here.
  • To download Lecture 7 click here.
  • To download Lecture 8 click here.
  • To download Lecture 9 click here.

Lecture notes & Lab exercises for SSSII:

  • Introduction: Why study regression? Click here. (Revised 17th Jan 2011)
  • Ch1: Correlation and Inference. Click here. (Revised 17th Jan 2011)
  • Ch1: Answers and Syntax (Revised 17th Jan 2011)
  • Ch2: Prediction and ANOVA (Revised 31st Jan 2011). Click here.
  • Ch2: Answers (Revised 31st Jan 2011). Click here.
  • Ch3: Non-Linearity (Revised 11th Feb 2011). Click here.
  • Ch3: Answers (Revised 11th Feb 2011). Click here.
  • Ch4: F-tests (Revised 21st Feb 2011). Click here.
  • Ch4: Answers (Revised 21st Feb 2011). Click here.
  • Ch4: Ftests Excel template (Revised 21st Feb 2011). Click here.
  • Ch6: Heteroscedasticity (Revised 13th Mar 2011). Click here.
  • Ch6: Answers (Revised 13th Mar 2011). Click here.

  • Chapter 4: F-Tests. Click here.
  • Chapter 5: Ommitted Variables. Click here.
  • Chapter 6: Heteroscedasticity. Click here.
  • Chapter 7: Multicolinearity. Click here.
  • Chapter 8: Logit. Click here

Click here for a copy of the 2007 assignment brief. Click on the link below to download the mortality dataset:

Macro for computing White's Standard Errors:

The following macro was written by Andrew F. Hayes of Ohio State University.  See hcreg.pdf for technical background to the macro. To use the macro, follow the steps below:

1. Copy both of the following files onto your hard disk. 

2. Then open whitesSE.sps file (tells you how to use the hcreg file).

The purpose of the course is to provide a framework for supporting students in the use of quantitative methods in years two, three and four of their PhD.  There is clearly a need to consolidate the skills and techniques learnt in Social Science Statistics training provided in the first year of the 1+3 programme, skills that are quickly lost if not in frequent use.  The course aims to:

1. develop students’ knowledge of a number of advanced quantitative techniques appropriate to postgraduate research in social science.

2. supplement and enhance the continued support currently provided by supervisors and informal advise offered by the Faculty Methodologist.

3. provide a framework for training in advanced quantitative techniques above and beyond those provided in Social Science Statistics I & II.

4. help students learn how to articulate quantitative issues. The language of statistics can be arcane. It is one thing to understand a statistics lecture, it's another to discuss or write about statistics in one's own words.  Yet this is what PhD students are required to do when they write up their thesis and defend it to an external  examiner.   By encouraging  students to participate in  discussions of statistical issues  and methods on a regular basis we hope to greatly increase their  capacity to articulate and critically evaluate quantitative  methods. 

5. encourage innovation in the application of quantitative methods, facilitate the dissemination of new research ideas and raise the level of enthusiasm for using quantitative methods.

Downloads for AQIM:

  • Course outline (click here)
  • Introduction to AQIM (click here)
  • Lecture 1: Reverse Causation & 2SLS (click here)
  • Lecture 2: Event-History Modelling (click here)

Purchase your copy from Amazon or other major retailers.

Key features of the book:

  • Teaches syntax not just ‘point and click’:
Learning syntax will pay dividends in the long run, particularly for those who are serious about a career in social science research.  Students learn how to keep a record of syntax that will enable them to backup and reproduce the results of even very large projects. 
  • Expands the facilities of SPSS:
Macros written by Prof Pryce enable users to run statistical tests using only summary data.  With these added, SPSS becomes a more complete and versatile package, offering the social science researcher everything required for the statistical analysis of their own data, or of that published in books and articles. 

This offers a primer in classical statistics that is truly integrated into SPSS.  A number of texts teach SPSS and a myriad teach statistics.  However, because SPSS does not have built-in procedures for the more basic classical statistical tests (no shortage of advanced ones!) most courses teach theory and practice in a disjointed way.  A particular problem is that SPSS does not easily allow you to run a statistical test when you only have access to summary data.  For example, if you are reading a published report or journal article and you want to estimate the confidence interval for the mean of a variable, which may be crucial to the conclusions of that publication, it is unlikely that the canned procedures in SPSS will be able to assist because you do not have the original data used by the author to calculate the mean. But you need only the mean, standard deviation and sample size to calculate a confidence interval, so it would be useful to have an automated procedure with the flexibility to take advantage of such summary information. 

A third problem relates to the way SPSS calculates certain statistics: the built-in method may not be the most appropriate for your data and it is not always easy to tell unless you have spent considerable time trawling through the manuals.  Nevertheless, SPSS offers one of the most user-friendly menu systems of any advanced statistical program, and has an unrivalled interface for inputting and viewing raw data.  So there is much to be gained from adding some basic commands to SPSS using its macro programming language to allow users to run statistical tests using only summary data.  With these commands added, SPSS becomes a more complete and versatile package, offering the social science researcher pretty much everything he or she needs to do basic statistical analysis either on his/her own data, or on the published results of other authors.  The macros and installation instructions are included on the attached CD (if you have problems accessing the files on the CD, go to www.gwilympryce.co.uk where you will find copies of the files and instructions).

The goal of this text is to lead the reader through both the basics of statistical inference and the basics of SPSS.  I try to assume no previous knowledge of either. It should be emphasised that the ethos of the book is to provide you with skills for applied statistical research and not just for passing stats exams.  As such, there is little emphasis on learning formulae, and a lot of emphasis on understanding results and on choosing the right statistical procedure for the right problem (crucial to good research). 

On the SPSS side, this text deviates from almost every other introductory guide to the software in that it endeavours to teach the basics of SPSS syntax, rather than relying entirely on the Windows click-and-point interface.  This makes learning apparently more difficult and long-winded at first, but there are dividends to be reaped in the long run:

1. A succinct and secure record
Using the Windows interface alone leaves the researcher with no simple record of how he/she derived or customised variables. It is possible to tell SPSS to record every action you make, but this can result in huge volumes of information that are impossible to decipher – you need a record of only the commands which contributed to your final results, not all the permutations along the way.  Relying on ‘point-and-click’ routines poses a great risk.  What if a data file, that may have taken months to construct, becomes corrupted? How will you work out the source of errors that are not identified until the final stage of research?  Syntax files allow the researcher to keep a very precise and succinct record of his/her work and this provides much needed security. The final data set and output files can very quickly be derived from the original data set if you have a well-maintained syntax file.  And since SPSS syntax files are basically simple text files, they take up very little disk space.  This means that several years of research can be stored in less than a mega byte, and multiple backups can be kept at virtually zero storage cost.  The trivial file size also makes it very easy to create backups that are stored remotely - the best way to safeguard against data loss due to fire or theft. You simply email your syntax file to your home computer or to colleagues located elsewhere.

2. Transparency and Reproducibility
If the funder of a research report, the reviewer of a journal article or the external examiner of a thesis asks for details of how a variable was calculated or a statistic computed, how will the author be able to reply with any certainty?  Reproducibility – the ability of other researchers to recreate your results – is a fundamental tenet of good science. 

3. Efficiency
With a bit of practice at writing and editing syntax files you will soon find that the majority of tasks can be accomplished much more rapidly and precisely using syntax, particularly when you have to reproduce a similar procedure or transformation many times over.  This is because you can copy and paste syntax, and then edit only the part of the command that changes.   Even opening and saving a data file can be done many times more quickly using syntax, particularly if you are using the same data set over and over again.  This is because simply finding the right file in a complex file structure (inevitable on a large project) can take several minutes, whereas highlighting and running a line of syntax takes a few seconds. 

4. Paste and Learn
One of the unique features of SPSS is that it allows you to paste into a syntax file the commands that underlie the point-and-click procedure you have just completed.  This means that you can start writing and using syntax right from the outset – even with virtually no knowledge of SPSS.  It is also a great way to learn syntax: rather than looking up the syntax for a procedure in the manuals, you can just work out the point-and-click routine and then click Paste.

5. Accessing Extra Resources and Expanding SPSS
There is a fantastic array of free SPSS resources available via the web and SPSS user groups, much of it in the form of syntax files. Sites such as www.spsstools.net offer new routines, automated tasks, and thousands of extra facilities that greatly expand the versatility of the standard SPSS package.  Learning the basics of SPSS syntax will make many of these resources accessible to you and may prove to be the first steps towards creating a few of your own.

For a large collection of SPSS macros and resources, visit Raynald Levesque's www.spsstools.net .