a simple programme
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
a simple programme
I have 100 series
y1 y2 y3 .... y100
and i need to produce a new series y = average of (y1 + y2 + y3 +... + y100),
Could you please help write a syntax, many thanks.
y1 y2 y3 .... y100
and i need to produce a new series y = average of (y1 + y2 + y3 +... + y100),
Could you please help write a syntax, many thanks.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: a simple programme
You'll have to be more specific.
Re: a simple programme
Thanks for your reply:
I have 100 series y1, y2, y3, y4, ..., y99, y100
and now i need to create a new series y, which is the average of the 100 series,
y = (y1 +y2 +y3+... + y100)/100
i am wondering if there is a simple syntax for this, thanks.
I have 100 series y1, y2, y3, y4, ..., y99, y100
and now i need to create a new series y, which is the average of the 100 series,
y = (y1 +y2 +y3+... + y100)/100
i am wondering if there is a simple syntax for this, thanks.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: a simple programme
Y1 is a single number?
Re: a simple programme
y1, y2, y3, ... y100, each of them is a series with 50 obs.
i want to get a new series y with 50 obs, each ob. is the average of the (y1, y2, y3, ... y100)
of course we can write y = (y1 +y2 + y3 +... +y100)/100,
but this is too complicated, is there any way like y1:y100 in excel?
hope this is clear, thanks.
i want to get a new series y with 50 obs, each ob. is the average of the (y1, y2, y3, ... y100)
of course we can write y = (y1 +y2 + y3 +... +y100)/100,
but this is too complicated, is there any way like y1:y100 in excel?
hope this is clear, thanks.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: a simple programme
ok, I think you're saying you want the observation by observation average.
Put the series into a group, then use the @rmean function.
Put the series into a group, then use the @rmean function.
Re: a simple programme
thanks, group is good
group y y1, y2, y3, ..., y100
i just feel it is too complicated to write from y 1 to y100, is there an easy way to do this? like y1:y100?
group y y1, y2, y3, ..., y100
i just feel it is too complicated to write from y 1 to y100, is there an easy way to do this? like y1:y100?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: a simple programme
group y y*
Re: a simple programme
group y y*
this group y1 to y100,
can i ask another question, if i have y1 to y100 series, but i just want to group y1 to y99, is there any parameter setting?
sorry for the silly question:(
this group y1 to y100,
can i ask another question, if i have y1 to y100 series, but i just want to group y1 to y99, is there any parameter setting?
sorry for the silly question:(
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: a simple programme
Easiest thing is to do:
Code: Select all
group y y*
y.drop y100
Re: a simple programme
group y y*
y.drop y100
many thanks for your patience, this works very well,
but i still want to know if we can make a parameter setting,
for example, i have the y1 to y100 series, but i just wanna group (y1 to y50), what should i do? many thanks.
y.drop y100
many thanks for your patience, this works very well,
but i still want to know if we can make a parameter setting,
for example, i have the y1 to y100 series, but i just wanna group (y1 to y50), what should i do? many thanks.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: a simple programme
Code: Select all
group y
for !i=1 to 50
y.add y{!i}
next
Re: a simple programme
many thanks, it looks fine, i will try.
thanks for your patience. have a good weekend.
thanks for your patience. have a good weekend.
Who is online
Users browsing this forum: No registered users and 2 guests
