239
1 Is Spatial Memory Age- Related? There is a commonly-held belief that it is more difficult for the Elderly than for the Young to learn and remember new material. It is possible that the Elderly have a reduced capacity to recall or retain learnt information, but there are alternative explanations that relate to the way in which they learn. For example the Elderly may use fewer, or less suitable, strategies for memorising the material, or they may be over-confident in their own abilities

Is Spatial Memory Age-Related?

  • Upload
    earl

  • View
    20

  • Download
    0

Embed Size (px)

DESCRIPTION

There is a commonly-held belief that it is more difficult for the Elderly than for the Young to learn and remember new material. - PowerPoint PPT Presentation

Citation preview

Page 1: Is Spatial Memory Age-Related?

1

Is Spatial Memory Age-Related? There is a commonly-held belief that it is more difficult for the Elderly than for the Young to learn and remember new material.

It is possible that the Elderly have a reduced capacity to recall or retain learnt information, but there are alternative explanations that relate to the way in which they learn.

For example the Elderly may use fewer, or less suitable, strategies for memorising the material, or they may be over-confident in their own abilities and so devote insufficient time to learning the material.

Page 2: Is Spatial Memory Age-Related?

2

Is Spatial Memory Age-Related? In order to investigate spatial memory, a study was carried out on two groups of people, designated as Young (20-25) and Elderly (over 65).

The trick is to see if you can answer the questions posed and write your conclusions in plain English?

Page 3: Is Spatial Memory Age-Related?

3

Is Spatial Memory Age-Related? In the study, 18 labelled objects were arranged randomly on a 10 x 10 grid.

Page 4: Is Spatial Memory Age-Related?

4

Is Spatial Memory Age-Related? Thirteen Young and fourteen Elderly subjects were allowed to examine the positions of the objects for as long as they liked and were subsequently asked to recall these positions by replacing the objects on the grid.

Their study times and two measures of recall performance were recorded.

Page 5: Is Spatial Memory Age-Related?

5

Is Spatial Memory Age-Related? The main objective is to compare the age groups.

agegroup Age group, defined as 1 = Elderly or 2 = Young.

subject Identification number for each subject within the age groups.

ncorrect Number of objects correctly replaced (out of 18).

pccorrect Percentage of objects correctly replaced.

cityblock City block score – a measurement of the errors between the target and actual positions.

time Study time – the time each individual spent examining the positions of the object.

Page 6: Is Spatial Memory Age-Related?

6

Is Spatial Memory Age-Related?

Skip to second lecture

Skip to first test

Skip to third lecture

The city block score, attempts to account for near misses by measuring the distances (in “city blocks”, i.e. horizontal and vertical steps across the grid) between the actual and replaced positions, and totalling these over the 18 objects.

Skip to fourth lecture

Page 7: Is Spatial Memory Age-Related?

7

Is Spatial Memory Age-Related? The main objective is to compare the age groups.

One particular topic that might arise here is the risk of confounding in the two group study because any differences seen between the Young and Elderly might be due not to their age differences but to difference(s) in some other variable(s).

Page 8: Is Spatial Memory Age-Related?

8

Is Spatial Memory Age-Related? In this study the groups were, in fact, generally balanced in terms of sex ratio, IQ and educational experience, but this does not preclude the possibility that further, unsuspected, differences are present. Additionally, some people naturally tend to process information verbally, while others process information spatially or visually. Thus, a person who processes information verbally may score poorly in the spatial memory test although (s)he may have a generally good memory.

Page 9: Is Spatial Memory Age-Related?

9

Is Spatial Memory Age-Related? We are going to use some basic graphs to explore the data, particularly to compare the results of the Elderly and Young groups. We shall first look at boxplots.

Page 10: Is Spatial Memory Age-Related?

10

Is Spatial Memory Age-Related? Question - What can you tell about the scores achieved by the two age groups? To what extent do the scores for the two groups overlap? Comment on the median scores and the variation in scores within each group.

Page 11: Is Spatial Memory Age-Related?

11

Is Spatial Memory Age-Related? Graphs > Legacy Dialogs > Boxplot

Page 12: Is Spatial Memory Age-Related?

12

Is Spatial Memory Age-Related? Simple > Define

Page 13: Is Spatial Memory Age-Related?

13

Is Spatial Memory Age-Related? ncorrect for the variables and agegroup for the Category Axis

Page 14: Is Spatial Memory Age-Related?

14

Is Spatial Memory Age-Related? Finally

Question - What can you tell about the scores achieved by the two age groups? To what extent do the scores for the two groups overlap? Comment on the median scores and the variation in scores within each group.

Page 15: Is Spatial Memory Age-Related?

15

Is Spatial Memory Age-Related? Answer - On the whole Elderly subjects got fewer correct than the Young, with scores for the Elderly group overlapping the lowest quartile of scores achieved by Young subjects. Although scores for the Elderly were typically lower, the lowest scores achieved in each group were the same. One person, case number 5, in the Elderly group has been identified as an outlier. The scores for the Young were more spread out and most were over 10.

Page 16: Is Spatial Memory Age-Related?

16

Is Spatial Memory Age-Related? Question - What do the boxplots tell you about the differences between the age groups in their city block scores? Remember that the city block score measures the errors made in positioning objects on the grid. Look at the medians, the Inter Quartile Ranges (IQR) and comment on the degree of overlap. Does the diagram show any outliers?

Page 17: Is Spatial Memory Age-Related?

17

Is Spatial Memory Age-Related? cityblock for the variables and agegroup for the Category Axis

Question - What do the boxplots tell you about the differences between the age groups in their city block scores? Look at the medians, the Inter Quartile Ranges (IQR) and comment on the degree of overlap. Does the diagram show any outliers?

Page 18: Is Spatial Memory Age-Related?

18

Is Spatial Memory Age-Related? Answer - The median city block score is approximately 12 for the Young subjects and 27 for the Elderly. This means that generally the Young subjects were more accurate in placing the objects than the Elderly. The upper quartile for the Young subjects is about the same as the lower quartile for the Elderly subjects. This means that three quarters of Young subjects have city block scores similar to those of the lowest scoring (most accurate) quarter of the Elderly subjects. The IQR is similar for both groups and neither group has any outliers.

Page 19: Is Spatial Memory Age-Related?

19

Is Spatial Memory Age-Related? Question - Now use boxplots to compare the study times of the two groups and comment on the results. Look at the same features as in the last two questions and also comment on the shape of each graph.

Page 20: Is Spatial Memory Age-Related?

20

Is Spatial Memory Age-Related? time for the Variables and agegroup for the Category Axis

Question - Now use boxplots to compare the study times of the two groups and comment on the results. Look at the same features as in the last two questions and also comment on the shape of each graph.

Page 21: Is Spatial Memory Age-Related?

21

Is Spatial Memory Age-Related? Answer - Almost all of the Elderly subjects spent much less time on the task than Young subjects. The median study times are 42.5 seconds for Elderly subjects and 95 seconds for Young subjects. Both groups have a slight positive skew. Two Elderly subjects are shown as outliers as the result of taking longer than other subjects in the same group.

Page 22: Is Spatial Memory Age-Related?

22

Is Spatial Memory Age-Related? Question - From the evidence above do you think that city block score or number correct is better as a measurement of memory?

Page 23: Is Spatial Memory Age-Related?

23

Is Spatial Memory Age-Related? Answer - The number correct is a crude, but easy way of measuring spatial memory; it does not allow for “near-misses”. Comparing, for example, the two sets of boxplots, we see that comparing the Elderly and Young, the former do not get many repositions absolutely right. However, in the city block scores, although the Young group are generally better, some of the Elderly do just as well and some of the Young are just as poor as the Elderly. City block score seems to be a better method.

Page 24: Is Spatial Memory Age-Related?

24

Is Spatial Memory Age-Related? In the next few questions we will look at some alternatives to the boxplots used above, to see whether other diagrams can be equally successful as a tool for showing the differences between groups.

First try using stem and leaf plots.

Page 25: Is Spatial Memory Age-Related?

25

Is Spatial Memory Age-Related? Question - What are the differences between the age groups in the number of correctly placed objects? How well do the diagrams allow you to make comparisons between the groups of subjects?

Page 26: Is Spatial Memory Age-Related?

26

Is Spatial Memory Age-Related? Analyze > Descriptive Statistics > Explore

Page 27: Is Spatial Memory Age-Related?

27

Is Spatial Memory Age-Related? Select ncorrect for the Dependent List box Select agegroup for the Factor List

Page 28: Is Spatial Memory Age-Related?

28

Is Spatial Memory Age-Related? Finally number correct Stem-and-Leaf Plot for

agegroup= Elderly Frequency Stem & Leaf 1.00 Extremes (=<5.0) 2.00 6 . 00 2.00 7 . 00 7.00 8 . 0000000 2.00 9 . 00 Stem width: 1 Each leaf: 1 case(s)number correct Stem-and-Leaf Plot foragegroup= Young Frequency Stem & Leaf .00 0 . 4.00 0 . 5799 8.00 1 . 01123444 1.00 1 . 6 Stem width: 10 Each leaf: 1 case(s)

2*6 2*7 7*8 2*9

5,7,9,910,11,11,12,13,14,14,1416

Question - What are the differences between the age groups in the number of correctly placed objects? How well do the diagrams allow you to make comparisons between the groups of subjects?

Page 29: Is Spatial Memory Age-Related?

29

Is Spatial Memory Age-Related? Answer - This is not a particularly helpful way to draw the data here as the diagrams for the two groups are not displayed side by side as they were in the boxplots. Also the ‘leaf’ for the Elderly consists of one unit where as each ‘leaf’ for the Young subjects covers 5 units. The boxplot shown below the stem and leaf diagram (and constructed earlier) is much clearer .

Page 30: Is Spatial Memory Age-Related?

30

Is Spatial Memory Age-Related? Barcharts are helpful when we have discrete variables with not too many values.

Page 31: Is Spatial Memory Age-Related?

31

Is Spatial Memory Age-Related? Question - Describe the distribution of the number of correctly replaced objects. What do you notice about the horizontal axis?

Page 32: Is Spatial Memory Age-Related?

32

Is Spatial Memory Age-Related? Graphs > Legacy Dialogs > Bar

Page 33: Is Spatial Memory Age-Related?

33

Is Spatial Memory Age-Related? Simple > Define

Page 34: Is Spatial Memory Age-Related?

34

Is Spatial Memory Age-Related? Select ncorrect for the Category Axis and click on % of cases

Page 35: Is Spatial Memory Age-Related?

35

Is Spatial Memory Age-Related? Finally

Question - Describe the distribution of the number of correctly replaced objects. What do you notice about the horizontal axis?

Page 36: Is Spatial Memory Age-Related?

36

Is Spatial Memory Age-Related? Answer - There were 18 objects to be correctly replaced on the grid; the highest score was 16 and the lowest 5. The most frequent number of objects replaced correctly (the mode) is 8. Only 9 of the 27 subjects, i.e. one third, replaced more than half correctly. The horizontal axis is in order but not drawn to scale – individual values are treated as categories, so that 14 and 16 are shown as adjacent values.

Page 37: Is Spatial Memory Age-Related?

37

Is Spatial Memory Age-Related? A variation of this can help us to see the differences between the Elderly and Young groups.

Question - What does this tell you about the distribution of the number correct in the two groups?

Page 38: Is Spatial Memory Age-Related?

38

Is Spatial Memory Age-Related? Select Barchart as before then Stacked > Define

Page 39: Is Spatial Memory Age-Related?

39

Is Spatial Memory Age-Related? Select ncorrect for the Category Axis and agegroup for the box labelled and Define Stacks by Under Bars Represent select % of cases

Page 40: Is Spatial Memory Age-Related?

40

Is Spatial Memory Age-Related? Finally

Question - What does this tell you about the distribution of the number correct in the two groups?

Page 41: Is Spatial Memory Age-Related?

41

Is Spatial Memory Age-Related? Answer - All of those with more than half right were in the Young group. Scores for this group range from 5 to 16. The Elderly group’s scores range from 5 to 9, with half of the group scoring 8 correct.

The stacked Barchart shows clearly that the Young are more successful than the Elderly in replacing the objects correctly.

Page 42: Is Spatial Memory Age-Related?

42

Is Spatial Memory Age-Related? In the same way, draw barcharts for city block score for the two age groups.

Be careful to check how different scores and times are shown on the x-axis.

Page 43: Is Spatial Memory Age-Related?

43

Is Spatial Memory Age-Related? In the same way, draw barcharts for study time stacked for the two age groups.

Be careful to check how different scores and times are shown on the x-axis.

Page 44: Is Spatial Memory Age-Related?

44

Is Spatial Memory Age-Related? Question - Are these barcharts a good way of showing the differences between the age groups in city block scores and study times?

Page 45: Is Spatial Memory Age-Related?

45

Is Spatial Memory Age-Related? Answer - Not really, as there are blocks for each value that may not be evenly spaced. Also the default graphs have rather too many bars.

The graphs show that the Elderly generally take shorter study times than the Young but that their city block scores are generally poorer.

Page 46: Is Spatial Memory Age-Related?

46

Is Spatial Memory Age-Related? Histograms are used to represent the frequency distributions of continuous variables.

Page 47: Is Spatial Memory Age-Related?

47

Is Spatial Memory Age-Related? Question - Are study time or city block scores continuous variables?

Page 48: Is Spatial Memory Age-Related?

48

Is Spatial Memory Age-Related? Answer - Time is usually regarded as a continuous variable. The city block score, being the sum of blocks in horizontal and vertical directions is a discrete variable.

Page 49: Is Spatial Memory Age-Related?

49

Is Spatial Memory Age-Related? Question – How easy is it to compare the distribution of study time between the Young and Elderly groups? What is the main problem?

Page 50: Is Spatial Memory Age-Related?

50

Is Spatial Memory Age-Related? Analyze > Descriptive Statistics > Explore

Page 51: Is Spatial Memory Age-Related?

51

Is Spatial Memory Age-Related? Select time for the Dependent List box and age group for the Factor Listbox Under Display, select Plots

Page 52: Is Spatial Memory Age-Related?

52

Is Spatial Memory Age-Related? Click on the Plots button De-select Stem and Leaf and select Histogram

Page 53: Is Spatial Memory Age-Related?

53

Is Spatial Memory Age-Related? Finally - Question – How easy is it to compare the distribution of time between the Young and Elderly groups? What is the main problem?

Page 54: Is Spatial Memory Age-Related?

54

Is Spatial Memory Age-Related? Answer - Making comparisons is not easy as you have to keep looking backwards and forwards between two diagrams. The biggest problem is that the diagrams use different scales and this makes comparisons very difficult.

Page 55: Is Spatial Memory Age-Related?

55

Is Spatial Memory Age-Related? The purpose of this experiment was to see if there is a difference in the spatial memories of the two Age groups. We shall first look at the summary statistics, measures of location (mean and median) and dispersion (standard deviation, range and inter-quartile range) of the times taken to study the grid for each of the age groups in order to compare them.

Page 56: Is Spatial Memory Age-Related?

56

Is Spatial Memory Age-Related? Analyze > Descriptive Statistics > Explore as beforeSelect time for the Dependent ListboxSelect age group for the Factor Listbox Under Display choose Both

Page 57: Is Spatial Memory Age-Related?

57

Is Spatial Memory Age-Related? The descriptive statistics.

Descriptives

50.71 6.019

37.71

63.72

49.40

42.50

507.143

22.520

25

100

75

25

1.235 .597

.639 1.154

98.85 8.227

80.92

116.77

98.72

95.00

879.808

29.662

55

145

90

50

.074 .616

-.908 1.191

Mean

Lower Bound

Upper Bound

95% ConfidenceInterval for Mean

5% Trimmed Mean

Median

Variance

Std. Deviation

Minimum

Maximum

Range

Interquartile Range

Skewness

Kurtosis

Mean

Lower Bound

Upper Bound

95% ConfidenceInterval for Mean

5% Trimmed Mean

Median

Variance

Std. Deviation

Minimum

Maximum

Range

Interquartile Range

Skewness

Kurtosis

Age groupElderly

Young

Study timeStatistic Std. Error

Question - Describe the differences between the Elderly and Young age groups in the average times they took to study the grid.

Page 58: Is Spatial Memory Age-Related?

58

Is Spatial Memory Age-Related? The boxplot

Question - Describe the differences between the Elderly and Young age groups in the average times they took to study the grid.

Page 59: Is Spatial Memory Age-Related?

59

Is Spatial Memory Age-Related? Question - Describe the differences between the Elderly and Young age groups in the average times they took to study the grid.

Age group Statistic

ElderlyMean 50.71

Median 42.50

YoungMean 98.85

Median 95.00

Page 60: Is Spatial Memory Age-Related?

60

Is Spatial Memory Age-Related? Answer - The mean and median values of the study times of the Young group (98.85 seconds and 95.00 seconds respectively) are much greater than those of the Elderly group (50.71 seconds and 42.50 seconds respectively). The mean and median values for the Young groups are close, those for the Elderly group quite different.

Age group Statistic

ElderlyMean 50.71

Median 42.50

YoungMean 98.85

Median 95.00

Page 61: Is Spatial Memory Age-Related?

61

Is Spatial Memory Age-Related? Question - Describe the differences between the Elderly and Young age groups in variability of the times they took to study the grid.

Age group Statistic

ElderlyVariance 507.143

Std. Deviation

22.520

YoungVariance 879.808

Std. Deviation

29.662

Page 62: Is Spatial Memory Age-Related?

62

Is Spatial Memory Age-Related? Answer - All the measures of variability are greater for the Young group than for the Elderly. From the table the standard deviation for the Young is 29.66 seconds, whilst for the Elderly it is 22.52 seconds.

Age group Statistic

ElderlyVariance 507.143

Std. Deviation

22.520

YoungVariance 879.808

Std. Deviation

29.662

Page 63: Is Spatial Memory Age-Related?

63

Is Spatial Memory Age-Related? The boxplots show that the inter-quartile range and range are both greater for the Young group than for the Elderly. Further, the boxplots indicate that the two groups are very different in their study times as the inter-quartile ranges do not overlap and the median value for the Young group would be an outlier for the Elderly group. The Elderly group has two outliers, both with unusually high study time values; there are no outliers in the Young group.

Page 64: Is Spatial Memory Age-Related?

64

Is Spatial Memory Age-Related? Question - Describe the differences between the Elderly and Young age groups in the measures of performance for the number correct.

Page 65: Is Spatial Memory Age-Related?

65

Is Spatial Memory Age-Related?

Descriptive statistics.Question - Describe the differences between the Elderly and Young age groups in the measures of performance for the number correct.

Descriptives

7.50 .310

6.83

8.17

7.56

8.00

1.346

1.160

5

9

4

1

-.862 .597

.203 1.154

11.15 .869

9.26

13.05

11.23

11.00

9.808

3.132

5

16

11

5

-.437 .616

-.290 1.191

Mean

Lower Bound

Upper Bound

95% ConfidenceInterval for Mean

5% Trimmed Mean

Median

Variance

Std. Deviation

Minimum

Maximum

Range

Interquartile Range

Skewness

Kurtosis

Mean

Lower Bound

Upper Bound

95% ConfidenceInterval for Mean

5% Trimmed Mean

Median

Variance

Std. Deviation

Minimum

Maximum

Range

Interquartile Range

Skewness

Kurtosis

Age groupElderly

Young

No. correctStatistic Std. Error

Page 66: Is Spatial Memory Age-Related?

66

Is Spatial Memory Age-Related?

BoxplotQuestion - Describe the differences between the Elderly and Young age groups in the measures of performance for the number correct.

Page 67: Is Spatial Memory Age-Related?

67

Is Spatial Memory Age-Related? Answer - Within each age group the mean and median scores are very close. The mean and median values for the Young group, at 11.15 and 11.00 respectively, are larger than for the Elderly group at 7.50 (mean) and 8.00 (median). The measures of dispersion are all larger for the Young than for the Elderly group. There is very little variability in the Elderly group with a standard deviation of 1.16, range of 4 and IQR of 1. Also the median and upper quartile are the same at 8.

Age group Statistic

Elderly

Mean 7.50

Median 8.00

Variance 1.346

Std. Deviation 1.160

Young

Mean 11.15

Median 11.00

Variance 9.808

Std. Deviation 3.132

Page 68: Is Spatial Memory Age-Related?

68

Is Spatial Memory Age-Related? Question - Describe the differences between the Elderly and Young age groups in the measures of performance for the city block score.

Page 69: Is Spatial Memory Age-Related?

69

Is Spatial Memory Age-Related?

Descriptive statisticsQuestion - Describe the differences between the Elderly and Young age groups in the measures of performance for the city block score.

Descriptives

27.71 2.584

22.13

33.30

27.68

27.50

93.451

9.667

13

43

30

15

.070 .597

-1.102 1.154

14.46 2.752

8.47

20.46

13.85

12.00

98.436

9.921

4

36

32

15

1.008 .616

.307 1.191

Mean

Lower Bound

Upper Bound

95% ConfidenceInterval for Mean

5% Trimmed Mean

Median

Variance

Std. Deviation

Minimum

Maximum

Range

Interquartile Range

Skewness

Kurtosis

Mean

Lower Bound

Upper Bound

95% ConfidenceInterval for Mean

5% Trimmed Mean

Median

Variance

Std. Deviation

Minimum

Maximum

Range

Interquartile Range

Skewness

Kurtosis

Age groupElderly

Young

City block scoreStatistic Std. Error

Page 70: Is Spatial Memory Age-Related?

70

Is Spatial Memory Age-Related? BoxplotQuestion - Describe the differences between the Elderly and Young age groups in the measures of performance for the city block score.

Page 71: Is Spatial Memory Age-Related?

71

Is Spatial Memory Age-Related? Answer - Again, within each age group the mean and median scores are very close. The mean and median values for the Elderly group at about 28 are larger than for the Young group at 14.5 (mean) and 12 (median). The measures of dispersion are much the same for the two age groups, with standard deviations of about 10, ranges of 30 and 32 and IQR of 15. Age group Statistic

Elderly

Mean 27.71

Median 27.50

Variance 93.451

Std. Deviation 9.667

Young

Mean 14.46

Median 12.00

Variance 98.436

Std. Deviation 9.921

Page 72: Is Spatial Memory Age-Related?

72

Is Spatial Memory Age-Related? We can look a little more closely at the distributions of the measures of performance and study time using Frequency tables. We first consider the number of correctly replaced objects.

Page 73: Is Spatial Memory Age-Related?

73

Is Spatial Memory Age-Related? Question - Describe the distribution of the number of correctly replaced objects.

Page 74: Is Spatial Memory Age-Related?

74

Is Spatial Memory Age-Related? Analyze > Descriptive Statistics > Frequencies

Page 75: Is Spatial Memory Age-Related?

75

Is Spatial Memory Age-Related? Select ncorrect as the Variable

Page 76: Is Spatial Memory Age-Related?

76

Is Spatial Memory Age-Related?

Finally Question - Describe the distribution of the number of correctly replaced objects.

No. correct

2 7.4 7.4 7.4

2 7.4 7.4 14.8

3 11.1 11.1 25.9

7 25.9 25.9 51.9

4 14.8 14.8 66.7

1 3.7 3.7 70.4

2 7.4 7.4 77.8

1 3.7 3.7 81.5

1 3.7 3.7 85.2

3 11.1 11.1 96.3

1 3.7 3.7 100.0

27 100.0 100.0

5

6

7

8

9

10

11

12

13

14

16

Total

ValidFrequency Percent Valid Percent

CumulativePercent

Page 77: Is Spatial Memory Age-Related?

77

Is Spatial Memory Age-Related? Answer - About half (52%) of the subjects replaced 8 or fewer objects in the correct position. Only one person replaced more than 14 correctly.

No. correct

2 7.4 7.4 7.4

2 7.4 7.4 14.8

3 11.1 11.1 25.9

7 25.9 25.9 51.9

4 14.8 14.8 66.7

1 3.7 3.7 70.4

2 7.4 7.4 77.8

1 3.7 3.7 81.5

1 3.7 3.7 85.2

3 11.1 11.1 96.3

1 3.7 3.7 100.0

27 100.0 100.0

5

6

7

8

9

10

11

12

13

14

16

Total

ValidFrequency Percent Valid Percent

CumulativePercent

Page 78: Is Spatial Memory Age-Related?

78

Is Spatial Memory Age-Related? We now look at the frequency counts for the number of objects correctly replaced for the different age groups.

Page 79: Is Spatial Memory Age-Related?

79

Is Spatial Memory Age-Related? Question - What does the table tell you about the data? What are the modes?

Page 80: Is Spatial Memory Age-Related?

80

Is Spatial Memory Age-Related? Analyze > Descriptive Statistics > Crosstabs

Page 81: Is Spatial Memory Age-Related?

81

Is Spatial Memory Age-Related? Select ncorrect as the Row variable and agegroup as the Column variable

Page 82: Is Spatial Memory Age-Related?

82

Is Spatial Memory Age-Related? Click on Cells and under Percentages, select Column.

Page 83: Is Spatial Memory Age-Related?

83

Is Spatial Memory Age-Related?

FinallyQuestion - What does the table tell you about the data? What are the modes?

No. correct * Age group Crosstabulation

1 1 2

7.1% 7.7% 7.4%

2 0 2

14.3% .0% 7.4%

2 1 3

14.3% 7.7% 11.1%

7 0 7

50.0% .0% 25.9%

2 2 4

14.3% 15.4% 14.8%

0 1 1

.0% 7.7% 3.7%

0 2 2

.0% 15.4% 7.4%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

0 3 3

.0% 23.1% 11.1%

0 1 1

.0% 7.7% 3.7%

14 13 27

100.0% 100.0% 100.0%

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

5

6

7

8

9

10

11

12

13

14

16

No.correct

Total

Elderly Young

Age group

Total

Page 84: Is Spatial Memory Age-Related?

84

Is Spatial Memory Age-Related? Answer - On the whole the Elderly got fewer correct than the Young. All of the scores for the Elderly were under 10, with the mode at 8. The scores for the Young were more spread out and most were over 10 correct; the mode is 14.

Page 85: Is Spatial Memory Age-Related?

85

Is Spatial Memory Age-Related? In the same way, cross-tabulate both city block score and study time by age group.

Page 86: Is Spatial Memory Age-Related?

86

Is Spatial Memory Age-

Related?

Question - Describe the differences in city block scores between the age groups.

City block score * Age group Crosstabulation

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

0 2 2

.0% 15.4% 7.4%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

1 0 1

7.1% .0% 3.7%

0 1 1

.0% 7.7% 3.7%

1 0 1

7.1% .0% 3.7%

0 1 1

.0% 7.7% 3.7%

1 0 1

7.1% .0% 3.7%

0 1 1

.0% 7.7% 3.7%

1 0 1

7.1% .0% 3.7%

1 1 2

7.1% 7.7% 7.4%

1 0 1

7.1% .0% 3.7%

1 0 1

7.1% .0% 3.7%

1 1 2

7.1% 7.7% 7.4%

1 0 1

7.1% .0% 3.7%

1 0 1

7.1% .0% 3.7%

1 0 1

7.1% .0% 3.7%

1 1 2

7.1% 7.7% 7.4%

1 0 1

7.1% .0% 3.7%

1 0 1

7.1% .0% 3.7%

14 13 27

100.0% 100.0% 100.0%

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

4

5

6

7

11

12

13

14

15

16

17

20

21

22

23

26

29

32

34

35

36

42

43

Cityblockscore

Total

Elderly Young

Age group

Total

Page 87: Is Spatial Memory Age-Related?

87

Is Spatial Memory Age-

Related? Answer - The city block scores are spread out for both age groups, with generally just one person in each category. Scores for the Young are generally lower than those for the Elderly.

City block score * Age group Crosstabulation

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

0 2 2

.0% 15.4% 7.4%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

1 0 1

7.1% .0% 3.7%

0 1 1

.0% 7.7% 3.7%

1 0 1

7.1% .0% 3.7%

0 1 1

.0% 7.7% 3.7%

1 0 1

7.1% .0% 3.7%

0 1 1

.0% 7.7% 3.7%

1 0 1

7.1% .0% 3.7%

1 1 2

7.1% 7.7% 7.4%

1 0 1

7.1% .0% 3.7%

1 0 1

7.1% .0% 3.7%

1 1 2

7.1% 7.7% 7.4%

1 0 1

7.1% .0% 3.7%

1 0 1

7.1% .0% 3.7%

1 0 1

7.1% .0% 3.7%

1 1 2

7.1% 7.7% 7.4%

1 0 1

7.1% .0% 3.7%

1 0 1

7.1% .0% 3.7%

14 13 27

100.0% 100.0% 100.0%

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

4

5

6

7

11

12

13

14

15

16

17

20

21

22

23

26

29

32

34

35

36

42

43

Cityblockscore

Total

Elderly Young

Age group

Total

Page 88: Is Spatial Memory Age-Related?

88

Is Spatial Memory Age-

Related?

Question - Describe the differences in study times between the age groups.

Study time * Age group Crosstabulation

1 0 1

7.1% .0% 3.7%

1 0 1

7.1% .0% 3.7%

2 0 2

14.3% .0% 7.4%

3 0 3

21.4% .0% 11.1%

2 0 2

14.3% .0% 7.4%

2 2 4

14.3% 15.4% 14.8%

0 1 1

.0% 7.7% 3.7%

1 0 1

7.1% .0% 3.7%

0 1 1

.0% 7.7% 3.7%

1 2 3

7.1% 15.4% 11.1%

0 1 1

.0% 7.7% 3.7%

1 1 2

7.1% 7.7% 7.4%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

14 13 27

100.0% 100.0% 100.0%

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

25

30

35

40

45

55

70

75

85

90

95

100

105

125

130

140

145

Studytime

Total

Elderly Young

Age group

Total

Page 89: Is Spatial Memory Age-Related?

89

Is Spatial Memory Age-

Related? Answer - study times for the Elderly are generally much lower than for the Young, with most of the former taking 55 seconds or less whilst all of the latter took 55 seconds or more.

Study time * Age group Crosstabulation

1 0 1

7.1% .0% 3.7%

1 0 1

7.1% .0% 3.7%

2 0 2

14.3% .0% 7.4%

3 0 3

21.4% .0% 11.1%

2 0 2

14.3% .0% 7.4%

2 2 4

14.3% 15.4% 14.8%

0 1 1

.0% 7.7% 3.7%

1 0 1

7.1% .0% 3.7%

0 1 1

.0% 7.7% 3.7%

1 2 3

7.1% 15.4% 11.1%

0 1 1

.0% 7.7% 3.7%

1 1 2

7.1% 7.7% 7.4%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

0 1 1

.0% 7.7% 3.7%

14 13 27

100.0% 100.0% 100.0%

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

Count

% within Age group

25

30

35

40

45

55

70

75

85

90

95

100

105

125

130

140

145

Studytime

Total

Elderly Young

Age group

Total

Page 90: Is Spatial Memory Age-Related?

90

Is Spatial Memory Age-Related?

Here we are going to test the (null) hypothesis that there is no difference in the performances of the two groups - Elderly and Young. We have two measures – the number of objects correctly replaced and the city block score that measures the distance between the actual and replaced positions and totals this over the 18 objects. These distances are measured as “city blocks” i.e. horizontal and vertical steps across the grid. Each of these measurements is a discrete variable, so we need to be careful in deciding which tests are appropriate.

Page 91: Is Spatial Memory Age-Related?

91

Is Spatial Memory Age-Related?

Question – Recall the boxplot, how did the two groups perform? Looking at the distribution of scores in each group, does the diagram support the assumptions underlying the t-test?

Page 92: Is Spatial Memory Age-Related?

92

Is Spatial Memory Age-Related? Answer - The boxplots show that the median scores are about 27 for the Elderly group and 12 for the Young group, which are quite different.

The t-test assumes that the scores are normally distributed within each population.

This means that for each age group, we want to see that the distribution of scores is reasonably symmetric, with no outliers. The distribution of scores for Young subjects has a positive skew but otherwise there are no problems. The test also assumes that the population variances are equal and this seems reasonable as both groups have similar ranges and IQRs.

Page 93: Is Spatial Memory Age-Related?

93

Is Spatial Memory Age-Related? Now we want to compare the city block scores for the two groups, Elderly and Young.

Page 94: Is Spatial Memory Age-Related?

94

Is Spatial Memory Age-Related? Analyze > Compare Means > Independent-Samples T Test

Page 95: Is Spatial Memory Age-Related?

95

Is Spatial Memory Age-Related? Select cityblock as the Test variable and agegroup as the Grouping variable

Page 96: Is Spatial Memory Age-Related?

96

Is Spatial Memory Age-Related? Click on Define Groups, then type 1 into the box labelled Group 1 and 2 into the box labelled Group 2.

Page 97: Is Spatial Memory Age-Related?

97

Is Spatial Memory Age-Related? Finally

Independent Samples Test

.029 .865 3.515 25 .002 13.253 3.771 5.487 21.019

3.511 24.737 .002 13.253 3.775 5.475 21.031

Equal variancesassumed

Equal variancesnot assumed

City block scoreF Sig.

Levene's Test forEquality of Variances

t df Sig. (2-tailed)Mean

DifferenceStd. ErrorDifference Lower Upper

95% ConfidenceInterval of the

Difference

t-test for Equality of Means

Question - Can we assume that the population variances are equal?

Page 98: Is Spatial Memory Age-Related?

98

Is Spatial Memory Age-Related?

Looking at the first two columns of the table, you can see the results of Levene’s test, which tests whether the population variances of the city block scores are the same for both Elderly and Young subjects. If there is no evidence of a difference between these variances then we can use a test that assumes that they are equal to compare the population means.

More formally.

Independent Samples Test

.029 .865 3.515 25 .002 13.253 3.771 5.487 21.019

3.511 24.737 .002 13.253 3.775 5.475 21.031

Equal variancesassumed

Equal variancesnot assumed

City block scoreF Sig.

Levene's Test forEquality of Variances

t df Sig. (2-tailed)Mean

DifferenceStd. ErrorDifference Lower Upper

95% ConfidenceInterval of the

Difference

t-test for Equality of Means

Page 99: Is Spatial Memory Age-Related?

99

Is Spatial Memory Age-Related?

Answer – Null hypothesis (H0): the variances are the same or versusAlternative hypothesis (H1): the variances are different or Test statistic, F = 0.029, with p-value = 0.865. Therefore there is no evidence to reject the null hypothesis, H0. We can assume that the variances are equal and hence they can be pooled in the t-test on the means.

22YE

22YE

Independent Samples Test

.029 .865 3.515 25 .002 13.253 3.771 5.487 21.019

3.511 24.737 .002 13.253 3.775 5.475 21.031

Equal variancesassumed

Equal variancesnot assumed

City block scoreF Sig.

Levene's Test forEquality of Variances

t df Sig. (2-tailed)Mean

DifferenceStd. ErrorDifference Lower Upper

95% ConfidenceInterval of the

Difference

t-test for Equality of Means

Page 100: Is Spatial Memory Age-Related?

100

Is Spatial Memory Age-Related? Now we can return to our test on the means. As it is reasonable to assume that the population variances are equal, we can use the test results based on this assumption and shown on the first line of the same table in SPSS.

Question - What do you conclude from this output?

Independent Samples Test

.029 .865 3.515 25 .002 13.253 3.771 5.487 21.019

3.511 24.737 .002 13.253 3.775 5.475 21.031

Equal variancesassumed

Equal variancesnot assumed

City block scoreF Sig.

Levene's Test forEquality of Variances

t df Sig. (2-tailed)Mean

DifferenceStd. ErrorDifference Lower Upper

95% ConfidenceInterval of the

Difference

t-test for Equality of Means

Page 101: Is Spatial Memory Age-Related?

101

Is Spatial Memory Age-Related? Answer – Null hypothesis (H0): the means are the same or versusAlternative hypothesis (H1): the means are different or The test statistic is t-Value = 3.515, d.f. = 25 with a p-value = 0.002. As this is much smaller than 0.05 there is evidence to reject H0 and so we conclude that there is a significant difference in the mean city block scores for the Elderly and Young groups.

Note that in this case the t values and confidence intervals are little affected by assumptions about the variance.

YE

YE

Page 102: Is Spatial Memory Age-Related?

102

Is Spatial Memory Age-Related? Now use the same methods to compare study time (time) between the Elderly and Young groups. Draw a boxplot as before and then use the Compare Means option to check whether the variances can be assumed equal and perform a t-test. Use the t-test to determine whether Elderly subjects underestimate the time required to study the grid: to make the test one-sided, you will need to divide the p-value by 2.

Page 103: Is Spatial Memory Age-Related?

103

Is Spatial Memory Age-Related? boxplot

Page 104: Is Spatial Memory Age-Related?

104

Is Spatial Memory Age-Related? t test

Independent Samples Test

1.049 .316 -4.771 25 .000 -48.132 10.088 -68.909 -27.355

-4.722 22.368 .000 -48.132 10.193 -69.251 -27.013

Equal variancesassumed

Equal variancesnot assumed

Study timeF Sig.

Levene's Test forEquality of Variances

t df Sig. (2-tailed)Mean

DifferenceStd. ErrorDifference Lower Upper

95% ConfidenceInterval of the

Difference

t-test for Equality of Means

Question - What is the result of Levene’s test?

Page 105: Is Spatial Memory Age-Related?

105

Is Spatial Memory Age-Related? Answer – Null hypothesis (H0): the variances are the same or versusAlternative hypothesis (H1): the variances are different or Test statistic, F = 1.049 with p-value 0.316. Therefore there is no evidence to reject the null hypothesis, H0. We can assume that the variances are equal and hence they can be pooled in the t-test on the means, for which the hypotheses in the next question.

22YE

22YE

Page 106: Is Spatial Memory Age-Related?

106

Is Spatial Memory Age-Related? Question - Now write down the null and alternative hypotheses for the t-test and then look at the results. What do you conclude?

Independent Samples Test

1.049 .316 -4.771 25 .000 -48.132 10.088 -68.909 -27.355

-4.722 22.368 .000 -48.132 10.193 -69.251 -27.013

Equal variancesassumed

Equal variancesnot assumed

Study timeF Sig.

Levene's Test forEquality of Variances

t df Sig. (2-tailed)Mean

DifferenceStd. ErrorDifference Lower Upper

95% ConfidenceInterval of the

Difference

t-test for Equality of Means

Page 107: Is Spatial Memory Age-Related?

107

Is Spatial Memory Age-Related? Answer – Null hypothesis (H0): the means are the same or versusAlternative hypothesis (H1): the mean time is lower for the Elderly or The test statistic is t-Value = -4.771, d.f. = 25. The p-value, shown to 3 decimal places, is 0.000, which we report as p < 0.001: dividing by 2 to obtain the p-value for a one-sided test gives us p < 0.0005. Hence there is very strong evidence to reject H0 and we conclude that the means of the study times of the two groups are significantly different. Elderly subjects do seem to have underestimated the time required to study the grid.

YE

YE

Page 108: Is Spatial Memory Age-Related?

108

Is Spatial Memory Age-Related? Although we have assumed that city block scores can be approximated by a Normal distribution, they are in fact discrete, being the sums of counts of horizontal and vertical blocks. We might also want to compare the Elderly and Young groups on the other measure of spatial memory – the number of correct replacements. We therefore need a test that does not rely on the underlying distribution being Normal. The non-parametric test that is “equivalent” to the two sample t-test above is that due to Mann and Whitney. We shall first use this test on the city block scores.

Page 109: Is Spatial Memory Age-Related?

109

Is Spatial Memory Age-Related? Analyze > Nonparametric Tests > Legacy Dialogs >

2 Independent Samples

Page 110: Is Spatial Memory Age-Related?

110

Is Spatial Memory Age-Related? Select cityblock for the Test Variable List and agegroup for the Grouping Variable

Page 111: Is Spatial Memory Age-Related?

111

Is Spatial Memory Age-Related? Click on Define Groups and type 1 and 2 into the boxes.

Page 112: Is Spatial Memory Age-Related?

112

Is Spatial Memory Age-Related? Finally

Test Statisticsb

29.500

120.500

-2.986

.003

.002a

Mann-Whitney U

Wilcoxon W

Z

Asymp. Sig. (2-tailed)

Exact Sig. [2*(1-tailedSig.)]

City blockscore

Not corrected for ties.a.

Grouping Variable: Age groupb.

Page 113: Is Spatial Memory Age-Related?

113

Is Spatial Memory Age-Related? Question - What is being tested here and what are your conclusions?

Test Statisticsb

29.500

120.500

-2.986

.003

.002a

Mann-Whitney U

Wilcoxon W

Z

Asymp. Sig. (2-tailed)

Exact Sig. [2*(1-tailedSig.)]

City blockscore

Not corrected for ties.a.

Grouping Variable: Age groupb.

Page 114: Is Spatial Memory Age-Related?

114

Is Spatial Memory Age-Related? Answer - This test is on the medians (denoted by the Greek letter or eta), rather than the means.

Null hypothesis (H0): The median city block scores of the two populations are the same versusAlternative hypothesis (H1): The medians of the two populations are different.The test statistic U = 29.5, and the test is significant with p = 0.003. As this is less than 0.05 we have evidence to reject H0 and conclude that there is a difference in the median city block scores Young and Elderly age groups.

Page 115: Is Spatial Memory Age-Related?

115

Is Spatial Memory Age-Related? Now look at the number of correct replacements and see if these differ between the two groups.

Test Statisticsb

25.500

130.500

-3.216

.001

.001a

Mann-Whitney U

Wilcoxon W

Z

Asymp. Sig. (2-tailed)

Exact Sig. [2*(1-tailedSig.)]

No. correct

Not corrected for ties.a.

Grouping Variable: Age groupb.

Page 116: Is Spatial Memory Age-Related?

116

Is Spatial Memory Age-Related? Question - Is there a difference between the median number of correct replacements between the two groups? Explain.

Test Statisticsb

25.500

130.500

-3.216

.001

.001a

Mann-Whitney U

Wilcoxon W

Z

Asymp. Sig. (2-tailed)

Exact Sig. [2*(1-tailedSig.)]

No. correct

Not corrected for ties.a.

Grouping Variable: Age groupb.

Page 117: Is Spatial Memory Age-Related?

117

Is Spatial Memory Age-Related? Answer – Null hypothesis (H0): The medians of the two populations are the same versus Alternative hypothesis (H1): The medians of the two populations are different.Here U = 25.5 with p = 0.001. Again we reject the null hypothesis and conclude that there is a difference in the median number of correct replacements between the two groups.

Page 118: Is Spatial Memory Age-Related?

118

Is Spatial Memory Age-Related? Question - Which of the measurements of memory recall (number correct or city block score) do you think is better? Explain.

Independent Samples Test

9.225 .006 -4.079 25 .000 -3.654 .896 -5.499 -1.809

-3.962 15.028 .001 -3.654 .922 -5.619 -1.688

Equal variancesassumed

Equal variancesnot assumed

No. correctF Sig.

Levene's Test forEquality of Variances

t df Sig. (2-tailed)Mean

DifferenceStd. ErrorDifference Lower Upper

95% ConfidenceInterval of the

Difference

t-test for Equality of Means

Independent Samples Test

.029 .865 3.515 25 .002 13.253 3.771 5.487 21.019

3.511 24.737 .002 13.253 3.775 5.475 21.031

Equal variancesassumed

Equal variancesnot assumed

City block scoreF Sig.

Levene's Test forEquality of Variances

t df Sig. (2-tailed)Mean

DifferenceStd. ErrorDifference Lower Upper

95% ConfidenceInterval of the

Difference

t-test for Equality of Means

Page 119: Is Spatial Memory Age-Related?

119

Is Spatial Memory Age-Related? Answer - Note that for the number correct, the variances cannot be assumed to be equal. For example, the F-Test gives a Test Statistic of 9.225 and corresponding p-value of 0.006.The second line of results for the t-test (which do not assume equal variances) gives t-Value = -3.962, d.f. = 15.028 and p-value = 0.001. We would conclude that the means are significantly different. In both cases, using parametric or non-parametric tests we see that there are significant differences in the measures of accuracy between the age groups. city block score seems better as it accounts for “near misses”. However the number correct is easier to find.

Page 120: Is Spatial Memory Age-Related?

120

Is Spatial Memory Age-Related? We shall first see if the two measurements of accuracy – the number correctly positioned and the error in position are correlated. First look at the scatterplot.

Page 121: Is Spatial Memory Age-Related?

121

Is Spatial Memory Age-Related? Graphs > Legacy Dialogs > Scatter/Dot

Page 122: Is Spatial Memory Age-Related?

122

Is Spatial Memory Age-Related? Simple > Define

Page 123: Is Spatial Memory Age-Related?

123

Is Spatial Memory Age-Related? Select ncorrect for the x-axis and cityblock for the y-axis.

Page 124: Is Spatial Memory Age-Related?

124

Is Spatial Memory Age-Related? Finally

This seems reasonably linear, so the next step is to find the correlation coefficient.

Page 125: Is Spatial Memory Age-Related?

125

Is Spatial Memory Age-Related? More flamboyant plots are possible within SAS.

Galleries of available graphics and source code have been provided. •Graphics gallery for the SGPLOT procedure: create one plot •Graphics gallery for the SGPANEL procedure: create a panel of plots, each of the same plot type •Graphics gallery for the SGRENDER procedure: use with the GTL to layout multiple plots of different types, or to produce nonstandard plots •Graphics gallery for the SGSCATTER procedure: create a panel of scatter plots

Page 126: Is Spatial Memory Age-Related?

126

Is Spatial Memory Age-Related? This example follows suggestions fromHow to create a scatter plot with marginal histograms in SAS

The syntax should be saved in an ascii file, ideally with the extension “.sas”.

Page 127: Is Spatial Memory Age-Related?

127

The template, treat as a black box.

Import your SPSS “.sav” file.

Produce the plot you require.

Page 128: Is Spatial Memory Age-Related?

128

Is Spatial Memory Age-Related? Within SAS use its menu’s

File > Open Programme assess SAS source

Run > Submit

 

After loading the template the “log” reports

Page 129: Is Spatial Memory Age-Related?

129

Is Spatial Memory Age-Related? NOTE: PROCEDURE TEMPLATE used (Total process time): real time 0.57 seconds cpu time 0.43 seconds

37 ods graphics;38 PROC IMPORT OUT= WORK.A39 DATAFILE= "\\Client\F$\spss\case study\7.sav"40 DBMS=SPSS REPLACE;41 RUN;

NOTE: The import data set has 27 observations and 6 variables.NOTE: WORK.A data set was successfully created.NOTE: PROCEDURE IMPORT used (Total process time): real time 0.70 seconds cpu time 0.06 seconds

42 proc sgrender data=Work.A template=scatterhist;43 dynamic YVAR="cityblock" XVAR="ncorrect"44 TITLE="Relationship";45 run;

NOTE: There were 27 observations read from the data set WORK.A.NOTE: PROCEDURE SGRENDER used (Total process time): real time 0.89 seconds cpu time 0.21 secondsthin SAS use its menu’s

File > Open Programme assess SAS sourceRun > Submit 

Page 130: Is Spatial Memory Age-Related?

130

Is Spatial Memory Age-Related? On the graph, right click mouse, then “Save picture as”  

Page 131: Is Spatial Memory Age-Related?

131

Is Spatial Memory Age-Related? Returning to the thread of the analysis

This seems reasonably linear, so the next step is to find the correlation coefficient.

Page 132: Is Spatial Memory Age-Related?

132

Is Spatial Memory Age-Related? Analyze > Correlate > Bivariate

Page 133: Is Spatial Memory Age-Related?

133

Is Spatial Memory Age-Related? Select ncorrect and cityblock

Page 134: Is Spatial Memory Age-Related?

134

Is Spatial Memory Age-Related? The result is

Correlations

1 -.735**

.000

27 27

-.735** 1

.000

27 27

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

No. correctCity block

score

Correlation is significant at the 0.01 level (2-tailed).**.

Page 135: Is Spatial Memory Age-Related?

135

Is Spatial Memory Age-Related? Question - What do you conclude about the two measurements of accuracy?

Correlations

1 -.735**

.000

27 27

-.735** 1

.000

27 27

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

No. correctCity block

score

Correlation is significant at the 0.01 level (2-tailed).**.

Page 136: Is Spatial Memory Age-Related?

136

Is Spatial Memory Age-Related? Answer - They are negatively related i.e. an increase in city block score is generally associated with a decrease in number correct and vice versa. The correlation coefficient is quite high.

Correlations

1 -.735**

.000

27 27

-.735** 1

.000

27 27

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

No. correctCity block

score

Correlation is significant at the 0.01 level (2-tailed).**.

Page 137: Is Spatial Memory Age-Related?

137

Is Spatial Memory Age-Related?

Study time may also be included by adding it to the list of variables to be correlated.

Page 138: Is Spatial Memory Age-Related?

138

Is Spatial Memory Age-Related? The plots are

Page 139: Is Spatial Memory Age-Related?

139

Is Spatial Memory Age-Related? The plots are

Page 140: Is Spatial Memory Age-Related?

140

Is Spatial Memory Age-Related? With correlation

Correlations

1 -.735** .780**

.000 .000

27 27 27

-.735** 1 -.732**

.000 .000

27 27 27

.780** -.732** 1

.000 .000

27 27 27

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

Study time

No. correctCity block

score Study time

Correlation is significant at the 0.01 level (2-tailed).**.

Page 141: Is Spatial Memory Age-Related?

141

Is Spatial Memory Age-Related? Question - Report the correlation coefficients and what you can conclude about the variables.

Correlations

1 -.735** .780**

.000 .000

27 27 27

-.735** 1 -.732**

.000 .000

27 27 27

.780** -.732** 1

.000 .000

27 27 27

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

Study time

No. correctCity block

score Study time

Correlation is significant at the 0.01 level (2-tailed).**.

Page 142: Is Spatial Memory Age-Related?

142

Is Spatial Memory Age-Related? Answer - City block score and time: r = -0.732. They are negatively related i.e. an increase in study time is generally associated with a decrease in city block score. The correlation coefficient is quite high.

Number correct and time: r = 0.780. They are positively related i.e. an increase in study time is generally associated with a increase in the number correctly replaced. The correlation coefficient is quite high.

Page 143: Is Spatial Memory Age-Related?

143

Is Spatial Memory Age-Related? Question - What do the p-values tell you and what assumption is made here?

Correlations

1 -.735** .780**

.000 .000

27 27 27

-.735** 1 -.732**

.000 .000

27 27 27

.780** -.732** 1

.000 .000

27 27 27

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

Study time

No. correctCity block

score Study time

Correlation is significant at the 0.01 level (2-tailed).**.

Page 144: Is Spatial Memory Age-Related?

144

Is Spatial Memory Age-Related? Answer - Here we are testing hypotheses on the correlation coefficient for the populations, designated by the Greek letter (rho).Null hypothesis (H0): there is no correlation orAlternative hypothesis (H1): there is some correlation or

City block and number correct. The p-value is given as 0.000. This is how SPSS records the probability, it does not mean that it is exactly 0.000 but we can say that p < 0.001, so there is strong evidence to reject H0 and we conclude that the correlation is significantly different from zero.

0

0

Page 145: Is Spatial Memory Age-Related?

145

Is Spatial Memory Age-Related? City block and study time. Again, p < 0.001, so there is strong evidence to reject H0 and we conclude that the correlation is significantly different from zero.

Number correct and study time. Again, p < 0.001, so there is strong evidence to reject H0 and we conclude that the correlation is significantly different from zero.

The assumption is that, for each pair, the variables are jointly normally distributed.

Page 146: Is Spatial Memory Age-Related?

146

Is Spatial Memory Age-Related? So far we have looked at all the data together but there might be differences between the Young and Elderly groups.

The correlations between scores can be found separately for Young and Elderly subjects using the Split File procedure.

Page 147: Is Spatial Memory Age-Related?

147

Is Spatial Memory Age-Related? Data > Split File

Page 148: Is Spatial Memory Age-Related?

148

Is Spatial Memory Age-Related? Select Organise output by groups and agegroup

Page 149: Is Spatial Memory Age-Related?

149

Is Spatial Memory Age-Related? Until this procedure is reversed, every analysis or plot requested will be run separately for each age group. First repeat the instructions for finding the correlations between ncorrect, cityblock and time.

Question - Report the correlation coefficients for each pair of variables in each agegroup. What you can conclude in each case?

Page 150: Is Spatial Memory Age-Related?

150

Is Spatial Memory Age-Related? It is always wise to plot the data Graphs > Legacy Dialogs > Scatter/Dot

Page 151: Is Spatial Memory Age-Related?

151

Is Spatial Memory Age-Related? Matrix scatter

Page 152: Is Spatial Memory Age-Related?

152

Is Spatial Memory Age-Related? Select the three variables

Page 153: Is Spatial Memory Age-Related?

153

Is Spatial Memory Age-Related? The Elderly plots are

Page 154: Is Spatial Memory Age-Related?

154

Is Spatial Memory Age-Related? The Young plots are

Page 155: Is Spatial Memory Age-Related?

155

Is Spatial Memory Age-Related?

Question - Report the correlation coefficients for each pair of variables in each age group. What can you conclude in each case?

Correlationsa

1 -.693** .368

.006 .195

14 14 14

-.693** 1 -.418

.006 .137

14 14 14

.368 -.418 1

.195 .137

14 14 14

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

Study time

No. correctCity block

score Study time

Correlation is significant at the 0.01 level (2-tailed).**.

Age group = Elderlya.

Correlationsa

1 -.625* .724**

.022 .005

13 13 13

-.625* 1 -.692**

.022 .009

13 13 13

.724** -.692** 1

.005 .009

13 13 13

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

Study time

No. correctCity block

score Study time

Correlation is significant at the 0.05 level (2-tailed).*.

Correlation is significant at the 0.01 level (2-tailed).**.

Age group = Younga.

Page 156: Is Spatial Memory Age-Related?

156

Is Spatial Memory Age-Related? Answer - Here we are testing hypotheses on the correlation coefficient for the populations, designated by the Greek letter (rho).Null hypothesis (H0): there is no correlation orAlternative hypothesis (H1): there is some correlation or .

0

0

Page 157: Is Spatial Memory Age-Related?

157

Is Spatial Memory Age-Related?

Correlationsa

1 -.693** .368

.006 .195

14 14 14

-.693** 1 -.418

.006 .137

14 14 14

.368 -.418 1

.195 .137

14 14 14

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

Study time

No. correctCity block

score Study time

Correlation is significant at the 0.01 level (2-tailed).**.

Age group = Elderlya.

Answer - Elderly Group

Page 158: Is Spatial Memory Age-Related?

158

Is Spatial Memory Age-Related? City block and number correct: r = -0.693. City block and number correct are negatively related. The correlation coefficient is quite high. p-value = 0.006, so there is strong evidence to reject H0 and we conclude that the correlation is significantly different from zero.

City block and study time: r = -0.418, city block and study time are negatively related. The correlation coefficient is quite low. p-value = 0.137 so there is no evidence to reject H0 and we conclude that the correlation is not significantly different from zero.

Page 159: Is Spatial Memory Age-Related?

159

Is Spatial Memory Age-Related? Number correct and study time: r = 0.368, number correct and study time are positively related. The correlation coefficient is quite low. p-value = 0.195 so there is no evidence to reject H0 and we conclude that the correlation is not significantly different from zero.

Page 160: Is Spatial Memory Age-Related?

160

Is Spatial Memory Age-Related? Answer – Young Group

Correlationsa

1 -.625* .724**

.022 .005

13 13 13

-.625* 1 -.692**

.022 .009

13 13 13

.724** -.692** 1

.005 .009

13 13 13

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

Study time

No. correctCity block

score Study time

Correlation is significant at the 0.05 level (2-tailed).*.

Correlation is significant at the 0.01 level (2-tailed).**.

Age group = Younga.

Page 161: Is Spatial Memory Age-Related?

161

Is Spatial Memory Age-Related? City block and number correct: r = -0.625. City block and number correct are negatively related. The correlation coefficient is quite high. p-value = 0.022, so there is evidence to reject H0 and we conclude that the correlation is significantly different from zero.

City block and study time: r = -0.692, city block and study time are negatively related. The correlation coefficient is quite high. p-value = 0.009 so there is strong evidence to reject H0 and we conclude that the correlation is significantly different from zero.

Page 162: Is Spatial Memory Age-Related?

162

Is Spatial Memory Age-Related? Number correct and study time: r = 0.724, number correct and study time are positively related. The correlation coefficient is quite high. p-value = 0.005 so there is strong evidence to reject H0 and we conclude that the correlation is significantly different from zero.

Page 163: Is Spatial Memory Age-Related?

163

Is Spatial Memory Age-Related?

Question - Are there any differences between the Elderly and Young groups?

Correlationsa

1 -.693** .368

.006 .195

14 14 14

-.693** 1 -.418

.006 .137

14 14 14

.368 -.418 1

.195 .137

14 14 14

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

Study time

No. correctCity block

score Study time

Correlation is significant at the 0.01 level (2-tailed).**.

Age group = Elderlya.

Correlationsa

1 -.625* .724**

.022 .005

13 13 13

-.625* 1 -.692**

.022 .009

13 13 13

.724** -.692** 1

.005 .009

13 13 13

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

Study time

No. correctCity block

score Study time

Correlation is significant at the 0.05 level (2-tailed).*.

Correlation is significant at the 0.01 level (2-tailed).**.

Age group = Younga.

Page 164: Is Spatial Memory Age-Related?

164

Is Spatial Memory Age-Related? Answer - For both age groups , and overall, there is significant correlation between the two measurements of accuracy – the number of correct replacements and the city block scores i.e. in all cases there is a significant linear relationship between these two measurements.

When each of these is paired with study time, we have found that the correlations are stronger, and statistically significant for the Young group and overall, but not for the Elderly. For study time and number correct there is a positive relationship; for study time and city block it is negative for either age group. The difference in the signs of these correlations reflect the fact that performing well corresponds to low values for the city block score and high values for the number correct.

Page 165: Is Spatial Memory Age-Related?

165

Is Spatial Memory Age-Related? To reverse the split file procedureData > Split File

Page 166: Is Spatial Memory Age-Related?

166

Is Spatial Memory Age-Related? Analyze all cases

Page 167: Is Spatial Memory Age-Related?

167

Is Spatial Memory Age-Related? Now recreate a scatter plot of city block scores and study times. With city block scores on the y-axis and study time on the x-axis.

Why are the specific variables assigned to a particular axis?

To see any relationship, plot the line of best fit, a linear regression.

Page 168: Is Spatial Memory Age-Related?

168

Is Spatial Memory Age-Related? The scatter plot is

Page 169: Is Spatial Memory Age-Related?

169

Is Spatial Memory Age-Related? Double click on the scatter diagram to open the Chart Editor window

Page 170: Is Spatial Memory Age-Related?

170

Is Spatial Memory Age-Related? In the Chart Editor window, click on one of the points to highlight the points in the graph.

Page 171: Is Spatial Memory Age-Related?

171

Is Spatial Memory Age-Related? Click on the Add fit line icon which shows a scatter plot with a line of best fit.

Page 172: Is Spatial Memory Age-Related?

172

Is Spatial Memory Age-Related? Check that the ‘Linear’ option is selected.

Page 173: Is Spatial Memory Age-Related?

173

Is Spatial Memory Age-Related? Finally (note that this appears to be the only way to produce such a graph, no syntax is available)

Page 174: Is Spatial Memory Age-Related?

174

Is Spatial Memory Age-Related? Question - What does the scatter plot tell you about the variables? Do you think that study time is a good predictor of city block score?

Page 175: Is Spatial Memory Age-Related?

175

Is Spatial Memory Age-Related? Answer - Overall there is a negative trend in the scatter of points, indicating that, in general, an increase in study time is associated with a decrease in city block i.e. the longer the study time the smaller the city block score. However the points are fairly scattered so it is not a strong trend. Study time might be a predictor of city block.

Page 176: Is Spatial Memory Age-Related?

176

Is Spatial Memory Age-Related? We now perform the regression analysis to find the equation of the regression line.

xy

Page 177: Is Spatial Memory Age-Related?

177

Is Spatial Memory Age-Related? Analyze > Regression > Linear

Page 178: Is Spatial Memory Age-Related?

178

Is Spatial Memory Age-Related? Select city block for the Dependent variable and study time as the Independent variable – recall the plot for identification of the variables

Page 179: Is Spatial Memory Age-Related?

179

Is Spatial Memory Age-Related? Question - What does the output tell you about the constant term (intercept)?

Coefficientsa

39.204 3.681 10.651 .000

-.242 .045 -.732 -5.368 .000

(Constant)

Study time

Model1

B Std. Error

UnstandardizedCoefficients

Beta

StandardizedCoefficients

t Sig.

Dependent Variable: City block scorea.

ANOVAb

1916.754 1 1916.754 28.810 .000a

1663.246 25 66.530

3580.000 26

Regression

Residual

Total

Model1

Sum ofSquares df Mean Square F Sig.

Predictors: (Constant), Study timea.

Dependent Variable: City block scoreb.

Page 180: Is Spatial Memory Age-Related?

180

Is Spatial Memory Age-Related? Answer - Null hypothesis (H0): the intercept is zero i.e. the line passes through the origin Alternative hypothesis (H1): the intercept is not zero i.e. The constant term is 39.204;

The test statistic is t = 10.651 with 25 d.f. (shown in the ANOVA table) and p < 0.001 (SPSS displays 0.000, which we report as p < 0.001). Hence there is strong evidence to reject H0 and conclude that the intercept is not zero.

0

0

Page 181: Is Spatial Memory Age-Related?

181

Is Spatial Memory Age-Related? Question - What does the output tell you about the regression term (gradient)?

Coefficientsa

39.204 3.681 10.651 .000

-.242 .045 -.732 -5.368 .000

(Constant)

Study time

Model1

B Std. Error

UnstandardizedCoefficients

Beta

StandardizedCoefficients

t Sig.

Dependent Variable: City block scorea.

ANOVAb

1916.754 1 1916.754 28.810 .000a

1663.246 25 66.530

3580.000 26

Regression

Residual

Total

Model1

Sum ofSquares df Mean Square F Sig.

Predictors: (Constant), Study timea.

Dependent Variable: City block scoreb.

Page 182: Is Spatial Memory Age-Related?

182

Is Spatial Memory Age-Related? Answer - Null hypothesis (H0): the gradient is zero i.e. there is no regression or Alternative hypothesis (H1): the gradient is not zero, i.e. there is regression or

The regression term is -0.242, the test statistic is t = -5.368 with 25 d.f. (shown in the ANOVA table) p < 0.001. Hence there is strong evidence to reject H0 and conclude that the gradient is not zero i.e. there is some relationship.

0

0

Page 183: Is Spatial Memory Age-Related?

183

Is Spatial Memory Age-Related? Question - What does the R square term tell you and how is it related to the correlation coefficient found earlier?

Model Summary

.732a .535 .517 8.157Model1

R R SquareAdjustedR Square

Std. Error ofthe Estimate

Predictors: (Constant), Study timea.

Correlations

1 -.732**

.000

27 27

-.732** 1

.000

27 27

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

City block score

Study time

City blockscore Study time

Correlation is significant at the 0.01 level (2-tailed).**.

Page 184: Is Spatial Memory Age-Related?

184

Is Spatial Memory Age-Related? Answer - R-Sq tells you how much of the variation in city block is due to the changes in study time, i.e. to regression (the rest being attributed to error).It is the ratio of the regression sum of squares (SS) to the total sum of squares in the Analysis of Variance table, written as a percentage:

1916.8/3580.0 = 53.5%Alternatively, it is the square of the correlation coefficient, written as a percentage

(-0.732)2= 53.5%.Only about half of the variation in city block is due to study time.

Page 185: Is Spatial Memory Age-Related?

185

Is Spatial Memory Age-Related? Question - What does the regression predict as the city block score for a subject who took

(i) 50 seconds (ii) 200 seconds?

The equation of the line is city block = 39.2 – 0.242 study time

Page 186: Is Spatial Memory Age-Related?

186

Is Spatial Memory Age-Related? Answer - The equation of the line is

city block = 39.2 – 0.242 study time

So for 50 secondscity block = 39.2 – 0.242 (50) = 27.1

We cannot say anything for 200 seconds as the time is outside our range and we do not know if the linear relationship still holds here.

Page 187: Is Spatial Memory Age-Related?

187

Is Spatial Memory Age-Related? We might also want to see the regression for each of the two age groups separately and compare them.

Earlier we separated Young and Elderly subjects. Use the Split File procedure to do this again and repeat the regression analysis above. Compare the results for different age groups to each other and to the equation obtained using the whole sample.

Page 188: Is Spatial Memory Age-Related?

188

Is Spatial Memory Age-Related? Elderly

Page 189: Is Spatial Memory Age-Related?

189

Is Spatial Memory Age-Related? Young

Page 190: Is Spatial Memory Age-Related?

190

Is Spatial Memory Age-Related? Question - What are the best fit equations for using study time to predict city block scores for

(i) the Elderly, (ii) the Young?

How well do these predict the results?

Page 191: Is Spatial Memory Age-Related?

191

Is Spatial Memory Age-Related? Answer - For Elderly subjects, the equation of the line of best fit is

cityblock = 36.8 – 0.179 Time

This is very similar to the equation for both groups combined. There is strong evidence to conclude that the intercept is not zero (t = 5.927, d.f. = 12, p < 0.001). However, we must conclude that there is no evidence to reject the hypothesis that the gradient is zero (t = -1.593, d.f. = 12, p = 0.137) i.e. there is no statistically significant evidence of a regression. This is confirmed by R-Sq = 17.4% i.e. Time is “explaining” very little of the variation in city block.

Page 192: Is Spatial Memory Age-Related?

192

Is Spatial Memory Age-Related? The equation of the line of best fit for Young subjects is

cityblock = 37.3 – 0.231 Time

This is very similar to the equation for both groups combined. There is strong evidence to conclude that neither the intercept (t = 4.984, d.f. = 11, p < 0.001) nor the gradient (t = -3.178, d.f. = 11, p = 0.009) are zero.

R-Sq = 47.9% i.e. Time “explains” almost half of the variation in city block .

Page 193: Is Spatial Memory Age-Related?

193

Is Spatial Memory Age-Related?

Question - How do these results link with the correlations found earlier?

Correlationsa

1 -.693** .368

.006 .195

14 14 14

-.693** 1 -.418

.006 .137

14 14 14

.368 -.418 1

.195 .137

14 14 14

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

Study time

No. correctCity block

score Study time

Correlation is significant at the 0.01 level (2-tailed).**.

Age group = Elderlya.

Correlationsa

1 -.625* .724**

.022 .005

13 13 13

-.625* 1 -.692**

.022 .009

13 13 13

.724** -.692** 1

.005 .009

13 13 13

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

Pearson Correlation

Sig. (2-tailed)

N

No. correct

City block score

Study time

No. correctCity block

score Study time

Correlation is significant at the 0.05 level (2-tailed).*.

Correlation is significant at the 0.01 level (2-tailed).**.

Age group = Younga.

Page 194: Is Spatial Memory Age-Related?

194

Is Spatial Memory Age-Related? Answer - We found earlier that time and city block scores were not significantly correlated for the Elderly group i.e. they are not linearly related. This has been confirmed in the regression analysis.

Page 195: Is Spatial Memory Age-Related?

195

Is Spatial Memory Age-Related? We found that city block scores were linearly dependent on study times.

We are now going to extend this by considering whether the Age group is also an important factor and look more closely at the SPSS output that we can obtain to generate more information on the data and outcomes of the regression model.

You might want to carry the analysis a bit further. Does the city block score also depend on whether the subject was Elderly or Young? In order to do this we need to code the agegroup variable – say into 1 for Elderly and 0 for Young.

Page 196: Is Spatial Memory Age-Related?

196

Is Spatial Memory Age-Related? Transform > Recode Into Different Variables

Page 197: Is Spatial Memory Age-Related?

197

Is Spatial Memory Age-Related? Select age group as the numeric variable type Elderly into the box labelled Output Variable Name and click on ChangeClick on Old and New Values

Page 198: Is Spatial Memory Age-Related?

198

Is Spatial Memory Age-Related? On the left, under Old Values, type 2 into the box labelled ValueOn the right, under New Values, type0 into the box labelled ValueClick on Add – this creates the first rule

On the left, select All other values, on the right select Copy old values and click on Add

Page 199: Is Spatial Memory Age-Related?

199

Is Spatial Memory Age-Related? SPSS now creates a new variable, with the name Elderly, which takes value 1 for an Elderly subject and 0 otherwise.

Now repeat the regression analysis with city block as the dependent variable and both study time and Elderly as predictor variables.

Page 200: Is Spatial Memory Age-Related?

200

Is Spatial Memory Age-Related? Question - How does this affect the regression analysis? Is age group significant?

Model Summary

.738a .545 .507 8.241Model1

R R SquareAdjustedR Square

Std. Error ofthe Estimate

Predictors: (Constant), elderly, Study timea.

Coefficientsa

35.355 6.627 5.335 .000

-.211 .063 -.639 -3.359 .003

3.079 4.387 .134 .702 .490

(Constant)

Study time

elderly

Model1

B Std. Error

UnstandardizedCoefficients

Beta

StandardizedCoefficients

t Sig.

Dependent Variable: City block scorea.

Page 201: Is Spatial Memory Age-Related?

201

Is Spatial Memory Age-Related? Answer - R-Sq has hardly changed. It was 53.5% with just study time as a predictor and is now 54.5%, indicating that the inclusion of age group has helped only marginally in explaining the variation in city block score. The age group variable Elderly is not significant (t = 0.702, d.f. = 24, p =0.490).

Page 202: Is Spatial Memory Age-Related?

202

Is Spatial Memory Age-Related? Hence we now return to the simple linear regression model as found earlier.

Every time a regression analysis is performed, the SPSS output includes an analysis of variance (ANOVA) table. This is a useful tool in multiple regression (i.e. where there is more than one independent variable) and other areas in statistics. For the original regression of city block score on study time recall the ANOVA table.

Page 203: Is Spatial Memory Age-Related?

203

Is Spatial Memory Age-Related? Question - Explain what the Degrees of Freedom (d.f.), Sum of Squares (SS) and Mean Square (MS) represent and how they are related.

ANOVAb

1916.754 1 1916.754 28.810 .000a

1663.246 25 66.530

3580.000 26

Regression

Residual

Total

Model1

Sum ofSquares df Mean Square F Sig.

Predictors: (Constant), Study timea.

Dependent Variable: City block scoreb.

Page 204: Is Spatial Memory Age-Related?

204

Is Spatial Memory Age-Related? Answer - d.f. or degrees of freedom represents the amount of independent information in each sum. Thus we have 1 for “Model” as there is 1 independent variable, 26 -1 = 25 for “Total”, and the

“Regression” d.f. + “Residual Error” d.f. = “Total” d.f.

Each Sum of Squares (SS) represents a portion of the variability in block – due to the “Regression”, i.e. in this case, due to study time or that due to the “Residual Error”, i.e. the variability around the regression line

“Regression” SS + “Residual Error” SS = “Total” SS

Page 205: Is Spatial Memory Age-Related?

205

Is Spatial Memory Age-Related? The Mean Squares are found by dividing each SS by its corresponding d.f. The Mean Square due to the “Residual Error” (MSE) is an unbiased estimate of the variance of the error terms.

Page 206: Is Spatial Memory Age-Related?

206

Is Spatial Memory Age-Related? Question - State the hypotheses being tested in the ANOVA, how the test statistic is calculated and what your decision would be.

ANOVAb

1916.754 1 1916.754 28.810 .000a

1663.246 25 66.530

3580.000 26

Regression

Residual

Total

Model1

Sum ofSquares df Mean Square F Sig.

Predictors: (Constant), Study timea.

Dependent Variable: City block scoreb.

Page 207: Is Spatial Memory Age-Related?

207

Is Spatial Memory Age-Related? Answer - Null hypothesis (H0): the gradient is zero i.e. there is no regression or Alternative hypothesis (H1): the gradient is not zero, i.e. there is regression or

The test statistic,

Under H0 the Mean Squares should be equal, i.e. F should be 1.Here F = 28.81 with d.f. = 1, 25 and p < 0.001. Hence we reject H0 at the 5% significance level and conclude that city block score is linearly dependent on study time.

0

0

81.285.66

8.1916SquareMean "Regression"

MSEF

Page 208: Is Spatial Memory Age-Related?

208

Is Spatial Memory Age-Related? Here we verify (or not!) some of the assumptions made in the regression model, using the residuals, which are estimates of the unknown error terms.

Question - What are the assumptions made about the error terms?

Page 209: Is Spatial Memory Age-Related?

209

Is Spatial Memory Age-Related? Answer - The errors have zero mean, constant variance and are Normally distributed i.e. and they are uncorrelated.

2,~ i

Page 210: Is Spatial Memory Age-Related?

210

Is Spatial Memory Age-Related? The residuals can be calculated and plotted against study time, the independent variable and the predicted values of city block score.

Page 211: Is Spatial Memory Age-Related?

211

Is Spatial Memory Age-Related? Returning to the previous regression Click on the Save button under Predicted Values select Unstandardised, under Residuals select Standardised and under Distances, select Cook’s

Page 212: Is Spatial Memory Age-Related?

212

Is Spatial Memory Age-Related? Click on the Plots button and select Histogram and Normal Probability plot

Page 213: Is Spatial Memory Age-Related?

213

Is Spatial Memory Age-Related? SPSS repeats the regression analysis, producing the same output as before. In addition it generates plots which we will look at later and creates three new columns in the Data Viewer Window, storing the predicted values, labelled PRE_1, standardised residuals, ZRE_1 and Cook’s distances, COO_1.

Page 214: Is Spatial Memory Age-Related?

214

Is Spatial Memory Age-Related? Question - How are the predicted values and residuals calculated? What does this information tell you about your model?

Page 215: Is Spatial Memory Age-Related?

215

Is Spatial Memory Age-Related? Answer - The Predicted Values (PRE_1) are calculated from the regression equation so, for example, at observation 1, for a study time of 75 seconds, the model predicts that the city block score would be 39.2 – 0.242 x 75 = 21.0646.The residuals are the difference between the actual and predicted values. Thus for observation 1 the residual is 17 – 21.0646 = -4.0646.The residuals are an indication of the fit of the model to the original data, so that large positive or negative residuals indicate a poor fit. Here the residuals vary between 0.9819 (observation 17) and 16.0982 (observation 10). Note that, from the regression output, observation 10 is flagged as having a large residual.

Page 216: Is Spatial Memory Age-Related?

216

Is Spatial Memory Age-Related? Question - How are the standardized residuals calculated, why are they “better” than the ordinary residuals and what further information do they give about the model?

Page 217: Is Spatial Memory Age-Related?

217

Is Spatial Memory Age-Related? Answer - A standardized residual is calculated by dividing the residual by its standard error. The standardized residuals follow a t distribution, which can be approximated by the Normal for large enough sample sizes. Standardized residuals greater than 2.5 or less than –2.5 are rare and indicate unusually large residuals. There are none in that category here. The standardised residual for observation 10 is 1.9734, higher than any other but still with an absolute value less than 2.

Page 218: Is Spatial Memory Age-Related?

218

Is Spatial Memory Age-Related? Question - What do the Cook’s distances tell us?

Page 219: Is Spatial Memory Age-Related?

219

Is Spatial Memory Age-Related? Answer - These distances (COO_1) can be used to identify influential data points. A rule of thumb is that an observation may have an adverse effect on the analysis if D > 4/n. Here n = 26, so we would look for D values greater than 4/26 = 0.154 (to 3 d.p.). There are no values of D as large as this here. We would therefore conclude that there are no influential data points.

Page 220: Is Spatial Memory Age-Related?

220

Is Spatial Memory Age-Related? Next we test the assumptions of the model (normality etc.) by looking at various plots of the residuals.

Produce a simple scatter graph with the standardised residuals, ZRE_1 for the y-axis and the predicted values, PRE_1 for the x-axis.

Page 221: Is Spatial Memory Age-Related?

221

Is Spatial Memory Age-Related? Giving

Page 222: Is Spatial Memory Age-Related?

222

Is Spatial Memory Age-Related? Question - What does this graph tell us?

Page 223: Is Spatial Memory Age-Related?

223

Is Spatial Memory Age-Related? Answer - The residuals are randomly scattered about the line through 0, indicating that the mean of the residuals is 0. The variation in the residuals seems to be increasing with increasing fitted values, casting doubt on the assumption of constant variance.

Page 224: Is Spatial Memory Age-Related?

224

Is Spatial Memory Age-Related?

Now consider the graphs that followed on from the usual regression output. These can be used to check the assumption of Normality. First look at the histogram.

Page 225: Is Spatial Memory Age-Related?

225

Is Spatial Memory Age-Related?

Question - What does the histogram show?

Page 226: Is Spatial Memory Age-Related?

226

Is Spatial Memory Age-Related?

Answer - The histogram shows a distribution that looks approximately Normal.

Page 227: Is Spatial Memory Age-Related?

227

Is Spatial Memory Age-Related?

Next look at the P-P (Normal probability) plot.

Page 228: Is Spatial Memory Age-Related?

228

Is Spatial Memory Age-Related?

Question - What does the Normal probability plot suggest?

Page 229: Is Spatial Memory Age-Related?

229

Is Spatial Memory Age-Related?

Answer - The Normal probability plot also suggests a Normal distribution.

Page 230: Is Spatial Memory Age-Related?

230

Is Spatial Memory Age-Related? You can also use the regression procedure to find confidence intervals for the mean city block score and prediction intervals for an individual value of city block score at a specified study time. We will predict the city block score for study times of 60 seconds and 160 seconds. Go to the Data Viewer Window and type 60 in line 28 of the column headed time and 160 in the same column on the line below. This introduces two new lines of data: these will not affect the regression coefficients but will be included in making predictions.To simplify the Data Viewer Window, highlight the column headings for the residuals, predicted values and Cook’s distances from previous analyses press the delete key to empty these columns.

Page 231: Is Spatial Memory Age-Related?

231

Is Spatial Memory Age-Related? Using Save in the previous regression. Remove the selections under Residuals and Distances, and under Prediction Intervals, select Mean and Individual.

Page 232: Is Spatial Memory Age-Related?

232

Is Spatial Memory Age-Related? SPSS repeats the regression analysis and creates new columns in the data viewer. These columns show the predicted city block score (PRE_1), confidence limits for the predicted mean city block score (LMCI_1, UMCI_1) and confidence limits for individual predictions (LICI_1, UICI_1) associated with the study times listed in the dataset.

Page 233: Is Spatial Memory Age-Related?

233

Is Spatial Memory Age-Related? Question - What can you say about the mean city block score of participants with a study time of 60 seconds?

Page 234: Is Spatial Memory Age-Related?

234

Is Spatial Memory Age-Related? Answer - We are 95% confident that the mean lies between 21.21 and 28.17.

Page 235: Is Spatial Memory Age-Related?

235

Is Spatial Memory Age-Related? Question - What city block score can Mrs. Smith expect if she takes 60 seconds to study the grid?

Page 236: Is Spatial Memory Age-Related?

236

Is Spatial Memory Age-Related? Answer - We are 95% confident that Mrs. Smith’s city block score will be between 7.54 and 41.85.

Page 237: Is Spatial Memory Age-Related?

237

Is Spatial Memory Age-Related? Question - What can you say about the city block score of participants with a study time of 160 seconds?

Page 238: Is Spatial Memory Age-Related?

238

Is Spatial Memory Age-Related? Answer - The 95% confidence interval is given as (-8.11, 9.13). However, the longest study time used here was 145 seconds. Therefore, predicting a city block score for a study time of 160 seconds is extrapolating beyond the range of our observations, which is unreliable.

Page 239: Is Spatial Memory Age-Related?

239

Is Spatial Memory Age-Related?

Or is it!!

th-th-th-that's all folks!