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?