Hi there,
I just wonder if it's possible to get displayed the estimated equation and R2 to 'Regression Line' in a Scatter type of graph. If yes, I'd need to include it in a code. Thanks for hints!
Diplaying fit eq. in a scatter graph (EV 6)
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Diplaying fit eq. in a scatter graph (EV 6)
Code: Select all
g.scat linefit(leg=det)
Re: Diplaying fit eq. in a scatter graph (EV 6)
Hi Gareth,
many thanks for the tip. After having tried it, I see two somewhat disadvantages: first, it produced the eq representation as a part of the legend, standing left to chart; second, the actual variable names may be too long; and third, I'd need to get R2 in there anyway.
I think I best do by creating a piece of text myself which I could: [1] include in the chart area, [2] even export if wanted.
Having gotten the coeff estimates into a vector:
I thought of sth like this:
1. making the code to write the text in the text object
2. including the estimated cfs-s into the text
3. controlling the number of digits in the displayed cfs-s
4. formatting part of the text as italics.
Maybe I should not think of creating a text object, but rather something like a table object? I don't know, no experience with this at all. I would be enormously thankful for helping.
many thanks for the tip. After having tried it, I see two somewhat disadvantages: first, it produced the eq representation as a part of the legend, standing left to chart; second, the actual variable names may be too long; and third, I'd need to get R2 in there anyway.
I think I best do by creating a piece of text myself which I could: [1] include in the chart area, [2] even export if wanted.
Having gotten the coeff estimates into a vector:
Code: Select all
coef(3) cfs
equation eq1.ls y = cfs(1) + cfs(2) * x
cfs(3) = @r2 , however, I hit on difficulties with:Y = .dddd +- .dddd X, (R^2 .dd)
1. making the code to write the text in the text object
2. including the estimated cfs-s into the text
3. controlling the number of digits in the displayed cfs-s
4. formatting part of the text as italics.
Maybe I should not think of creating a text object, but rather something like a table object? I don't know, no experience with this at all. I would be enormously thankful for helping.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Diplaying fit eq. in a scatter graph (EV 6)
Ha, once again this would be much easier in EV7. But in 6 you are probably best off putting it into a table object rather than a text object.
Re: Diplaying fit eq. in a scatter graph (EV 6)
Thank you, Gareth,
I 'd maybe try it with a table object. However, can I be sure that with a table object I really can get what I want? If not, it would be more efficient for me, just to write it down manually as I only need to do this for 4 equations. I am under enormous time pressure now, so I am looking for something that is the fastet even though not the best way to solve the problem in the long-run.
May I please ask you to assert the feasibility of the points I listed? (Replace text for table where necessary.)
I 'd maybe try it with a table object. However, can I be sure that with a table object I really can get what I want? If not, it would be more efficient for me, just to write it down manually as I only need to do this for 4 equations. I am under enormous time pressure now, so I am looking for something that is the fastet even though not the best way to solve the problem in the long-run.
May I please ask you to assert the feasibility of the points I listed? (Replace text for table where necessary.)
Many thanks for helping.a piece of text myself which I could: [1] include in the chart area, [2] even export if wanted.
2. including the estimated cfs-s into the text
3. controlling the number of digits in the displayed cfs-s
4. formatting part of the text as italics.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Diplaying fit eq. in a scatter graph (EV 6)
You can't put a table into a graph (nor can you put a text object into a graph). The closest you can get is a spool.
You can export a table as an RTF file, or various other formats.
You can manually build up text strings containing the coefficients, then put those text strings into the table.
You can control the number of digits, and you can format as italic.
You can export a table as an RTF file, or various other formats.
You can manually build up text strings containing the coefficients, then put those text strings into the table.
You can control the number of digits, and you can format as italic.
Re: Diplaying fit eq. in a scatter graph (EV 6)
In the meantime, the issue has been solved, but not in EV...
Who is online
Users browsing this forum: No registered users and 2 guests
