Hi,
I would like to modify an existing group which contains 5 time-series, of which the first time series is the dependant variable.
I want to create a new group which only includes those rows of the old group, for which the dependant variable is less than zero.
Then save the adjusted data set as a new group (so I don't want to use sample).
Creating new group with negative dependant variable
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Creating new group with negative dependant variable
Groups contain series, and series all have to have the same number of observations. Thus you can't create a group that contains a subset of of rows of another group. Groups all have the same number of rows.
Follow us on Twitter @IHSEViews
Re: Creating new group with negative dependant variable
Thank you Gareth,
What I meant was: suppose a group has 5 series, 1st one being a dependant variable, and 30 rows.
Suppose, I only want the rows with a dependant variable that is negative. Dependant variables with negative values can be found in rows 16-30.
Then the new group contains a 15x5 matrix of the data that can be found in rows 16-30, and columns 1-5.
How do I do this?
Thanks
What I meant was: suppose a group has 5 series, 1st one being a dependant variable, and 30 rows.
Suppose, I only want the rows with a dependant variable that is negative. Dependant variables with negative values can be found in rows 16-30.
Then the new group contains a 15x5 matrix of the data that can be found in rows 16-30, and columns 1-5.
How do I do this?
Thanks
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Creating new group with negative dependant variable
Code: Select all
smpl 16 30
Re: Creating new group with negative dependant variable
Thank you Startz
However, I would like to create a new group, which is a subset of an existing group.
I would need a function so that the new group contains data from the old group, but only with those rows where the dependant variable is negative.
Amy help would be greatly appreciated.
However, I would like to create a new group, which is a subset of an existing group.
I would need a function so that the new group contains data from the old group, but only with those rows where the dependant variable is negative.
Amy help would be greatly appreciated.
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Creating new group with negative dependant variable
In EViews, groups are just collections of series and all series in a workfile page are the same length. You can exclude observations from processing by using the smpl command or by setting elements equal to NA.
If you want, I suppose you could do
If you want, I suppose you could do
Code: Select all
smpl 16 30
yy = y
xx1 = x1
xx2 = x2
xx3 = x3
xx4 = x4
smpl @all
group gg yy xx1 xx2 xx3 xx4
Who is online
Users browsing this forum: No registered users and 18 guests