1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
70
71 /* lynch.sas */
72
73 title 'Hovland and Sears Lynching data';
74
75 data lynch;
76 infile '/home/brunner0/441s20/Lynch.data.txt' firstobs=6; /* Skipping the header */
77 input year ayres cotton1 cotton2 Blynch Totlynch;
78 label ayres = 'Ayres'' composite economic index'
79 cotton1 = 'Per-acre value of cotton'
80 cotton2 = 'Farm value of cotton'
81 blynch = 'Negro lynchings'
82 totlynch = 'Total lynchings';
83 olynch = totlynch-blynch;
84 label olynch = 'Non-Black lynchings';
85 /* Created differenced and lagged variables after looking at
86 autocorrelation and cross-correlation functions, etc. */
87 dc1 = cotton1 - lag(cotton1);
88 dc2 = cotton2 - lag(cotton2);
89 dbl = blynch - lag(blynch);
90
NOTE: The infile '/home/brunner0/441s20/Lynch.data.txt' is:
Filename=/home/brunner0/441s20/Lynch.data.txt,
Owner Name=brunner0,Group Name=oda,
Access Permission=-rw-r--r--,
Last Modified=09Mar2020:12:40:13,
File Size (bytes)=3083
NOTE: 49 records were read from the infile '/home/brunner0/441s20/Lynch.data.txt'.
The minimum record length was 54.
The maximum record length was 55.
NOTE: Missing values were generated as a result of performing an operation on missing values.
Each place is given by: (Number of times) at (Line):(Column).
1 at 87:20 1 at 88:20 1 at 89:19
NOTE: The data set WORK.LYNCH has 49 observations and 10 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.01 seconds
memory 773.78k
OS Memory 33708.00k
Timestamp 03/11/2020 03:19:00 PM
Step Count 83 Switch Count 2
Page Faults 0
Page Reclaims 158
Page Swaps 0
Voluntary Context Switches 16
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 264
91 proc corr;
92 var year cotton1 -- olynch;
93
NOTE: PROCEDURE CORR used (Total process time):
real time 0.09 seconds
user cpu time 0.09 seconds
system cpu time 0.00 seconds
memory 3083.93k
OS Memory 34476.00k
Timestamp 03/11/2020 03:19:00 PM
Step Count 84 Switch Count 0
Page Faults 0
Page Reclaims 230
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 16
94 proc reg plot=none;
95 title2 'Naive regression';
96 model blynch = cotton1;
97
NOTE: PROCEDURE REG used (Total process time):
real time 0.04 seconds
user cpu time 0.05 seconds
system cpu time 0.00 seconds
memory 2518.65k
OS Memory 36036.00k
Timestamp 03/11/2020 03:19:00 PM
Step Count 85 Switch Count 2
Page Faults 0
Page Reclaims 282
Page Swaps 0
Voluntary Context Switches 18
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 56
98 proc reg plot=none;
99 title2 'Naive regression, but request Durbin-Watson statistic';
100 model blynch = cotton1 cotton2 / dw;
101 output out=lynch2 residual=e;
102
NOTE: The data set WORK.LYNCH2 has 49 observations and 11 variables.
NOTE: PROCEDURE REG used (Total process time):
real time 0.05 seconds
user cpu time 0.05 seconds
system cpu time 0.00 seconds
memory 2668.18k
OS Memory 36552.00k
Timestamp 03/11/2020 03:19:00 PM
Step Count 86 Switch Count 4
Page Faults 0
Page Reclaims 323
Page Swaps 0
Voluntary Context Switches 33
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 336
103 proc sgplot;
104 title2 'Residuals Against Time';
105 series X = year Y = e;
106
107 proc autoreg;
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.14 seconds
user cpu time 0.06 seconds
system cpu time 0.02 seconds
memory 12993.81k
OS Memory 44972.00k
Timestamp 03/11/2020 03:19:00 PM
Step Count 87 Switch Count 2
Page Faults 0
Page Reclaims 3068
Page Swaps 0
Voluntary Context Switches 212
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 688
NOTE: There were 49 observations read from the data set WORK.LYNCH2.
108 title2 'Durbin-Watson test with proc autoreg';
109 model blynch = cotton1 cotton2 / dwprob;
110
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: PROCEDURE AUTOREG used (Total process time):
real time 0.39 seconds
user cpu time 0.24 seconds
system cpu time 0.02 seconds
memory 14324.56k
OS Memory 58644.00k
Timestamp 03/11/2020 03:19:01 PM
Step Count 88 Switch Count 17
Page Faults 0
Page Reclaims 11034
Page Swaps 0
Voluntary Context Switches 653
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 1224
111 proc autoreg;
112 title2 'First-order autoregressive model with proc autoreg';
113 model blynch = cotton1 cotton2 / nlag=1 method=ml;
114 both: test cotton1=cotton2=0;
115
116 /* I don't think we need a higher order model, but let's try it and test. */
117
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a gradient contour.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a surface plot.
NOTE: The graph in the PDF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.
NOTE: PROCEDURE AUTOREG used (Total process time):
real time 0.52 seconds
user cpu time 0.32 seconds
system cpu time 0.03 seconds
memory 13698.90k
OS Memory 58900.00k
Timestamp 03/11/2020 03:19:01 PM
Step Count 89 Switch Count 17
Page Faults 0
Page Reclaims 10515
Page Swaps 0
Voluntary Context Switches 831
Involuntary Context Switches 1
Block Input Operations 0
Block Output Operations 1456
118 proc autoreg plot=none;
119 title2 'Sixth-order autoregressive model with cotton1 and cotton2';
120 model blynch = cotton1 cotton2 / nlag=6 method=ml;
121 both: test cotton1=cotton2=0;
122
NOTE: PROCEDURE AUTOREG used (Total process time):
real time 0.28 seconds
user cpu time 0.17 seconds
system cpu time 0.02 seconds
memory 2892.37k
OS Memory 49428.00k
Timestamp 03/11/2020 03:19:01 PM
Step Count 90 Switch Count 1
Page Faults 0
Page Reclaims 341
Page Swaps 0
Voluntary Context Switches 226
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 600
123 proc autoreg;
124 title2 'First-order autoregressive model with just cotton1';
125 model blynch = cotton1 / nlag=1 method=ml;
126
127
128 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
139