1 The SAS System 13:05 Wednesday, April 28, 1993 NOTE: Copyright(c) 1989 by SAS Institute Inc., Cary, NC USA. NOTE: SAS (r) Proprietary Software Release 6.07.02 Licensed to DUKE UNIVERSITY, Site 0005572014. This message is contained in the SAS news file, and is presented upon initialization. Edit the file "news" in the "misc" directory to display site-specific news and information in the program log. The command line option "-nonews" will prevent this display. NOTE: AUTOEXEC processing beginning; file is /usr/local/sas/autoexec.sas. NOTE: SAS initialization used: real time 0.834 seconds cpu time 0.440 seconds NOTE: AUTOEXEC processing completed. 1 * spaj7792.sas ; 2 * 4/20/93 ; 3 * ; 4 * Purpose: ; 5 * ------- ; 6 * Use a robust method to adjust the Standard & Poor's price ; 7 * change series for deterministic seasonal effects in location ; 8 * and scale. The ideas behind the adjustment procedure are ; 9 * similar to those outlined in Gallant, Rossi, and Tauchen ; 10 * (Review of Financial Studies, 1992), except that a robust ; 11 * procedure is used to estimate the location and scale equations. ; 12 * ; 13 * Method: ; 14 * ------ ; 15 * The procedure works as follows. Define the location ; 16 * equation ; 17 * ; 18 * (location) p(t) = x(t)*beta + u(t) ; 19 * ; 20 * where p(t) is the variable to be adjusted and x(t) denotes the ; 21 * calendar variables. Initially the location equation is fitted ; 22 * to the data using the Huber robust estimation procedure, which ; 23 * is described further below. Let uhat(t) = y(t) - x(t)*betahat ; 24 * denote the residual from this robust estimation. In the next ; 25 * step, the scale equation ; 26 * ; 27 * (scale) |uhat(t)| = x(t)*gamma + w(t) ; 28 * ; 29 * is fitted to the absolute residual, also using the Huber robust ; 30 * procedure. Observe that the variable ; 31 * ; 32 * z(t) = uhat(t)/sighat(t) ; 33 * ; 34 * where ; 35 * ; 2 The SAS System 13:05 Wednesday, April 28, 1993 36 * sighat(t) = sqrt(x(t)*gammahat) ; 37 * ; 38 * is p(t) purged of the effects of x(t) in mean and location. ; 39 * The series z(t) is the adjusted series, but its units of ; 40 * measurement are awkward to interpret. The final adjusted ; 41 * series is thus ; 42 * ; 43 * padj(t) = psi0 + psi1*z(t) ; 44 * ; 45 * with psi0 and psi1 chosen so that the padj(t) and p(t) have the ; 46 * mean and standard deviation in the sample. This last affine ; 47 * linear transformation has no substantive effect in subsequent ; 48 * analysis. It's only purpose is to put the adjusted series in ; 49 * the same units of measurement as the original series, which is ; 50 * convenient for interpretation. ; 51 * ; 52 * Another way to view the adjustment process is that it is a ; 53 * time-dependent affine linear transformation of the p(t) ; 54 * process, ; 55 * ; 56 * padj(t) = g0(t) + g1(t)*z(t) ; 57 * ; 58 * where ; 59 * ; 60 * g0(t) = psi0 - [psi1/sighat(t)]*[x(t)*betahat] ; 61 * ; 62 * g1(t) = [ps1/sighat(t)] ; 63 * ; 64 * and as before psi0 and psi1 are chosen to so that the adjusted ; 65 * and unadjusted series have the same first two sample moments. ; 66 * The intercept, go(t), and slope coefficient, g1(t), completely ; 67 * characterize the adjustment process mapping p(t) to padj(t). ; 68 * ; 69 * ; 70 * The Huber procedure: ; 71 * ------------------- ; 72 * ; 73 * To fit the location and scale equations, we employ Huber's ; 74 * proposal 2 as described in in Hampel, Ronchetti, Rousseeuw, and ; 75 * Stahel, Robust Statistics: The Approach Based on Influence ; 76 * Functions (HRRS), pp. 105-106, p. 237. Both the location and ; 77 * scale equations are linear models of the form ; 78 * ; 79 * y(t) = x(t)*beta + u(t) . ; 80 * ; 81 * The estimator of beta is ; 82 * ; 83 * betahat = argmin { sum rho[(y(t) - x(t)*beta)/rscale] } ; 84 * beta t ; 85 * ; 86 * where rho is the Huber criterion function ; 87 * ; 88 * z*z for |z| <= c ; 89 * rho(z) = ; 90 * 2*sign(z)*z - c*c for |z| > c . ; 91 * ; 92 * Following HRRS (p. 105 and 237), rscale = 1.483*[median ; 93 * absolute deviation of OLS residuals] and c = 2.0, which ; 3 The SAS System 13:05 Wednesday, April 28, 1993 94 * provides a breakdown point of eps = 0.19. ; 95 * ; 96 * ; 97 * Variables: ; 98 * ---------- ; 99 * ; 100 * p: 100*[log(SP(t)) - log(SP(t-1))], SP(t) = Standard and ; 101 * Poor's Composite Index, daily 1977-1992. ; 102 * ; 103 * ; 104 * Explanatory Variables (x): ; 105 * ; 106 * 1. Day of week dummies (Tues, Weds, Thurs, Fri) ; 107 * ; 108 * day2 = (day eq 2); ; 109 * day3 = (day eq 3); ; 110 * day4 = (day eq 4); ; 111 * day5 = (day eq 5); ; 112 * ; 113 * 2. Sqrt(gap) where gap = number of calendar days since the ; 114 * preceding trading day ; 115 * ; 116 * 3. Dummies for Months March, April, ..., November ; 117 * mon02 = (mm eq 2); ; 118 * mon03 = (mm eq 3); ; 119 * mon04 = (mm eq 4); ; 120 * mon05 = (mm eq 5); ; 121 * mon06 = (mm eq 6); ; 122 * mon07 = (mm eq 7); ; 123 * mon08 = (mm eq 8); ; 124 * mon09 = (mm eq 9); ; 125 * mon10 = (mm eq 10); ; 126 * mon11 = (mm eq 11); ; 127 * ; 128 * 4. Dummies for weeks within January and December ; 129 * ; 130 * mon01_1 = (mm eq 1 and (1 le dd and dd le 7) ); ; 131 * mon01_2 = (mm eq 1 and (8 le dd and dd le 14) ); ; 132 * mon01_3 = (mm eq 1 and (15 le dd and dd le 21) ); ; 133 * mon01_4 = (mm eq 1 and (22 le dd and dd le 31) ); ; 134 * mon12_1 = (mm eq 12 and (1 le dd and dd le 7) ); ; 135 * mon12_2 = (mm eq 12 and (8 le dd and dd le 14) ); ; 136 * mon12_3 = (mm eq 12 and (15 le dd and dd le 21) ); ; 137 * mon12_4 = (mm eq 12 and (22 le dd and dd le 31) ); ; 138 * ; 139 *-------------------------------------------------------------------------; 140 * Begin SAS Code for Adjustments; 141 *-------------------------------------------------------------------------; 142 *-------------------------------------------------------------------------; 143 * Macro for robust regression 144 *-------------------------------------------------------------------------; 145 %MACRO ROBCODE; 146 array x{*} day2 day3 day4 day5 147 rgap 148 mon01_1 mon01_2 mon01_3 mon01_4 149 mon03 mon04 mon05 mon06 mon07 mon08 mon09 mon10 mon11 150 mon12_1 mon12_2 mon12_3 mon12_4; 151 parms b0=0.50 4 The SAS System 13:05 Wednesday, April 28, 1993 152 b1=0 b2=0 b3=0 b4=0 b5=0 153 b6=0 b7=0 b8=0 b9=0 b10=0 154 b11=0 b12=0 b13=0 b14=0 b15=0 155 b16=0 b17=0 b18=0 b19=0 b20=0 b21=0 b22=0; 156 157 pred = b0 + b1*x{1} + b2*x{2} + b3*x{3} + b4*x{4} + b5*x{5} + 158 b6*x{6} + b7*x{7} + b8*x{8} + b9*x{9} + b10*x{10} + 159 b11*x{11} + b12*x{12} + b13*x{13} + b14*x{14} + b15*x{15} + 160 b16*x{16} + b17*x{17} + b18*x{18} + b19*x{19} + b20*x{20} + 161 b21*x{21} + b22*x{22}; 162 163 e = y - pred; 164 z = e/rscale; 165 if ( z > c ) then do; 166 rho = 2*c*z- c*c; 167 delrho = 2*c; 168 end; 169 if ( z < -c ) then do; 170 rho = 2*c*(-z) - c*c; 171 delrho = -2*c; 172 end; 173 if ( z >= -c and z <= c ) then do; 174 rho = z*z; 175 delrho = 2*z; 176 end; 177 178 rrho = sqrt(rho); 179 180 model naught = rrho; 181 der.b0 = -0.50*(1/rrho)*delrho; 182 der.b1 = -0.50*(1/rrho)*delrho*x{1}; 183 der.b2 = -0.50*(1/rrho)*delrho*x{2}; 184 der.b3 = -0.50*(1/rrho)*delrho*x{3}; 185 der.b4 = -0.50*(1/rrho)*delrho*x{4}; 186 der.b5 = -0.50*(1/rrho)*delrho*x{5}; 187 der.b6 = -0.50*(1/rrho)*delrho*x{6}; 188 der.b7 = -0.50*(1/rrho)*delrho*x{7}; 189 der.b8 = -0.50*(1/rrho)*delrho*x{8}; 190 der.b9 = -0.50*(1/rrho)*delrho*x{9}; 191 der.b10 = -0.50*(1/rrho)*delrho*x{10}; 192 der.b11 = -0.50*(1/rrho)*delrho*x{11}; 193 der.b12 = -0.50*(1/rrho)*delrho*x{12}; 194 der.b13 = -0.50*(1/rrho)*delrho*x{13}; 195 der.b14 = -0.50*(1/rrho)*delrho*x{14}; 196 der.b15 = -0.50*(1/rrho)*delrho*x{15}; 197 der.b16 = -0.50*(1/rrho)*delrho*x{16}; 198 der.b17 = -0.50*(1/rrho)*delrho*x{17}; 199 der.b18 = -0.50*(1/rrho)*delrho*x{18}; 200 der.b19 = -0.50*(1/rrho)*delrho*x{19}; 201 der.b20 = -0.50*(1/rrho)*delrho*x{20}; 202 der.b21 = -0.50*(1/rrho)*delrho*x{21}; 203 der.b22 = -0.50*(1/rrho)*delrho*x{22}; 204 %MEND; 5 The SAS System 13:05 Wednesday, April 28, 1993 205 *--------------------------------------------------------------------------; 206 207 options pagesize=55 linesize=80; 208 data zero; 209 infile '/home/get/sv/adjust/sp7792.dat'; 210 input year mm dd price; 211 yy = year-1900; 212 yymmdd = yy*10000 + mm*100 + dd; 213 daynum = mdy(mm,dd,yy); 214 p = 100*( log(price) - log(lag(price)) ); 215 day = weekday(daynum)-1; 216 day1 = (day eq 1); 217 day2 = (day eq 2); 218 day3 = (day eq 3); 219 day4 = (day eq 4); 220 day5 = (day eq 5); 221 hol = ( yymmdd le 520526 )*( mod(lag(day)+1,6) ne mod(day,6) ) + 222 ( yymmdd ge 520527 )*( mod(lag(day)+1,5) ne mod(day,5) ); 223 wkend = ( lag(day) > day); 224 fromjan = daynum - mdy(01,01,yy) + 1; 225 gap = daynum - lag(daynum); 226 rgap = sqrt(gap); 227 gap1 = (gap eq 1); 228 gap2 = (gap eq 2); 229 gap3 = (gap eq 3); 230 gap4 = (gap eq 4); 231 gap5 = (gap eq 5); 232 mon01_1 = (mm eq 1 and (1 le dd and dd le 7) ); 233 mon01_2 = (mm eq 1 and (8 le dd and dd le 14) ); 234 mon01_3 = (mm eq 1 and (15 le dd and dd le 21) ); 235 mon01_4 = (mm eq 1 and (22 le dd and dd le 31) ); 236 mon02 = (mm eq 2); 237 mon03 = (mm eq 3); 238 mon04 = (mm eq 4); 239 mon05 = (mm eq 5); 240 mon06 = (mm eq 6); 241 mon07 = (mm eq 7); 242 mon08 = (mm eq 8); 243 mon09 = (mm eq 9); 244 mon10 = (mm eq 10); 245 mon11 = (mm eq 11); 246 mon12_1 = (mm eq 12 and (1 le dd and dd le 7) ); 247 mon12_2 = (mm eq 12 and (8 le dd and dd le 14) ); 248 mon12_3 = (mm eq 12 and (15 le dd and dd le 21) ); 249 mon12_4 = (mm eq 12 and (22 le dd and dd le 31) ); 250 naught = 0; 251 if (yymmdd lt 770000) then delete; 252 if ( p eq . ) then delete; NOTE: The infile '/home/get/sv/adjust/sp7792.dat' is: 6 The SAS System 13:05 Wednesday, April 28, 1993 File Name=/home/get/sv/adjust/sp7792.dat, Owner Name=get,Group Name=staff, Access Permission=rw-r--r--, File Size (bytes)=72810 NOTE: 4045 records were read from the infile '/home/get/sv/adjust/sp7792.dat'. The minimum record length was 17. The maximum record length was 17. 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 214:18 1 at 214:32 1 at 214:34 1 at 221:38 1 at 221:50 1 at 222:38 1 at 222:50 1 at 225:22 1 at 226:15 NOTE: The data set WORK.ZERO has 4044 observations and 43 variables. NOTE: DATA statement used: real time 2.914 seconds cpu time 2.700 seconds 253 Proc means data=zero; 254 255 *-------------------------------------------------------; 256 * First do an OLS 257 *-------------------------------------------------------; NOTE: The PROCEDURE MEANS printed page 1. NOTE: PROCEDURE MEANS used: real time 3.984 seconds cpu time 3.870 seconds 258 proc reg data=zero; 259 model p = day2-day5 rgap 260 mon01_1-mon01_4 mon03-mon11 mon12_1-mon12_4; 261 output out=res01ols r=prols p=phols; 262 *-------------------------------------------------------; 263 * Put the OLS second moments in statsols; 264 *-------------------------------------------------------; NOTE: 4044 observations read. 4044 observations used in computations. NOTE: The data set WORK.RES01OLS has 4044 observations and 45 variables. NOTE: The PROCEDURE REG printed page 2. NOTE: PROCEDURE REG used: real time 4.537 seconds cpu time 3.740 seconds 265 proc means data=res01ols; 266 var p phols prols; 267 output mean = pbar pholsbar prolsbar 268 std = pse pholsse prolsse 269 out = statsols; 7 The SAS System 13:05 Wednesday, April 28, 1993 NOTE: The data set WORK.STATSOLS has 1 observations and 8 variables. NOTE: The PROCEDURE MEANS printed page 3. NOTE: PROCEDURE MEANS used: real time 1.024 seconds cpu time 0.910 seconds 270 proc print data=statsols; 271 272 *-------------------------------------------------------; 273 * Determine the median absolute deviation of the 274 OLS residuals; 275 *-------------------------------------------------------; NOTE: The PROCEDURE PRINT printed page 4. NOTE: PROCEDURE PRINT used: real time 0.069 seconds cpu time 0.050 seconds 276 data work00; set res01ols; 277 abpr = abs(prols); 278 keep abpr; NOTE: The data set WORK.WORK00 has 4044 observations and 1 variables. NOTE: DATA statement used: real time 0.644 seconds cpu time 0.520 seconds 279 proc univariate data=work00; 280 var abpr; 281 output out=work01 median = madpr; NOTE: The data set WORK.WORK01 has 1 observations and 1 variables. NOTE: The PROCEDURE UNIVARIATE printed page 5. NOTE: PROCEDURE UNIVARIATE used: real time 0.915 seconds cpu time 0.600 seconds 282 proc print data=work01; NOTE: The PROCEDURE PRINT printed page 6. NOTE: PROCEDURE PRINT used: real time 0.018 seconds cpu time 0.020 seconds 283 data one; set zero; 284 if (_n_=1) then set work01; 8 The SAS System 13:05 Wednesday, April 28, 1993 NOTE: The data set WORK.ONE has 4044 observations and 44 variables. NOTE: DATA statement used: real time 1.405 seconds cpu time 1.070 seconds 285 proc datasets ddname=work nolist; delete work00 work01; NOTE: Deleting WORK.WORK00 (memtype=DATA). NOTE: Deleting WORK.WORK01 (memtype=DATA). NOTE: PROCEDURE DATASETS used: real time 0.103 seconds cpu time 0.040 seconds 286 proc means data=one; 287 288 *-------------------------------------------------------; 289 * Estimate the linear mean function robustly; 290 *-------------------------------------------------------; NOTE: The PROCEDURE MEANS printed pages 7-8. NOTE: PROCEDURE MEANS used: real time 4.800 seconds cpu time 4.290 seconds 291 proc nlin method=gauss data=one; 292 y = p; * dependent variable; 293 rscale = 1.483*madpr; * robust scale estimate; 294 c = 2.00; * switch point of Huber criterion; 295 %ROBCODE; * bring in the macro; 296 ph = pred; * robust predicted value; 297 pr = y - pred; * robust residuals; 298 rhol = rho; * value of rho; 299 zl = z; 300 id ph pr e zl rhol; 301 output out=res01rob; NOTE: PROCEDURE NLIN used: real time 30.592 seconds cpu time 29.140 seconds NOTE: The data set WORK.RES01ROB has 4044 observations and 49 variables. NOTE: The PROCEDURE NLIN printed pages 9-15. 302 proc means data=res01rob; 303 *-------------------------------------------------------; 304 * Put a copy of the residual second moments in stats; 305 *-------------------------------------------------------; NOTE: The PROCEDURE MEANS printed pages 16-17. NOTE: PROCEDURE MEANS used: real time 4.868 seconds 9 The SAS System 13:05 Wednesday, April 28, 1993 cpu time 4.560 seconds 306 data res01; 307 set res01rob; 308 keep p ph pr e rhol; NOTE: The data set WORK.RES01 has 4044 observations and 5 variables. NOTE: DATA statement used: real time 0.942 seconds cpu time 0.560 seconds 309 proc means data=res01; 310 var p ph pr e; 311 output mean = pbar phbar prbar ebar 312 std = pse phse prse ese 313 out = stats; NOTE: The data set WORK.STATS has 1 observations and 10 variables. NOTE: The PROCEDURE MEANS printed page 18. NOTE: PROCEDURE MEANS used: real time 0.915 seconds cpu time 0.790 seconds 314 proc print data=stats; NOTE: The PROCEDURE PRINT printed page 19. NOTE: PROCEDURE PRINT used: real time 0.027 seconds cpu time 0.030 seconds 315 data auxl; 316 set res01; 317 keep pr rhol; 318 319 *-------------------------------------------------------; 320 * Form absolute residuals; 321 *-------------------------------------------------------; NOTE: The data set WORK.AUXL has 4044 observations and 2 variables. NOTE: DATA statement used: real time 0.535 seconds cpu time 0.320 seconds 322 data two; 323 merge one res01(keep = ph pr); 324 ap = abs(pr); NOTE: The data set WORK.TWO has 4044 observations and 47 variables. 10 The SAS System 13:05 Wednesday, April 28, 1993 NOTE: DATA statement used: real time 2.059 seconds cpu time 1.670 seconds 325 proc datasets ddname=work nolist; delete one; 326 327 *-------------------------------------------------------; 328 * Do an OLS on the absolute residuals; 329 * This is an OLS fit of the scale equation; 330 *-------------------------------------------------------; NOTE: Deleting WORK.ONE (memtype=DATA). NOTE: PROCEDURE DATASETS used: real time 0.133 seconds cpu time 0.060 seconds 331 proc reg data=two ; 332 model ap = day2-day5 rgap 333 mon01_1-mon01_4 mon03-mon11 mon12_1-mon12_4; 334 output out=res02ols p=aphols r=aprols; 335 NOTE: 4044 observations read. 4044 observations used in computations. NOTE: The data set WORK.RES02OLS has 4044 observations and 49 variables. NOTE: The PROCEDURE REG printed page 20. NOTE: PROCEDURE REG used: real time 7.264 seconds cpu time 4.210 seconds 336 proc univariate data=res02ols; 337 var ap aprols aphols; 338 339 *-------------------------------------------------------; 340 * Determine the median absolute deviation of the 341 OLS residuals from the scale equation; 342 *-------------------------------------------------------; NOTE: The PROCEDURE UNIVARIATE printed pages 21-23. NOTE: PROCEDURE UNIVARIATE used: real time 1.406 seconds cpu time 1.340 seconds 343 data work00; set res02ols; 344 abapr = abs(aprols); 345 keep abapr; NOTE: The data set WORK.WORK00 has 4044 observations and 1 variables. NOTE: DATA statement used: 11 The SAS System 13:05 Wednesday, April 28, 1993 real time 0.644 seconds cpu time 0.510 seconds 346 proc univariate data=work00; 347 var abapr; 348 output out=work01 median = madabapr; NOTE: The data set WORK.WORK01 has 1 observations and 1 variables. NOTE: The PROCEDURE UNIVARIATE printed page 24. NOTE: PROCEDURE UNIVARIATE used: real time 0.856 seconds cpu time 0.540 seconds 349 proc print data=work01; 350 NOTE: The PROCEDURE PRINT printed page 25. NOTE: PROCEDURE PRINT used: real time 0.018 seconds cpu time 0.020 seconds 351 data three; set two; 352 if (_n_=1) then set work01; NOTE: The data set WORK.THREE has 4044 observations and 48 variables. NOTE: DATA statement used: real time 2.411 seconds cpu time 1.140 seconds 353 proc datasets ddname=work nolist; delete work00 work01; 354 NOTE: Deleting WORK.WORK00 (memtype=DATA). NOTE: Deleting WORK.WORK01 (memtype=DATA). NOTE: PROCEDURE DATASETS used: real time 0.094 seconds cpu time 0.020 seconds 355 proc means data=three; 356 357 *-------------------------------------------------------; 358 * Do the robust NLS on absolute residuals, i.e., fit 359 the scale equation; 360 *-------------------------------------------------------; NOTE: The PROCEDURE MEANS printed pages 26-27. NOTE: PROCEDURE MEANS used: real time 4.526 seconds 12 The SAS System 13:05 Wednesday, April 28, 1993 cpu time 4.450 seconds 361 proc nlin method=gauss data=three; 362 y = ap; * dependent variable; 363 rscale = 1.483*madabapr; * robust scale estimate; 364 c = 2.00; * switch point of Huber criterion; 365 %ROBCODE; * bring in the macro; 366 aph = pred; * robust predicted value; 367 apr = y - pred; * robust residuals; 368 rhos = rho; * value of rho; 369 zs = z; 370 id aph apr e zs rhos; 371 output out=res02rob; NOTE: PROCEDURE NLIN used: real time 1:15.817 cpu time 1:11.230 NOTE: The data set WORK.RES02ROB has 4044 observations and 53 variables. NOTE: The PROCEDURE NLIN printed pages 28-36. 372 proc means data=res02rob; 373 var p ap aph apr e zs rhos; NOTE: The PROCEDURE MEANS printed page 37. NOTE: PROCEDURE MEANS used: real time 1.588 seconds cpu time 1.330 seconds 374 data res02; 375 set res02rob; 376 keep aph; NOTE: The data set WORK.RES02 has 4044 observations and 1 variables. NOTE: DATA statement used: real time 1.106 seconds cpu time 0.730 seconds 377 data auxs; 378 set res02rob; 379 keep apr rhos; NOTE: The data set WORK.AUXS has 4044 observations and 2 variables. NOTE: DATA statement used: real time 1.297 seconds cpu time 0.720 seconds 380 proc datasets ddname=work nolist; delete res01rob res02rob; 381 382 *-------------------------------------------------------; 13 The SAS System 13:05 Wednesday, April 28, 1993 383 * Determine the mean and standard deviation of the 384 rescaled and recentered residual; 385 *-------------------------------------------------------; NOTE: Deleting WORK.RES01ROB (memtype=DATA). NOTE: Deleting WORK.RES02ROB (memtype=DATA). NOTE: PROCEDURE DATASETS used: real time 0.206 seconds cpu time 0.110 seconds 386 data four; 387 merge three res02(keep = aph); 388 scale = 1/aph; 389 zp = scale*pr; NOTE: The data set WORK.FOUR has 4044 observations and 51 variables. NOTE: DATA statement used: real time 2.792 seconds cpu time 1.740 seconds 390 proc datasets ddname=work nolist; delete three; NOTE: Deleting WORK.THREE (memtype=DATA). NOTE: PROCEDURE DATASETS used: real time 0.161 seconds cpu time 0.040 seconds 391 proc means data=four; 392 var zp; 393 output mean = zpbar 394 std = zpse 395 out = statszp; NOTE: The data set WORK.STATSZP has 1 observations and 4 variables. NOTE: The PROCEDURE MEANS printed page 38. NOTE: PROCEDURE MEANS used: real time 0.997 seconds cpu time 0.780 seconds 396 proc print data=statszp; NOTE: The PROCEDURE PRINT printed page 39. NOTE: PROCEDURE PRINT used: real time 0.020 seconds cpu time 0.020 seconds 397 data statsall; 398 merge stats statszp; 14 The SAS System 13:05 Wednesday, April 28, 1993 NOTE: The data set WORK.STATSALL has 1 observations and 12 variables. NOTE: DATA statement used: real time 0.222 seconds cpu time 0.100 seconds 399 proc print data=statsall; NOTE: The PROCEDURE PRINT printed page 40. NOTE: PROCEDURE PRINT used: real time 0.028 seconds cpu time 0.030 seconds 400 proc datasets ddname=work nolist; delete three; 401 402 *-------------------------------------------------------; 403 * Determine the intercept (g0) and slope (g1) of the 404 affine linear transformation for the adjustment 405 and use it to adjust the data; 406 *-------------------------------------------------------; NOTE: The file WORK.THREE was not found, but appears on a DELETE statement. NOTE: PROCEDURE DATASETS used: real time 0.037 seconds cpu time 0.040 seconds 407 data five; 408 set four; 409 merge auxl auxs; 410 if _n_=1 then set statsall; 411 g0 = pbar - (pse/zpse)*zpbar - (pse/zpse)*scale*ph; 412 g1 = (pse/zpse)*scale; 413 padj = g0 + g1*p; NOTE: The data set WORK.FIVE has 4044 observations and 69 variables. NOTE: DATA statement used: real time 2.084 seconds cpu time 1.840 seconds 414 proc datasets ddname=work nolist; delete four; 415 NOTE: Deleting WORK.FOUR (memtype=DATA). NOTE: PROCEDURE DATASETS used: real time 0.096 seconds cpu time 0.050 seconds 416 proc univariate data=five; 15 The SAS System 13:05 Wednesday, April 28, 1993 417 var p padj g0 g1; 418 NOTE: The PROCEDURE UNIVARIATE printed pages 41-44. NOTE: PROCEDURE UNIVARIATE used: real time 1.693 seconds cpu time 1.630 seconds 419 proc means data=five; 420 var p padj g0 g1; 421 422 *-------------------------------------------------------; 423 * write out adjusted data; 424 *-------------------------------------------------------; NOTE: The PROCEDURE MEANS printed page 45. NOTE: PROCEDURE MEANS used: real time 1.229 seconds cpu time 1.210 seconds 425 data _null_; set five; 426 file '/home/get/sv/adjust/spaj7792.dat' notitles; 427 put yymmdd 1-6 day 7-8 hol 9-10 wkend 11-12 gap 13-15 fromjan 16-19 428 +1 padj e17. 429 +1 p e17. 430 +1 price 6.2; 431 432 *-------------------------------------------------------; 433 * dump more stuff to a .dmp file; 434 *-------------------------------------------------------; NOTE: The file '/home/get/sv/adjust/spaj7792.dat' is: File Name=/home/get/sv/adjust/spaj7792.dat, Owner Name=get,Group Name=staff, Access Permission=rw-r--r-- NOTE: 4044 records were written to the file '/home/get/sv/adjust/spaj7792.dat'. The minimum record length was 62. The maximum record length was 62. NOTE: DATA statement used: real time 2.451 seconds cpu time 2.300 seconds 435 data _null_; set five; 436 file '/home/get/sv/adjust/spaj7792.dmp' notitles; 437 put yymmdd 1-6 day 7-8 hol 9-10 wkend 11-12 gap 13-15 fromjan 16-19 438 +1 padj e17. 439 +1 p e17. 16 The SAS System 13:05 Wednesday, April 28, 1993 440 +1 price 6.2 441 +1 g0 10.5 442 +1 g1 10.5 443 +1 pr 10.5 444 +1 rhol 10.5 445 +1 apr 10.5 446 +1 rhos 10.5; NOTE: The file '/home/get/sv/adjust/spaj7792.dmp' is: File Name=/home/get/sv/adjust/spaj7792.dmp, Owner Name=get,Group Name=staff, Access Permission=rw-r--r-- NOTE: 4044 records were written to the file '/home/get/sv/adjust/spaj7792.dmp'. The minimum record length was 128. The maximum record length was 128. NOTE: DATA statement used: real time 3.234 seconds cpu time 3.150 seconds NOTE: The SAS System used: real time 2:55.687 cpu time 2:35.540 NOTE: SAS Institute Inc., SAS Circle, PO Box 8000, Cary, NC 27512-8000