Geoscience Reference
In-Depth Information
are already in the model. h e plot also displays a horizontal dashed line that
is not explained in the User's Guide of the Statistics Toolbox (MathWorks
2014b). Information regarding this dashed line can, however, be found in the
R2013 Release Notes and the M-i le of the function LinearModel
edit LinearModel.fit
where the regression diagnostics are explained in detail from line 126
onward. According to this information, the average value of leverage is
the ratio between the number of regression coei cients and the number of
measurements
size(data,2)/size(data,1)
which in this particular example yields
ans =
0.1250
Observations with leverage values larger than twice this ratio
2*size(data,2)/size(data,1)
which yields
ans =
0.2500
are considered to have high leverage, and are all measurements above the
dashed line at 0.250. In our example there are two points with leverages
greater than 0.250, one in row 11 of the array and the other in row 22. We
can obtain the IDs of these samples by typing
samples{1}(11)
samples{1}(22)
which yields
ans =
'HF14'
ans =
'HF49'
h e leverage plot does not reveal whether or not the high-leverage points
are outliers. We can instead calculate and display the Cook's distance of each
data point
plotDiagnostics(beta,'cookd')
Search WWH ::




Custom Search