23.07.2013 Views

Fitting Curves and Surfaces Using SAS Software - ISS - University of ...

Fitting Curves and Surfaces Using SAS Software - ISS - University of ...

Fitting Curves and Surfaces Using SAS Software - ISS - University of ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Fitting</strong> <strong>Curves</strong> <strong>and</strong> <strong>Surfaces</strong> <strong>Using</strong> <strong>SAS</strong> <strong>S<strong>of</strong>tware</strong><br />

Version 1.1 (February 2007)<br />

Example 5: <strong>Fitting</strong> a Generalised Additive Model using PROC GAM<br />

(i) Open the file gam.sas <strong>and</strong> execute the program by pressing F8.<br />

ods html<br />

file="c:\temp\sas\graph\so4b.htm";<br />

goptions reset=all device=activex;<br />

proc gam data=sasgraph.so4;<br />

model so4=spline(longitude)<br />

spline(latitude)<br />

score data=pred out=prediction3;<br />

run;<br />

ods html close;<br />

ods listing;<br />

The surface is much smoother than that produced by TPSPLINE. However, GAM uses much less cpu<br />

time than TPSPLINE. In this example, GAM ran in less than a fifth <strong>of</strong> the time taken by TPSPLINE. The<br />

contour b<strong>and</strong>s <strong>and</strong> the projected contour lines were added using the technique described in 1.2.3.<br />

Information Systems Services Page 18 <strong>of</strong> 22<br />

Version 1.1 (Feb 2007) tut125.doc

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!