14.03.2014 Views

Basic Analysis and Graphing - SAS

Basic Analysis and Graphing - SAS

Basic Analysis and Graphing - SAS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

124 Performing Bivariate <strong>Analysis</strong> Chapter 4<br />

Statistical Details for the Bivariate Platform<br />

Statistical Details for Fit Line<br />

The Fit Line comm<strong>and</strong> finds the parameters β 0 <strong>and</strong> β 1 for the straight line that fits the points to minimize<br />

the residual sum of squares. The model for the ith row is written y i<br />

= β 0<br />

+ β 1<br />

x i<br />

+ ε i .<br />

A polynomial of degree 2 is a parabola; a polynomial of degree 3 is a cubic curve. For degree k, the model for<br />

the ith observation is as follows:<br />

y i<br />

=<br />

k<br />

<br />

j = 0<br />

β j<br />

x i<br />

j<br />

+ ε i<br />

Statistical Details for Fit Spline<br />

The cubic spline method uses a set of third-degree polynomials spliced together such that the resulting curve<br />

is continuous <strong>and</strong> smooth at the splices (knot points). The estimation is done by minimizing an objective<br />

function that is a combination of the sum of squares error <strong>and</strong> a penalty for curvature integrated over the<br />

curve extent. See the paper by Reinsch (1967) or the text by Eubank (1988) for a description of this<br />

method.<br />

Statistical Details for Fit Orthogonal<br />

St<strong>and</strong>ard least square fitting assumes that the X variable is fixed <strong>and</strong> the Y variable is a function of X plus<br />

error. If there is r<strong>and</strong>om variation in the measurement of X, you should fit a line that minimizes the sum of<br />

the squared perpendicular differences. See Figure 4.25. However, the perpendicular distance depends on<br />

how X <strong>and</strong> Y are scaled, <strong>and</strong> the scaling for the perpendicular is reserved as a statistical issue, not a graphical<br />

one.<br />

Figure 4.25 Line Perpendicular to the Line of Fit<br />

y distance<br />

orthogonal<br />

distance<br />

x distance<br />

The fit requires that you specify the ratio of the variance of the error in X to the error in Y. This is the<br />

variance of the error, not the variance of the sample points, so you must choose carefully. The ratio<br />

( σ2<br />

y<br />

) ⁄ ( σ2<br />

x<br />

) is infinite in st<strong>and</strong>ard least squares because σ2<br />

x is zero. If you do an orthogonal fit with a large<br />

error ratio, the fitted line approaches the st<strong>and</strong>ard least squares line of fit. If you specify a ratio of zero, the fit<br />

is equivalent to the regression of X on Y, instead of Y on X.

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

Saved successfully!

Ooh no, something went wrong!