1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;7273 /* lynch.sas */7475 title 'Hovland and Sears Lynching data';7677 data lynch; /* Skipping the header */78 infile '/home/u1407221/441s24/data/Lynch.data.txt' firstobs=6;79 input year ayres cotton1 cotton2 Blynch Totlynch;80 label ayres = 'Ayres'' composite economic index'81 cotton1 = 'Per-acre value of cotton'82 cotton2 = 'Farm value of cotton'83 blynch = 'Black lynchings'84 totlynch = 'Total lynchings';85 olynch = totlynch-blynch;86 label olynch = 'Non-Black lynchings';87 /* Created differenced variables */88 dc1 = cotton1 - lag(cotton1);89 dc2 = cotton2 - lag(cotton2);90 dbl = blynch - lag(blynch);91NOTE: The infile '/home/u1407221/441s24/data/Lynch.data.txt' is:Filename=/home/u1407221/441s24/data/Lynch.data.txt,Owner Name=u1407221,Group Name=oda,Access Permission=-rw-r--r--,Last Modified=04Mar2024:14:43:24,File Size (bytes)=3083NOTE: 49 records were read from the infile '/home/u1407221/441s24/data/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 88:20 1 at 89:20 1 at 90:19NOTE: The data set WORK.LYNCH has 49 observations and 10 variables.NOTE: DATA statement used (Total process time):real time 0.03 secondsuser cpu time 0.00 secondssystem cpu time 0.00 secondsmemory 775.93kOS Memory 33452.00kTimestamp 03/05/2024 06:45:13 PMStep Count 118 Switch Count 2Page Faults 0Page Reclaims 160Page Swaps 0Voluntary Context Switches 19Involuntary Context Switches 0Block Input Operations 0Block Output Operations 26492 proc corr data=lynch;93 var year cotton1 -- olynch;94NOTE: PROCEDURE CORR used (Total process time):real time 0.07 secondsuser cpu time 0.08 secondssystem cpu time 0.00 secondsmemory 3520.59kOS Memory 34220.00kTimestamp 03/05/2024 06:45:14 PMStep Count 119 Switch Count 0Page Faults 0Page Reclaims 241Page Swaps 0Voluntary Context Switches 0Involuntary Context Switches 1Block Input Operations 0Block Output Operations 2495 proc reg data=lynch plots=none;96 title2 'Naive regression';97 model blynch = cotton1;98NOTE: PROCEDURE REG used (Total process time):real time 0.03 secondsuser cpu time 0.04 secondssystem cpu time 0.00 secondsmemory 2696.40kOS Memory 35780.00kTimestamp 03/05/2024 06:45:14 PMStep Count 120 Switch Count 2Page Faults 0Page Reclaims 274Page Swaps 0Voluntary Context Switches 18Involuntary Context Switches 0Block Input Operations 0Block Output Operations 5699 proc reg data=lynch plots=none;100 title2 'Naive regression, but request Durbin-Watson statistic';101 model blynch = cotton1 cotton2 / dwprob;102 output out=lynch2 residual=e;103NOTE: The data set WORK.LYNCH2 has 49 observations and 11 variables.NOTE: PROCEDURE REG used (Total process time):real time 0.05 secondsuser cpu time 0.05 secondssystem cpu time 0.00 secondsmemory 2712.71kOS Memory 36296.00kTimestamp 03/05/2024 06:45:14 PMStep Count 121 Switch Count 4Page Faults 0Page Reclaims 335Page Swaps 0Voluntary Context Switches 35Involuntary Context Switches 0Block Input Operations 0Block Output Operations 344104 proc sgplot data=lynch2;105 title2 'Residuals Against Time';106 series X = year Y = e;107108 proc autoreg data=lynch;NOTE: PROCEDURE SGPLOT used (Total process time):real time 0.19 secondsuser cpu time 0.09 secondssystem cpu time 0.01 secondsmemory 20177.50kOS Memory 51628.00kTimestamp 03/05/2024 06:45:14 PMStep Count 122 Switch Count 2Page Faults 0Page Reclaims 5100Page Swaps 0Voluntary Context Switches 278Involuntary Context Switches 0Block Input Operations 0Block Output Operations 872NOTE: There were 49 observations read from the data set WORK.LYNCH2.109 title2 'Naive model with TS plots using proc autoreg';110 model blynch = cotton1 cotton2 / dwprob;111NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.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.46 secondsuser cpu time 0.27 secondssystem cpu time 0.04 secondsmemory 14781.56kOS Memory 65300.00kTimestamp 03/05/2024 06:45:14 PMStep Count 123 Switch Count 17Page Faults 0Page Reclaims 13123Page Swaps 0Voluntary Context Switches 714Involuntary Context Switches 0Block Input Operations 0Block Output Operations 1800112 proc autoreg data=lynch;113 title2 'First-order autoregressive model with proc autoreg';114 model blynch = cotton1 cotton2 / nlag=1 method=ml dwprob;115 both: test cotton1=cotton2=0;116 /* The signs of the estimated autoregressive parameters are reversed!117 Page 357 of the proc autoreg manual says "Note that in this118 parameterization, the signs of the autoregressive parameters are119 reversed from the parameterization documented in most of the literature."120121 White noise probabilities are something like p-values.122 */123124 /* I don't think we need a higher order model, but let's try it and test. */125NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a gradient contour.NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a surface plot.NOTE: The graph in the RTF(WEB) destination will be rendered as an image due to the use of a bivariate histogram.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.65 secondsuser cpu time 0.38 secondssystem cpu time 0.04 secondsmemory 13586.43kOS Memory 65812.00kTimestamp 03/05/2024 06:45:15 PMStep Count 124 Switch Count 17Page Faults 0Page Reclaims 12704Page Swaps 0Voluntary Context Switches 972Involuntary Context Switches 1Block Input Operations 0Block Output Operations 2512126 proc autoreg data=lynch plots=none;127 title2 'Sixth-order autoregressive model with cotton1 and cotton2';128 model blynch = cotton1 cotton2 / nlag=6 method=ml;129 both: test cotton1=cotton2=0;130NOTE: PROCEDURE AUTOREG used (Total process time):real time 0.31 secondsuser cpu time 0.17 secondssystem cpu time 0.02 secondsmemory 4481.68kOS Memory 57016.00kTimestamp 03/05/2024 06:45:15 PMStep Count 125 Switch Count 1Page Faults 0Page Reclaims 577Page Swaps 0Voluntary Context Switches 328Involuntary Context Switches 0Block Input Operations 0Block Output Operations 1544131 proc autoreg data=lynch plots=none;132 title2 'First-order autoregressive model with just cotton1';133 model blynch = cotton1 / nlag=1 method=ml;134135 run;NOTE: PROCEDURE AUTOREG used (Total process time):real time 0.21 secondsuser cpu time 0.12 secondssystem cpu time 0.01 secondsmemory 4165.46kOS Memory 57016.00kTimestamp 03/05/2024 06:45:15 PMStep Count 126 Switch Count 1Page Faults 0Page Reclaims 486Page Swaps 0Voluntary Context Switches 297Involuntary Context Switches 0Block Input Operations 0Block Output Operations 856136 quit;137138139 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;151