Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified doc/examples/ex43/ex43.ps
Binary file not shown.
2 changes: 1 addition & 1 deletion doc/examples/ex43/ex43.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/rst/source/gallery/ex43.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/gmtregress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Binary file modified test/gmtregress/draper.ps
Binary file not shown.