Geoscience Reference
In-Depth Information
h e resulting 30 regression lines, each computed using n -1=29 data points,
display some dispersion in their slopes and y -axis intercepts.
clear
agedepth = load('agedepth_1.txt');
meters = agedepth(:,1);
age = agedepth(:,2);
p = polyfit(meters,age,1);
for i = 1 : 30
j_meters = meters;
j_age = age;
j_meters(i) = [];
j_age(i) = [];
p(i,:) = polyfit(j_meters,j_age,1);
plot(meters,polyval(p(i,:),meters),'r'), hold on
p_age(i) = polyval(p(i,:),meters(i));
p_error(i) = p_age(i) - age(i);
end
hold off
h e prediction error is - in the ideal case - Gaussian distributed with a mean
of zero.
mean(p_error)
ans =
-0.0487
h e standard deviation is an unbiased mean of the deviations of the true data
points from the predicted straight line.
std(p_error)
ans =
10.9757
Cross validation gives valuable information on the goodness-of-i t of the
regression result and can also be used for quality control in other i elds, such
as those of temporal and spatial prediction (Chapters 5 and 7).
4.8 Reduced Major Axis Regression
In some examples neither variable is manipulated and both can therefore be
considered to be independent. In such cases several methods are available to
compute a best-i t line that minimizes the distance from both x and y . As an
example the method of reduced major axis (RMA) minimizes the triangular
Search WWH ::




Custom Search