outliers in a scatterplot

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

Posts: 11
Joined: Tue Aug 11, 2015 10:26 am

outliers in a scatterplot

Postby LMGZ » Wed May 23, 2018 2:22 pm


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?


LM Gomez

EViews Glenn
EViews Developer
Posts: 2643
Joined: Wed Oct 15, 2008 9:17 am

Re: outliers in a scatterplot

Postby EViews Glenn » Thu May 31, 2018 11:09 am

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.

Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 6 guests