WEBVTT

1
00:00:02.033 --> 00:00:05.099 align:middle line:90%
In this video, you learn 
how to perform an Analysis of 

2
00:00:05.100 --> 00:00:11.733 align:middle line:90%
Covariance model using SAS 
Studio. From the Tasks list, 

3
00:00:11.733 --> 00:00:15.766 align:middle line:90%
click the Tasks drop-down 
arrow, and click Statistics to 

4
00:00:15.766 --> 00:00:19.332 align:middle line:90%
expand the list of available 
options. After browsing the 

5
00:00:19.333 --> 00:00:24.766 align:middle line:90%
list of options, I'll double 
click Analysis of Covariance. 

6
00:00:24.766 --> 00:00:28.399 align:middle line:90%
To maximize the screen space, I 
will click the Maximize View 

7
00:00:28.400 --> 00:00:33.666 align:middle line:90%
button. The data I am using 
comes from the FISH data set, 

8
00:00:33.666 --> 00:00:37.166 align:middle line:90%
which is available in the 
SASHELP library. Height will be 

9
00:00:37.166 --> 00:00:41.232 align:middle line:90%
my continuous dependent 
variable. I will regress Height 

10
00:00:41.233 --> 00:00:45.233 align:middle line:90%
on the weight of the fish and 
the species of the fish. Weight 

11
00:00:45.233 --> 00:00:49.666 align:middle line:90%
is my covariate (or continuous 
independent variable). Species 

12
00:00:49.666 --> 00:00:53.299 align:middle line:90%
is my categorical variable. It 
consists of seven different 

13
00:00:53.300 --> 00:00:58.500 align:middle line:90%
types of fish species: Bream, 
Roach, Whitefish, Parkki, 

14
00:00:58.500 --> 00:01:03.800 align:middle line:90%
Perch, Pike, and Smelt. To 
access the data, I'll first 

15
00:01:03.800 --> 00:01:09.166 align:middle line:90%
click the Select a Table button 
on the Data tab. Next, I'll 

16
00:01:09.166 --> 00:01:13.532 align:middle line:90%
click the drop-down arrow next 
to SASHELP, and scroll down to 

17
00:01:13.533 --> 00:01:18.733 align:middle line:90%
the FISH data set. After I find 
it, I'll highlight it and click 

18
00:01:18.733 --> 00:01:23.599 align:middle line:90%
OK. You will notice that my 
screen is split. On the left 

19
00:01:23.600 --> 00:01:28.000 align:middle line:90%
side are the settings for the 
analysis, and on the right side 

20
00:01:28.000 --> 00:01:32.566 align:middle line:90%
are tabs for my code, log, and 
results. I can choose whether 

21
00:01:32.566 --> 00:01:37.432 align:middle line:90%
to view just the settings, 
just the code and results, or 

22
00:01:37.433 --> 00:01:40.999 align:middle line:90%
I can split the screen between 
them and view both. That is 

23
00:01:41.000 --> 00:01:44.533 align:middle line:90%
what I want to do right now. 
Click the plus button to the 

24
00:01:44.533 --> 00:01:48.833 align:middle line:90%
right of Dependent variable. 
I'm presented with only numeric 

25
00:01:48.833 --> 00:01:52.399 align:middle line:90%
variables as potential options 
for my dependent variable. 

26
00:01:52.400 --> 00:01:57.800 align:middle line:90%
Select Height and click OK. 
Next, click the plus button to 

27
00:01:57.800 --> 00:02:01.566 align:middle line:90%
the right of Categorical 
variable. Select Species, and 

28
00:02:01.566 --> 00:02:05.999 align:middle line:90%
click OK. Immediately below, 
click the plus button 

29
00:02:06.000 --> 00:02:10.066 align:middle line:90%
corresponding to Continuous 
covariate. Select Weight and 

30
00:02:10.066 --> 00:02:14.766 align:middle line:90%
click OK. In the Code/Results 
section, notice that the code 

31
00:02:14.766 --> 00:02:17.799 align:middle line:90%
for our model is being 
generated. There is one thing 

32
00:02:17.800 --> 00:02:21.733 align:middle line:90%
to point out before we move 
forward: Notice that the MODEL 

33
00:02:21.733 --> 00:02:24.899 align:middle line:90%
statement also includes the 
interaction between the two 

34
00:02:24.900 --> 00:02:28.600 align:middle line:90%
independent variables. As 
Weight changes, the height of 

35
00:02:28.600 --> 00:02:31.100 align:middle line:90%
the fish can change at 
different rates for different 

36
00:02:31.100 --> 00:02:35.866 align:middle line:90%
types of fish in the study, so 
it's included as well. For this 

37
00:02:35.866 --> 00:02:39.232 align:middle line:90%
analysis, we don't want to 
center the covariate, so I'll 

38
00:02:39.233 --> 00:02:43.499 align:middle line:90%
move to the Options tab. Here I 
can select from a wide array 

39
00:02:43.500 --> 00:02:47.733 align:middle line:90%
of, for lack of a better term, 
options, or specifications to 

40
00:02:47.733 --> 00:02:51.433 align:middle line:90%
customize the model. For 
example, if I believed that the 

41
00:02:51.433 --> 00:02:54.699 align:middle line:90%
slopes were equal, I could 
change the default settings 

42
00:02:54.700 --> 00:02:59.933 align:middle line:90%
accordingly. When I select 
Equal, my code is automatically 

43
00:02:59.933 --> 00:03:03.799 align:middle line:90%
adjusted. I'm going to revert 
back to Unequal for this 

44
00:03:03.800 --> 00:03:08.033 align:middle line:90%
analysis. When I click the 
drop-down icons next to 

45
00:03:08.033 --> 00:03:12.433 align:middle line:90%
Multiple Comparisons and Plots, 
I'm given additional options 

46
00:03:12.433 --> 00:03:16.699 align:middle line:90%
concerning pairwise comparison 
methods, covariate values, and 

47
00:03:16.700 --> 00:03:21.200 align:middle line:90%
the significance level. When I 
change the Display plots option 

48
00:03:21.200 --> 00:03:25.300 align:middle line:90%
from Default plots to Selected 
plots, I can specify which 

49
00:03:25.300 --> 00:03:30.233 align:middle line:90%
plots I want. Select the check 
box next to Diagnostic plots to 

50
00:03:30.233 --> 00:03:34.333 align:middle line:90%
include them in the model. 
Moving to the Output tab, I can 

51
00:03:34.333 --> 00:03:38.299 align:middle line:90%
choose to create an output data 
set with a variety of results 

52
00:03:38.300 --> 00:03:42.000 align:middle line:90%
corresponding to predicted 
values, residuals, standard 

53
00:03:42.000 --> 00:03:45.300 align:middle line:90%
errors, and influence 
statistics. I don't want an 

54
00:03:45.300 --> 00:03:50.266 align:middle line:90%
output data set for this 
analysis. The Information tab 

55
00:03:50.266 --> 00:03:53.732 align:middle line:90%
provides properties information 
as well as additional resources 

56
00:03:53.733 --> 00:03:56.299 align:middle line:90%
to better understand the 
procedures being used and to 

57
00:03:56.300 --> 00:04:00.000 align:middle line:90%
help better navigate the SAS 
Studio interface. This is my 

58
00:04:00.000 --> 00:04:04.333 align:middle line:90%
GO-TO resource when I have a 
question about SAS Studio. To 

59
00:04:04.333 --> 00:04:07.766 align:middle line:90%
run the analysis, I'll click 
the Run button right above the 

60
00:04:07.766 --> 00:04:15.199 align:middle line:90%
Information tab. I would like 
to view only the results, 

61
00:04:15.200 --> 00:04:18.000 align:middle line:90%
without the options on the 
left, so I will click the 

62
00:04:18.000 --> 00:04:21.233 align:middle line:90%
Code/Results button and then 
click the Results tab to view 

63
00:04:21.233 --> 00:04:25.499 align:middle line:90%
the results of my analysis. I'm 
first given Class-level 

64
00:04:25.500 --> 00:04:29.266 align:middle line:90%
information about my 
categorical variable, Species, 

65
00:04:29.266 --> 00:04:31.799 align:middle line:90%
followed by the number of 
observations read from the data 

66
00:04:31.800 --> 00:04:36.333 align:middle line:90%
set and the number used in my 
model. It looks as if there is 

67
00:04:36.333 --> 00:04:40.833 align:middle line:90%
one observation with missing 
data, so it is excluded. Below 

68
00:04:40.833 --> 00:04:43.899 align:middle line:90%
are several charts that list 
the specific statistics of my 

69
00:04:43.900 --> 00:04:49.166 align:middle line:90%
model. I'll highlight a few as 
I scroll down the page. It's 

70
00:04:49.166 --> 00:04:51.932 align:middle line:90%
here where I'm first able to 
judge how well my predictor 

71
00:04:51.933 --> 00:04:57.066 align:middle line:90%
variables explain the response. 
Assuming an alpha of .05, I 

72
00:04:57.066 --> 00:05:00.032 align:middle line:90%
conclude my model is 
significantly different from 

73
00:05:00.033 --> 00:05:04.699 align:middle line:90%
the mean model. Notice that my 
R-square term is very high. 

74
00:05:04.700 --> 00:05:07.166 align:middle line:90%
This and the significant p-
values for each predictor 

75
00:05:07.166 --> 00:05:10.432 align:middle line:90%
variable are good initial 
indications that I might have a 

76
00:05:10.433 --> 00:05:15.633 align:middle line:90%
good fitting model. Below, 
we're given Fit Diagnostics for 

77
00:05:15.633 --> 00:05:19.999 align:middle line:90%
the response variable. Here, I 
can visually assess model 

78
00:05:20.000 --> 00:05:23.733 align:middle line:90%
assumptions, evaluate model 
fit, and spot potential 

79
00:05:23.733 --> 00:05:27.533 align:middle line:90%
influential observations that 
might be adversely influencing 

80
00:05:27.533 --> 00:05:32.899 align:middle line:90%
model results. Below Fit 
Diagnostics is the ANCOVA plot. 

81
00:05:32.900 --> 00:05:35.700 align:middle line:90%
Here, I can visually observe 
the relationship between Weight 

82
00:05:35.700 --> 00:05:41.266 align:middle line:90%
and Height for each Species of 
fish in my model. The next two 

83
00:05:41.266 --> 00:05:45.432 align:middle line:90%
tables list least square means 
for each Species and then test 

84
00:05:45.433 --> 00:05:48.899 align:middle line:90%
whether their least square 
means significantly differ from 

85
00:05:48.900 --> 00:05:53.300 align:middle line:90%
one another. Because I kept 
alpha at the default level, 

86
00:05:53.300 --> 00:06:00.833 align:middle line:90%
alpha is .05. Continuing the 
least square means output, the 

87
00:06:00.833 --> 00:06:05.499 align:middle line:90%
graph below shows box plots for 
each value of Species. Here I 

88
00:06:05.500 --> 00:06:08.900 align:middle line:90%
can visually assess 
similarities, differences, and 

89
00:06:08.900 --> 00:06:13.533 align:middle line:90%
potential model assumption 
violations. The final graph 

90
00:06:13.533 --> 00:06:17.733 align:middle line:90%
lists all pairwise comparisons 
between the different species. 

91
00:06:17.733 --> 00:06:20.899 align:middle line:90%
The pairwise comparisons with a 
blue line indicate they are 

92
00:06:20.900 --> 00:06:24.266 align:middle line:90%
significantly different from 
one another. A red line 

93
00:06:24.266 --> 00:06:27.699 align:middle line:90%
indicates non-significance. 
This confirms what we have 

94
00:06:27.700 --> 00:06:31.633 align:middle line:90%
already seen previously. This 
analysis can be saved with a 

95
00:06:31.633 --> 00:06:35.866 align:middle line:90%
name that you specify and then 
reopened later. I'm going to 

96
00:06:35.866 --> 00:06:39.432 align:middle line:90%
exit the Maximized View and 
click the Split option to 

97
00:06:39.433 --> 00:06:43.799 align:middle line:90%
return to all three views. I 
can choose to rerun the model 

98
00:06:43.800 --> 00:06:48.033 align:middle line:90%
with different criteria, choose 
a new model, choose a new data 

99
00:06:48.033 --> 00:06:53.733 align:middle line:90%
set, or explore other features 
in SAS Studio. In this video, 

100
00:06:53.733 --> 00:06:56.599 align:middle line:90%
you learned to perform an 
analysis of covariance using 

101
00:06:56.600 --> 00:07:00.533 align:middle line:90%
the Analysis of Covariance  
task in SAS Studio. 

