Hi All,
I'm using Eviews 7 and am a novice.
I have a series of stock market returns covering 5500 daily observations.
1. I want to create a new series that only includes those observations that are less than the mean of the full sample. I've tried some IF statements but I get a series that has large blocks of NAs (and I can't - or don't know how to - remove them)
2. Depending upon how to do this I also want to transform the new series by subtracting the mean of full sample series and squaring that result before dividing by the number of observations of the new series (i.e. those that are less than the mean of the full sample).
My algebra is fine but when I try to attempt this in Eviews I either cannot use the mean of the full sample (Eview uses the mean of the new series) or the number of observations is not correct.
Any ideas on how to create this second series according to my criteria in one or two easy steps?
Regards,
D
Creating a new series from existing
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Creating a new series from existing
Last edited by oconneld on Mon Oct 07, 2013 11:18 pm, edited 1 time in total.
Re: Creating a new series from existing
I should also add that doing this manipulation will reduce the number of observations in the generated series by about half which is what I expect. I do not want the original series altered or contracted in any way.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Creating a new series from existing
You might want to post the actual commands you used.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Creating a new series from existing
Code: Select all
smpl if y < @mean(y, "@all")
series z = (y - @mean(y, "@all"))^2 / @obs(y)
smpl @allWho is online
Users browsing this forum: No registered users and 2 guests
