1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address:...

148
1 My contact details • Colin Gray • Room S2 (Thursday mornings, especially) • E-mail address: [email protected] • Telephone: (27) 2234 • Don’t hesitate to drop in or email me.

Transcript of 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address:...

Page 1: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

1

My contact details • Colin Gray

• Room S2 (Thursday mornings, especially)

• E-mail address: [email protected]

• Telephone: (27) 2234

• Don’t hesitate to drop in or email me.

Page 2: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

2

This afternoon’s programme

• 2.05 – 3.00 A short talk.

• 3.00 – 3.20 A break for coffee.

• 3.20 – 4.30 Running an analysis with PASW Statistics 17. (PASW stands for Predictive Analytics Software. This is the new name for SPSS Statistics 17 since IBM’s takeover.)

Page 3: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

3

SESSION 1

The one-way Analysis of Variance

(ANOVA)

Page 4: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

4

The simplest ANOVA design is known as the COMPLETELY

RANDOMISED or ONE-FACTOR, BETWEEN SUBJECTS

experiment.

Page 5: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

5

A one-factor, between subjects experiment

• There are five GROUPS of participants or SUBJECTS.• Each participant is RANDOMLY assigned to ONE and ONLY ONE

of several different groups or conditions.• This type of experiment is said to be of COMPLETELY

RANDOMISED, ONE-FACTOR BETWEEN SUBJECTS or ONE-WAY design.

• An experiment of this design produces INDEPENDENT SAMPLES of scores.

Page 6: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

6

The one-way ANOVA

• The ANOVA of data from a one-factor BETWEEN SUBJECTS experiment is known as the ONE-WAY ANOVA.

• The one-way ANOVA must be sharply distinguished from the one-factor WITHIN SUBJECTS (or REPEATED MEASURES) ANOVA, which is appropriate when each participant is tested under every condition.

• That experimental design produces RELATED SAMPLES of scores.

• The between subjects and within subjects ANOVAs are predicated upon different statistical interpretations, or MODELS of the data.

Page 7: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

7

Results of the experiment(the RAW DATA)

• Each column contains the scores of the ten participants who were tested under one particular condition.

Page 8: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

8

Statistics of the results

Page 9: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

9

Populations versus samples

• We have some data on skilled performance. • We are actually interested in the performance of

people IN GENERAL under these conditions. • The POPULATION is the reference set of all

possible observations. • Our research question is about a population. • Our data are merely a subset or SAMPLE from

the population.

Page 10: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

10

Sampling error

• Draw a large number of samples of fixed size from a population and calculate the mean M and standard deviation SD for each sample.

• The values of M and SD will vary from sample to sample.

• Sampling implies SAMPLING VARIABILITY. • If we take the values of the sample statistics for

characteristics of the population, we shall be in error. So sampling variability is usually termed SAMPLING ERROR.

Page 11: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

11

Parameters versus statistics• STATISTICS are characteristics of samples.• PARAMETERS are characteristics of

populations. • We use Greek letters to denote parameters;

we use Roman letters to denote statistics.

Page 12: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

12

The null hypothesis

• The null hypothesis states that, in the population, all five means have the same value.

• In other words, the null hypothesis states that none of the drugs has any effect.

• It’s as if everyone were performing under the Placebo condition.

Page 13: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

13

Sampling error?

• The values of the means in our data set vary considerably, casting doubt upon the null hypothesis.

• On the other hand, we should expect sampling error to result in differences among the five sample means.

• Are the obtained differences so large as to amount to evidence against H0?

Page 14: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

14

Deviation scores

• A deviation score is a score from which the mean has been subtracted.

• Deviation scores have the very important property that they sum to zero.

Page 15: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

15

Deviations sum to zero

Page 16: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

16

Breakdown of the total deviation

• j is the number of the group to which a participant was assigned: j = 1, 2, 3, 4, 5, corresponding to the Placebo, Drug A, Drug B, Drug C and Drug D groups, respectively.

• So M1 is the Placebo mean, M2 is the mean for the Drug A group, M3

is the mean for the Drug B group, …, M5 is the mean for the Drug D

group.

Page 17: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

17

The total sum of squares

• The total sum of squares is the sum of the squares of all the total deviation scores.

• It is a measure of the TOTAL VARIABILITY of the scores.

Page 18: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

18

Summing and squaring

• Starting with the breakdown of the total deviation and summing and squaring over all scores, we have …

Page 19: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

19

Product terms?

• Where has the product term gone?

• It has disappeared because deviations about the mean sum to zero.

Page 20: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

20

Breakdown (or partition) of the total sum of squares

Page 21: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

21

Interpretation of the partition

• The between groups deviation (and sum of squares) partly reflects any differences that there may be among the population means.

• It also reflects random influences such as sampling error and other contributors to the “noisiness” of the data. These influences are collectively known as ERROR.

• The within groups deviation and within groups sum of squares reflect only error.

Page 22: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

22

How the one-way ANOVA works

• The variance BETWEEN the treatment means is compared with the average variance of scores around their means WITHIN the treatment groups.

• The comparison is made with a statistic called F.

Page 23: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

23

Mean squares

• In the ANOVA, a variance estimate is known as a MEAN SQUARE, which is expressed as a SUM OF SQUARES (SS), divided by a parameter known as the DEGREES OF FREEDOM (df).

Page 24: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

24

A mean square

Page 25: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

25

Degrees of freedom

• The term DEGREES OF FREEDOM is borrowed from physics.

• The degrees of freedom of a system is the number of constraints necessary to determine its state completely.

• Deviations of n values about their mean sum to zero. So if you know (n – 1) deviations, you know the nth deviation.

• The sum of squares of the n deviations has only (n – 1) degrees of freedom.

Page 26: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

26

What the F statistic is measuring

• The building-block for MSbetween is the between groups deviation of the group mean from the grand mean.

• The building-block for MSwithin is the within groups deviation of a score from its group mean.

Page 27: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

27

Repeated sampling

• Suppose the null hypothesis is true.• Imagine the experiment were to be repeated

thousands and thousands of times, with fresh samples of participants each time.

• There would be thousands and thousands of data sets, from each of which a value of F could be calculated.

• The values of F would vary considerably. The distribution of F with repeated sampling is known as its SAMPLING DISTRIBUTION.

Page 28: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

28

Expected value

• The expected value of a statistic such as F is its long run mean value with repeated sampling.

• The expected value of F, written as E(F), is thus the mean of the sampling distribution of the statistic.

• If the null hypothesis is true and there are no differences among the population means, the expected value of F is close to (though not exactly) unity.

Page 29: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

29

Summary of the one-way ANOVA

Page 30: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

30

Calculating MSwithin

• In the equal-n case, we can simply take the mean of the cell variance estimates.

• MSwithin = (3.33 + 4.54 + 6.22 + 20.27 + 14.00)/5

= 48.36/5 = 9.67

Page 31: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

31

Degrees of freedom of the within groups mean square

Page 32: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

32

The between groups sum of squares revisited

• There are 50 terms in the summation.• But Mj – M has only FIVE different values. • So all ten subjects in any group get the same

value for Mj – M .

Page 33: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

33

Finding SSbetween

Page 34: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

34

Degrees of freedom of the between groups mean square

• SSbetween is calculated from only 5 different values.

• But deviations about the mean sum to zero, so if you know FOUR deviations about the grand mean, you know the fifth.

• The between groups mean square has FOUR degrees of freedom.

Page 35: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

35

Finding MSbetween

Page 36: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

36

The value of F• The value of F is clearly much greater than the

expected value of close to 1 under the null hypothesis.

Page 37: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

37

Range of variation of F

• The F statistic is the ratio of two sample variances.

• A variance can take only non-negative values.

• So the lower limit for F is zero.

• There is, however, no upper limit for F.

Page 38: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

38

Specifying the sampling distribution

• To test the null hypothesis, you must be able to locate the value of F you obtained from your data in its theoretical sampling distribution

• To specify the correct distribution of F (or any other test statistic), you must assign values to properties known as PARAMETERS.

Page 39: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

39

Parameters of F

• Recall that the t distribution has ONE parameter: the DEGREES OF FREEDOM (df ).

• The F distribution has TWO parameters: the degrees of freedom of the between groups and within groups mean squares, which we shall denote by dfbetween and dfwithin, respectively.

Page 40: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

40

The correct F distribution

• We shall specify an F distribution with the notation F (dfbetween, dfwithin).

• We have seen that in our example, dfbetween = 4 and dfwithin = 45.

• The correct F distribution for our test of the null hypothesis is therefore F(4, 45).

• This specifies a whole POPULATION of values of F with which we can compare our own value.

Page 41: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

41

The distribution of F(4, 45)

Page 42: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

42

Expected value of F under the null hypothesis

Page 43: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

43

The critical region

• If the value of F is greater than the 95th percentile, reject the null hypothesis.

Page 44: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

44

The p-value of F

• The p-value is the probability of a value at least as extreme as the one obtained – the grey area.

• If the p-value is less than .05, you’re in the critical region and the null hypothesis is rejected.

Page 45: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

45

The ANOVA summary table

• The results of the ANOVA are displayed in the ANOVA summary table.

• The table contains: 1. a list of sources of variance.2. the degrees of freedom of each source.3. its sum of squares.4. its mean square.5. the value of F. 6. the p-value of F.

Page 46: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

46

The ANOVA summary table

Page 47: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

47

Reporting the result

• There is a correct format for reporting the results of a statistical test. This is described in the APA publications manual.

• Never report a p-value as ‘.000’ – that’s not acceptable in a scientific report.

• Write, • “With the alpha-level set at .05, F is significant: F(4, 45)

= 9.09; p <.01.” • Some prefer to give p-values to three places of decimals.• You are now expected to include a measure of EFFECT

SIZE as well. More on this later.

Page 48: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

48

Lisa DeBruine’s guidelines

• Lisa DeBruine has compiled a very useful document describing the most important of the APA guidelines for the reporting of the results of statistical tests.

• I strongly recommend this document, which is readily available on the Web.

• http://www.facelab.org/debruine/Teaching/Meth_A/

• Sometimes the APA manual is unclear. In such cases, Lisa has opted for what seems to be the most reasonable interpretation.

• If you follow Lisa’s guidelines, your submitted paper won’t draw fire on account of poor presentation of your statistics!

Page 49: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

49

A two-group, between subjects experiment

Page 50: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

50

ANOVA or t test?

We can compare the two means by using an independent-samples t test.

But what would happen if, instead of making a t test, we were to run an ANOVA to test the null hypothesis of equality of the means?

Page 51: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

51

Same result!

• Observe that F = t2 .• Observe, however,

that the p-value is the same for both tests.

• The ANOVA and the independent-samples t test are EXACTLY EQUIVALENT and result in the same decision about the null hypothesis.

Page 52: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

52

Implications of a significant F

• Our F test has shown a significant effect of the Drug factor. What can we conclude?

• We can say that the null hypothesis is false.

• That means that, in the population, the means do not all have the same value.

• But it does not tell us WHICH differences among our group means are significant.

Page 53: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

53

Making comparisons among the five treatment means

Page 54: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

54

Planned comparisons

• Suppose that, before you ran your experiment, you had planned to make a set of specified comparisons among the treatment means.

• For example, you might have planned to compare the mean of the Placebo group with the mean for each of the drug conditions.

• I am going to describe how such comparisons are made.

• I am also going to compare the properties of different comparison sets.

Page 55: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

55

Simple and complex comparisons

• A comparison between any two of the array of 5 means is known as a SIMPLE comparison.

• Comparisons between the Placebo mean and each of the others are simple comparisons.

• But you might want to compare, not single means, but aggregates (means) of means.

• For example, you might want to compare the Placebo mean with the mean of the four drug means.

• Such comparisons between aggregates are known as COMPLEX comparisons.

Page 56: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

56

Examples

Page 57: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

57

Non-independent comparisons• The simple

comparison of M5 with M1 and the complex comparison are not independent or ORTHOGONAL.

• The value of M5 feeds into the value of the average of the means for the drug groups.

Page 58: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

58

Systems of comparisons

• We shall now look at the properties of different sets or systems of comparisons.

• Which comparisons are independent or ORTHOGONAL?

• How much VARIANCE can we attribute to different comparisons?

• How can we test a comparison for SIGNIFICANCE?

Page 59: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

59

Linear functions

• Y is a linear function of X if the graph of Y upon X is a straight line.

• For example, temperature in degrees Fahrenheit is a linear function of temperature in degrees Celsius.

Page 60: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

60

A linear (straight line) function

• The coefficient of C is the SLOPE of the line and the constant is the INTERCEPT, which is 320 from the zero

point along the vertical (Fahrenheit) axis.

Page 61: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

61

Equation of a straight line

• Where b0 and b are the slope and intercept, respectively.

Page 62: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

62

The general linear equation

• You have p independent variables, x1, x2, …, xp.

• The general linear equation is:

Page 63: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

63

Linear contrasts

• Any comparison can be expressed as a sum of terms, each of which is a product of a treatment mean and a coefficient such that the coefficients sum to zero.

• When so expressed, the comparison is a LINEAR CONTRAST, because it has the form of a linear function.

• It looks artificial at first, but this notation enables us to study the properties of systems of comparisons among the treatment means.

Page 64: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

64

The complex comparison of the Placebo mean with the mean of the means of the four drug conditions

can be expressed as a linear function of the five treatment

means …

Page 65: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

65

Notice that the coefficients sum to zero

Page 66: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

66

Notation for a contrast

• The Greek symbol psi is often used to denote the value of a contrast.

Page 67: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

67

More compactly, if there are k treatment groups, we can write

Page 68: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

68

A more compact formula

• There are k terms in this summation.

Page 69: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

69

Simple contrasts: Include all the means

Page 70: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

70

Drop the M’s and just work with the coefficients

Page 71: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

71

Helmert contrasts

• Compare the first mean with the mean of the other means.

• Drop the first mean and compare the second mean with the mean of the remaining means. Drop the second mean.

• Continue until you arrive at a comparison between the last two means.

Page 72: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

72

Helmert contrasts…

• Our first contrast is 1, -¼, -¼, -¼, -¼

• Our second contrast is0, 1, -⅓ , -⅓, -⅓

• Our third contrast is0, 0, 1, -½, -½

• Our fourth (and final) contrast is 0, 0, 0, 1, -1

Page 73: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

73

Getting rid of the fractions

Page 74: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

74

Orthogonal contrasts

• The first Helmert contrast in no way constrains the value of the second, because the first mean has been dropped.

• The first two contrasts do not affect the third, because the first two means have been dropped.

• This is a set of four independent or ORTHOGONAL contrasts.

Page 75: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

75

The orthogonal property

• As with all contrasts, the coefficients in each row sum to zero.

• In addition, the sum of the PRODUCTS OF CORRESPONDING COEFFICIENTS in any pair of rows is zero.

• This means that we have an ORTHOGONAL contrast set.

Page 76: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

76

Size of an orthogonal set

• In general, for an array of k means, you can construct a set of, at most, k – 1 orthogonal contrasts.

• In the present ANOVA example, k = 5, so the rule tells us that there can be no more than 4 orthogonal contrasts in the set.

• Several different orthogonal sets, however, can often be constructed for the same set of means.

Page 77: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

77

Contrast sums of squares

• We have seen that in the one-way ANOVA, the value of SSbetween reflects the sizes of the differences among the treatment means.

• In the same way, it is possible to measure the importance of a contrast by calculating a sum of squares which reflects the variation attributable to that contrast alone

• We can use an F statistic to test each contrast for significance.

Page 78: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

78

Formula for a contrast sum of squares

Page 79: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

79

Formula for a contrast sum of squares

• In the numerator, the value of the contrast is squared and multiplied by the number of participants in the group.

• In the denominator, is the sum of the squares of the coefficients in the contrast.

Page 80: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

80

Here, once again, is our set of Helmert contrasts, to which I have

added the values of the five treatment means

Page 81: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

81

Helmert contrast coefficients with means added

Page 82: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

82

Add the sum of the squared coefficients

Page 83: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

83

Add the sum of products

Page 84: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

84

Value of the sum of squares

• Just plug the values into the formula.

Page 85: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

85

Do this for the whole set

Page 86: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

86

Non-orthogonal contrasts

• Contrasts don’t have to be independent.

• For example, you might wish to compare each of the four drug groups with the Placebo group.

• What you want are SIMPLE CONTRASTS.

Page 87: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

87

Simple contrasts

• These are linear contrasts – each row sums to zero. • But they are not orthogonal – in any pairing of rows, the

sum of products of corresponding coefficients is not zero.

• The contrast sums of squares will not sum to the between groups sum of squares.

Page 88: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

88

Testing a contrast sum of squares for significance

Page 89: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

89

Two approaches

• A contrast is a comparison between two means.

• You can therefore make an F test or you can make a t test.

• The two tests are equivalent.

Page 90: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

90

Degrees of freedom of a contrast sum of squares

• A contrast sum of squares compares two means; even though one mean may be an aggregate of several others.

• A contrast sum of squares, therefore, has ONE degree of freedom, because the two deviations from the grand mean sum to zero.

Page 91: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

91

Since a contrast sum of squares has one degree of freedom, …

Page 92: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

92

Degrees of freedom of F

• The numerator df = 1.

• The denominator df is just the df for the error term in the full ANOVA (45)

Page 93: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

93

Testing the first Helmert contrast

Page 94: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

94

Traditional t test formula

Page 95: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

95

The equal-n case

• With equal groups, the formula for t simplifies to:

Page 96: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

96

In the context of ANOVA

• This test incorporates the pooled estimate of the population variance, with greater degrees of freedom. The test has more POWER than one based only on the data from two groups.

Page 97: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

97

Modifying the t statistic

Page 98: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

98

Applying the formula

Page 99: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

99

Equivalence of the F and t tests

Page 100: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

100

Heterogeneity of variance: the Behrens-Fisher statistic

• With marked heterogeneity of variance, the usual pooling of the sample variances is abandoned and the test statistic is:

Page 101: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

101

The Behrens-Fisher problem

• What is the value of the degrees of freedom of T?

• If n1 > n2, the degrees of freedom of T lies between n2 – 1 and the traditional value of n1 + n2 – 2.

• Several solutions to the problem of finding the degrees of freedom more precisely have been proposed.

Page 102: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

102

The Welch-Satterthwaite solution

• This is the solution used by PASW.

• Others have been proposed more recently.

Page 103: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

103

In this case, testing with T doesn’t make

much difference

Page 104: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

104

Summary

• A contrast is a comparison between two means, so its sum of squares has ONE degree of freedom.

• The contrasts can therefore be tested with either F or t. (F = t2.)

• If the contrasts (Helmert) form an orthogonal set, the contrast sums of squares sum to the value of SSbetween.

Page 105: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

105

Coffee break

Page 106: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

106

PASW Statistics 17

Page 107: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

107

Comparison with SPSS 16

• From the user’s point of view, PASW Statistics 17 is similar to SPSS 16.

• Some commands now appear in different menus than they did in SPSS 16.

• There are some new options.

• Some old problems and pitfalls remain.

• The same general user guidelines apply to all versions of PASW and SPSS.

Page 108: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

108

The Data Editor

• In SPSS/PASW, there are two display modes:• 1. VARIABLE VIEW. This contains information about

the variables in your data set.• 2. DATA VIEW. This spreadsheet-like display contains

your numerical data, which are referred to as “values” by PASW: as far as we are concerned, “values” are always numbers. (We shall not be working with string variables such as lists of names or cities.)

• WORK IN VARIABLE VIEW FIRST, because1. that will make it much easier to enter and view your

data in Data View. 2. you can improve the quality of the output.

Page 109: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

109

Variable names versus variable labels

• Variable names are for your convenience while working in the Data Editor.

• They can be very cryptic, so long as you know what they mean.

• Variable names appear only in Data View. • Variable LABELS are transparent and

should be understandable by an outsider. They will appear in the output.

Page 110: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

110

Grouping variables: assign value labels

• Values are numbers. They might be scores; but they also include the arbitrary code numbers making up GROUPING VARIABLES.

• Value labels tell you what the code numbers mean.

• They are ESSENTIAL. • If you do not assign value labels to the code

numbers and you leave the data file for some time, you won’t remember whether 1 and 2 were male and female, respectively, or vice versa.

Page 111: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

111

Assigning value labels to values while in Variable View

Page 112: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

112

Displaying value labels

• You can see the labels in Data View by clicking on the luggage ticket in the View menu.

Page 113: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

113

Levels of measurement

SPSS/PASW classifies data according to the LEVEL OF MEASUREMENT. There are 3 levels:

1. SCALE data, which are measures on an independent scale with units. Heights, weights, performance scores, counts and IQs are scale data. Each score has ‘stand-alone’ meaning. Two more or less equivalent terms are CONTINUOUS and INTERVAL.

2. ORDINAL data, which are RANKS. A rank has meaning only in relation to the other individuals in the sample. It has no ‘stand-alone’ meaning.

3. NOMINAL data, which are assignments to categories. (So-many males, so-many females.) Nominal data are records of CATEGORICAL or QUALITATIVE variables.

Page 114: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

114

Specifying the level of measurement

Page 115: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

115

The drug experiment again

• Each column contains the scores of the ten participants who were tested under one particular condition.

• Notice that each line contains data from several subjects/participants. This won’t do for PASW!

Page 116: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

116

SPSS/PASW data sets

• One line for each case/participant/subject. • The columns are variables.• We need a variable for the scores. • We need a grouping variable to indicate

treatment group or category membership.• For the data from the drug experiment, we

shall need only two variables (columns): one for the scores, the other for group membership.

Page 117: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

117

Variable View completed

Page 118: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

118

Alternative Data Views

Page 119: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

119

Points

• As always with PASW data files, each row contains data on one person only.

• Only two columns are needed.

• One column contains code numbers (values) indicating group membership.

• The other contains the scores that the participants achieved.

Page 120: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

120

Finding the one-way ANOVA

Page 121: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

121

The one-way dialog

Page 122: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

122

Options

Page 123: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

123

Beware of the means plot!

• With some default graphs, SPSS/PASW follows aesthetic guidelines.

• As a result, some graphs can be highly misleading.

• Here is the means plot for another data set from an experiment of the same design.

Page 124: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

124

A means plot

Page 125: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

125

A false picture!

• The table of means shows miniscule differences among the five group means.

• The p-value of F is very high – unity to two places of decimals.

• Nothing going on here!

Page 126: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

126

A microscopic vertical scale

• Only a microscopically small section of the scale is shown on the vertical axis: 10.9 to 11.4!

• Even small differences among the group means look huge.

Page 127: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

127

Into the Chart Editor

• Double-click on the image to get into the Chart Editor.

• Double-click on the vertical axis to access the scale

specifications.

Page 128: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

128

Specify zero as the minimum point

• Uncheck the minimum value box and enter zero as the desired minimum point.

• Click Apply.

Page 129: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

129

Zero point now included

• The effect is dramatic! • The profile is now as flat

as a pancake. • The graph now accurately

depicts the results. • Always be suspicious of

graphs that do not show the ZERO POINT on the VERTICAL SCALE.

Page 130: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

130

Simple contrasts with SPSS

• Here are the entries for the first contrast, which is between the Placebo and Drug A groups.

• Notice that you must enter five coefficients.

• Below that is the entry for the final contrast between the Placebo and Drug D groups.

Page 131: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

131

The results

• In the column headed ‘Value of Contrast’, are the differences between pairs of treatment means.

• For example, Drug A mean minus Placebo mean = 7.90 - 8.00 = -.10. Drug D – Placebo = 13.00 – 8.00 = 5.00.

Page 132: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

132

Save time with Syntax!

• A computing package can be told to run specified analyses by means of a system of written instructions known as CONTROL LANGUAGE.

• In PASW/SPSS, the language is known as SYNTAX.

• If you have to run the same procedure again and again, you should create the appropriate syntax file and save it.

• At your next session, you need only open the data file and run the whole analysis using the syntax file instead of filling in all the boxes and pressing all the buttons again.

Page 133: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

133

The Paste button

• In the ANOVA dialog, simply transfer the group and score variables. That orders the basic analysis.

• Click the Paste button at the foot of the One-way ANOVA dialog.

Page 134: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

134

Pasting the syntax

Page 135: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

135

The basic one-way ANOVA syntax

Page 136: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

136

Structure of a Syntax command

• When the command keyword is blue, the command has the correct syntax and should run.

Page 137: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

137

Check that the data set is active

Page 138: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

138

Choose some options

• Observe what happens to the syntax file when we press the appropriate buttons and choose a means plot, descriptives, Tukey multiple-comparisons and order Helmert planned contrasts.

Page 139: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

139

I press buttons to order Descriptives and a profile plot.

Page 140: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

140

Descriptives and means plots

Page 141: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

141

I click the Post Hoc button and select Tukey multiple pairwise

comparisons.

Page 142: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

142

Tukey tests added

Page 143: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

143

Helmert contrasts

• Let’s order a set of Helmert contrasts.

• Click the Contrasts button and proceed as follows:

Page 144: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

144

The Contrasts dialog

Page 145: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

145

To enter the whole set …

• Don’t return to the One-way ANOVA dialog yet. Click the Next button and enter the next row of contrast coefficients.

• Continue until the whole set of contrasts has been entered, then click the Continue button to return to the One-way ANOVA dialog.

• Now look at the syntax file.

Page 146: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

146

Syntax for Helmert contrasts

Page 147: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

147

Don’t write, just paste!

• Notice that I haven’t written anything.

• I have produced all this syntax merely by pressing the Paste button.

• But I can easily adapt the analysis for other variables and data sets.

Page 148: 1 My contact details Colin Gray Room S2 (Thursday mornings, especially) E-mail address: psy045@abdn.ac.ukpsy045@abdn.ac.uk Telephone: (27) 2234 Dont hesitate.

148

In summary

• The one-way ANOVA tests the null hypothesis of equality of ALL the means by comparing the variance between groups with the variance within groups.

• Further analysis is necessary for the testing of comparisons among individual group means.

• Report the results of your analysis in APA format, following Lisa DeBruine’s guidelines.

• In SPSS/PASW, work in Variable View first. • In the ANOVA output, watch out for the profile plots. • Save time with syntax!