.. _example_47:

(47) Linear regression using different norms and types
------------------------------------------------------

In this example we show how the module :doc:`gmtregress </gmtregress>`
is used to fit a multitude of different linear regression models to
a data set with extreme outliers that can also act as leverage points.
This data set forms the basis for the main sequence
in a Hertzsprung-Russell diagram of the star cluster CYG OB1, which includes
four red giants that are outlying with respect to the main trend.

.. literalinclude:: /_verbatim/ex47.txt
   :language: bash

.. figure:: /_images/ex47.*
   :width: 500 px
   :align: center

   Robust and not-so-robust regressions.
