1 The SAS System 07:03 Friday, December 4, 2009 NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) 9.1 (TS1M3) Licensed to UNIVERSITY OF FLORIDA-T/R, Site 0007029013. NOTE: This session is executing on the Linux 2.6.12-gentoo-r10 platform. NOTE: SAS 9.1.3 Service Pack 3 You are running SAS 9. Some SAS 8 files will be automatically converted by the V9 engine; others are incompatible. Please see http://support.sas.com/rnd/migration/planning/platform/64bit.html PROC MIGRATE will preserve current SAS file attributes and is recommended for converting all your SAS libraries from any SAS 8 release to SAS 9. For details and examples, please see http://support.sas.com/rnd/migration/index.html This message is contained in the SAS news file, and is presented upon initialization. Edit the file "news" in the "misc/base" directory to display site-specific news and information in the program log. The command line option "-nonews" will prevent this display. NOTE: SAS initialization used: real time 0.02 seconds cpu time 0.01 seconds 1 /* "Experiments to Determine the force of Fired Gunpowder" 2 by Benjamin Count of Rumford. Philosophical Transactions of the 3 Royal Society of London. Vol. 87 (1797) pp222-292. 4 5 Theory: X=charge of gunpowder Y=elasticity of generated fluid 6 7 Y = X**(1+0.0004X) = (B0*X)**(B1+B2*X) 8 B0=1=B1 B2=0.0004 (Count's Theory) 9 10 */ 11 12 options nodate nonumber ps=54 ls=76; 13 goptions reset=all dev=pdf gsfname=output gsfmode=replace; 14 15 data gunpwder; 16 input charge elasticity; 17 elasticity=elasticity/1.841; /* Converts atmospheres back to 17 ! =parts */ 18 lnchar=log(charge); 19 cards; The SAS System NOTE: The data set WORK.GUNPWDER has 17 observations and 3 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 37 ; 38 run; 39 40 proc nlin; 41 parms b0=1 b1=1 b2=0.0004; 42 model elasticity = b0*(charge**(b1+(b2*charge))); 43 der.b0=(charge**(b1+(b2*charge))); 44 der.b1=lnchar*b0*(charge**(b1+(b2*charge))); 45 der.b2=charge*lnchar*b0*(charge**(b1+(b2*charge))); 46 output out=gunout p=yhat r=e; 47 run; NOTE: PROC NLIN grid search time was 0: 0: 0. NOTE: Convergence criterion met. NOTE: The data set WORK.GUNOUT has 17 observations and 5 variables. NOTE: The PROCEDURE NLIN printed pages 1-2. NOTE: PROCEDURE NLIN used (Total process time): real time 0.03 seconds cpu time 0.03 seconds 48 49 data gunout; set gunout; 50 theory=charge**(1+(0.0004*charge)); 51 NOTE: There were 17 observations read from the data set WORK.GUNOUT. NOTE: The data set WORK.GUNOUT has 17 observations and 6 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 52 proc sort; 53 by charge; 54 run; NOTE: There were 17 observations read from the data set WORK.GUNOUT. NOTE: The data set WORK.GUNOUT has 17 observations and 6 variables. NOTE: PROCEDURE SORT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 55 56 filename output 'gunpowder.pdf'; The SAS System 57 symbol1 c=black v=:; 58 symbol2 c=black l=1 i=spline; 59 symbol3 c=black l=5 i=spline; 60 61 proc gplot; 62 plot elasticity*charge=1 yhat*charge=2 theory*charge=3 / overlay 62 ! frame; 63 title 'Gunpowder Experiment'; 64 run; 65 66 filename output 'gunpowder1.pdf'; ERROR: File is already open. ERROR: Error in the FILENAME statement. NOTE: 172 RECORDS WRITTEN TO /home/winner/public_html/data/gunpowder.pdf NOTE: There were 17 observations read from the data set WORK.GUNOUT. NOTE: PROCEDURE GPLOT used (Total process time): real time 0.02 seconds cpu time 0.01 seconds 67 proc gplot; 68 plot e*yhat=1 / frame vref=0; 69 run; 70 71 quit; NOTE: 141 RECORDS WRITTEN TO /home/winner/public_html/data/gunpowder.pdf NOTE: There were 17 observations read from the data set WORK.GUNOUT. NOTE: PROCEDURE GPLOT used (Total process time): real time 0.01 seconds cpu time 0.00 seconds ERROR: Errors printed on page 3. NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 0.10 seconds cpu time 0.06 seconds