diff --git a/doc/examples/ex43/ex43.ps b/doc/examples/ex43/ex43.ps index 88a24002ae0..80455cc2a6f 100644 Binary files a/doc/examples/ex43/ex43.ps and b/doc/examples/ex43/ex43.ps differ diff --git a/doc/examples/ex43/ex43.sh b/doc/examples/ex43/ex43.sh index 240bd8b2b18..f917f18824d 100755 --- a/doc/examples/ex43/ex43.sh +++ b/doc/examples/ex43/ex43.sh @@ -14,7 +14,7 @@ gmt begin ex43 file=$(gmt which -G @bb_weights.txt) gmt regress -Ey -Nw -i0:1+l $file > model.txt - gmt regress -Ey -Nw -i0:1+l $file -Fxmc -T-2/6/0.1 > rls_line.txt + gmt regress -Ey -Nw -i0:1+l $file -Fxmc -T-2/6/0.1 -C99 > rls_line.txt gmt regress -Ey -N2 -i0:1+l $file -Fxm -T-2/6/2+n > ls_line.txt grep -v '^>' model.txt > A.txt grep -v '^#' $file > B.txt diff --git a/doc/rst/source/gallery/ex43.rst b/doc/rst/source/gallery/ex43.rst index 99ddf2a2dcb..9ee6c4cba1c 100644 --- a/doc/rst/source/gallery/ex43.rst +++ b/doc/rst/source/gallery/ex43.rst @@ -8,7 +8,7 @@ robust regression line using *reweighted least squares* and from this fit we are able to identify outliers with respect to the main trend. The result shows dinosaurs were large and dumb, humans and some monkeys pretty smart, and the rest of the -mammals doing alright. +mammals doing alright. Band shows 99% confidence internal on regression. .. literalinclude:: /_verbatim/ex43.txt :language: bash diff --git a/src/gmtregress.c b/src/gmtregress.c index db812d5c5fb..4cdd4dd5a68 100644 --- a/src/gmtregress.c +++ b/src/gmtregress.c @@ -1335,8 +1335,8 @@ EXTERN_MSC int GMT_gmtregress (void *V_API, int mode, void *args) { case 'r': /* Residual */ out[col] = S->data[GMT_Y][row] - gmtregress_model (x[row], par); break; - case 'c': /* Model confidence limit (add x and y uncertainties in quadrature since uncorrelated) */ - out[col] = t_scale * hypot (par[GMTREGRESS_SIGIC], par[GMTREGRESS_SIGSL] * fabs (x[row] - par[GMTREGRESS_XMEAN])); + case 'c': /* Model confidence limit (add slope and intercept uncertainties in quadrature since uncorrelated) */ + out[col] = t_scale * sqrt (par[GMTREGRESS_MISFT]) * hypot (par[GMTREGRESS_SIGIC], par[GMTREGRESS_SIGSL] * fabs (x[row] - par[GMTREGRESS_XMEAN])); break; case 'z': /* Standardized residuals (z-scores) */ out[col] = z_score[row]; diff --git a/test/gmtregress/draper.ps b/test/gmtregress/draper.ps index 81e8b37fe51..b8d3917ad68 100644 Binary files a/test/gmtregress/draper.ps and b/test/gmtregress/draper.ps differ