Regression line in 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: 1
Joined: Fri Jan 04, 2019 6:14 am

Regression line in Scatterplot

Postby elimpo » Sat Jan 05, 2019 2:36 am

I have a problem with plotting some Gravity-data.
I want a Scatterplot with exports on the left and distance on the bottom axis. In this Plot I want to highlight the observations of one subgroup and I need a Regression line over the whole dataset.
The Subgroup of eastern european countries is defined with the dummy variable "moe11_d"

if I try to run

Code: Select all

freeze(tig_dist_d) tig_dist_deu.scat  linefit(yl,xl) within(moe10_o)

where tig_dist_deu is a group object containing a Series Object with Exports and one Series object with the distances.
I get the scatterplot I want with different colored observation points for the two groups, but I also have two regression lines. One for the data of the subgroup, and one for the rest of the data. But I just want one regressionline for all observation points.
Does anyone know what I'm doing wrong?


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 35 guests