how to add another line to the regressin graph

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

bit_xiaoxiao
Posts: 7
Joined: Tue May 25, 2010 9:41 pm

how to add another line to the regressin graph

Postby bit_xiaoxiao » Tue May 25, 2010 10:16 pm

I have already known how to do the linear regression with Eviews 6, and I can draw the regression plot.

For example, I got a regression line such as y = 2x + 3.

Now I want to add another line to the regression plot( just for camparison aim),such as y = 1.5x +2, how can I add the second line into the plot?

thank you!

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: how to add another line to the regressin graph

Postby startz » Tue May 25, 2010 11:30 pm

Make up a new series

Code: Select all

series yAlternative = 1.5*x+2

and add yAlternative to the graph.

bit_xiaoxiao
Posts: 7
Joined: Tue May 25, 2010 9:41 pm

Re: how to add another line to the regressin graph

Postby bit_xiaoxiao » Wed May 26, 2010 8:52 am

startz wrote:Make up a new series

Code: Select all

series yAlternative = 1.5*x+2

and add yAlternative to the graph.


What I don't know is just how to "add yAlternative to the graph".

should I use any command or commands with menus? how can I do it?

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: how to add another line to the regressin graph

Postby startz » Wed May 26, 2010 9:06 am

What command did you use to draw the first graph?

bit_xiaoxiao
Posts: 7
Joined: Tue May 25, 2010 9:41 pm

Re: how to add another line to the regressin graph

Postby bit_xiaoxiao » Wed May 26, 2010 9:18 am

startz wrote:What command did you use to draw the first graph?

ls y x

I want to add the second line into the first plot, not bulid another plot

bit_xiaoxiao
Posts: 7
Joined: Tue May 25, 2010 9:41 pm

Re: how to add another line to the regressin graph

Postby bit_xiaoxiao » Wed May 26, 2010 9:19 am

bit_xiaoxiao wrote:
startz wrote:What command did you use to draw the first graph?

ls y x

I want to add the second line into the first plot, not bulid another plot


I use y and x just for simplifing the problem

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: how to add another line to the regressin graph

Postby startz » Wed May 26, 2010 9:25 am

bit_xiaoxiao wrote:
bit_xiaoxiao wrote:
startz wrote:What command did you use to draw the first graph?

ls y x

I want to add the second line into the first plot, not bulid another plot


I use y and x just for simplifing the problem


Code: Select all

ls y x


doesn't create a graph. What did you do to get the graph after running the regression?

bit_xiaoxiao
Posts: 7
Joined: Tue May 25, 2010 9:41 pm

Re: how to add another line to the regressin graph

Postby bit_xiaoxiao » Wed May 26, 2010 9:29 am

startz wrote:doesn't create a graph. What did you do to get the graph after running the regression?


I use menu to get the scatter plot with regression line. I already have a graph, and I also have the second series, what should I do to add the second line to the graph

startz
Non-normality and collinearity are NOT problems!
Posts: 3775
Joined: Wed Sep 17, 2008 2:25 pm

Re: how to add another line to the regressin graph

Postby startz » Wed May 26, 2010 9:44 am

bit_xiaoxiao wrote:
startz wrote:doesn't create a graph. What did you do to get the graph after running the regression?


I use menu to get the scatter plot with regression line. I already have a graph, and I also have the second series, what should I do to add the second line to the graph

Try something like

Code: Select all

ls y x
group g x y yAlternative


then double-click on "g" and choose a scatter diagram with a regression fit line.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 35 guests