XY Line where first series is an alpha
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
XY Line where first series is an alpha
Suppose you make a group where the first object is an alpha and the rest are numerical series. Then you make an XY line graph. What should happen?
What I was hoping for was that the graph would use the first series as labels. (It would certainly be nice if it did.) What seems to happen is that you get a blank graph. I'm not sure if that's a bug, the intended behavior, no behavior is defined, or user error. Look at group02 in the attached.
What I was hoping for was that the graph would use the first series as labels. (It would certainly be nice if it did.) What seems to happen is that you get a blank graph. I'm not sure if that's a bug, the intended behavior, no behavior is defined, or user error. Look at group02 in the attached.
- Attachments
-
- ed at a glance salary paths.WF1
- (28.58 KiB) Downloaded 244 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: XY Line where first series is an alpha
Intended behavior. The alpha is a series full of NAs, which makes a boring graph
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: XY Line where first series is an alpha
So is there another way to achieve the intended behavior? Excel is willing to
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: XY Line where first series is an alpha
Define the expected behaviour.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: XY Line where first series is an alpha
Use the observation number for the x-axis, but label the x-axis using the first series rather than the observation number.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: XY Line where first series is an alpha
With your group open, run this:
I created some data with the following and ran it:
Code: Select all
d(noerr) temp
d(noerr) tempgr
%spec = _this.@members
%drop = @word(%spec,1)
group temp {%spec}
temp.drop {%drop}
freeze(tempgr) temp.line
tempgr.setobslabel(series) {%drop}
_this.display tempgr
d temp tempgr
I created some data with the following and ran it:
Code: Select all
create u 4
alpha label
smpl 1 1
label = "Starting"
series us = 100
series oecd=100
series canada = 100
series finland = 100
series korea=100
smpl 2 2
label = "10 years"
series us = 123
series oecd=140
series canada = 150
series finland = 122
series korea=150
smpl 3 3
label = "15 years"
series us = 136
series oecd=140
series canada = 155
series finland = 128
series korea=160
smpl 4 4
label = "maximum"
series us = 150
series oecd=140
series canada = 155
series finland = 140
series korea=275
smpl @all
group g label us oecd canada finland korea
show g
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: XY Line where first series is an alpha
Wow, really nice.
Is there a gui way to setobslabel to do this manually?
Is there a gui way to setobslabel to do this manually?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: XY Line where first series is an alpha
Yep
- Attachments
-
- 2014-09-15_101837.png (30.73 KiB) Viewed 6882 times
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: XY Line where first series is an alpha
Oh. So is the trick to make a line graph ignoring the label series, and then stick in the labels???
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: XY Line where first series is an alpha
Not in may case, but I can see where that could be an issue.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: XY Line where first series is an alpha
[edit]I previously asked whether there were any repeats in the alpha series which Startz responded to, just as I saw the posted workfile. I then deleted my earlier post so that I could post the following (sorry about the confusion).
In this case, I think there's a better approach. You have one label per observation with no repeats so I think that what you really want to do is to use the alpha series to label observations. In such a setting, I believe that
would seem to give you want you want.
In this case, I think there's a better approach. You have one label per observation with no repeats so I think that what you really want to do is to use the alpha series to label observations. In such a setting, I believe that
Code: Select all
pagestruct tenure
group group03 us oecd canada finland korea
group03.line
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: XY Line where first series is an alpha
Thanks Glenn. Gareth's setobslabel "trick" avoids having to restructure the page. Any advantages or disadvantages one way or the other?
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: XY Line where first series is an alpha
If the alpha are truly obs identifiers, then it's probably better to restructure since everywhere you have obs labels, we'll use them (as in the spreadsheet view, etc.).
Who is online
Users browsing this forum: No registered users and 2 guests
