Page 1 of 1

outliers in a scatterplot

Posted: Wed May 23, 2018 2:22 pm
by LMGZ
Hello,

I want to graph a scatter plot with a regression line. The graph should show all the data I have but the regression line should be calculated with a subgroup of the data without outliers.

More specifically I want to remove the financial crisis years 2008 and 2009 of the data for the regression but I still want the graph to show them preferably in a different color.

Is there an easy way to do this?

Regards

LM Gomez

Re: outliers in a scatterplot

Posted: Thu May 31, 2018 11:09 am
by EViews Glenn
If you are okay with a separate regression line for both the non-2008/2009 values and for the the 2008/2009 values, the easiest way to do this is to create new series that have missing data for subsections of the data. That is, create a series with just the 2008 and 2009 values, and a separate series which has all but the 2008 and 2009 values.

Then scatterplot both and you can set the colors on the scatter as desired.

When you do a regression line it will create a line for both series. If you only want the line on the non-2008/2009 values, it'll be a bit trickier.