repeat alpha series
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
repeat alpha series
hi
i have two workfile:
workfile 1 with: page one by frequency month 12 years, second page unstructured 30 obs
i have use alpha month=" January February....December" to make reapeat with monthly, but no! all value month(1)= January February....December.
same with my unstructured page 10 alpha, alpha name="california Florida New York Wisconsin Delaware Kansas Illinois North Dakota South Dakota Texas"
i would like reapt alpha series like this:
January
February
March
....
January
.....
for undated seris:
california
...
Texas
california
...
second workfile 2 panel(monthly): i have crossid from 1 to 7 "inf, gdp, irate, exchange, M1, usd, euro"
how can change 1 by "inf", 2 by "gdp" ...., i can create a new Alpha series to create idenification with the names this manually take long time and fill them too.
could help me to solve this
i have two workfile:
workfile 1 with: page one by frequency month 12 years, second page unstructured 30 obs
i have use alpha month=" January February....December" to make reapeat with monthly, but no! all value month(1)= January February....December.
same with my unstructured page 10 alpha, alpha name="california Florida New York Wisconsin Delaware Kansas Illinois North Dakota South Dakota Texas"
i would like reapt alpha series like this:
January
February
March
....
January
.....
for undated seris:
california
...
Texas
california
...
second workfile 2 panel(monthly): i have crossid from 1 to 7 "inf, gdp, irate, exchange, M1, usd, euro"
how can change 1 by "inf", 2 by "gdp" ...., i can create a new Alpha series to create idenification with the names this manually take long time and fill them too.
could help me to solve this
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: repeat alpha series
something like
Code: Select all
smpl 13 @last
y = y(-12)
smpl @all
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: repeat alpha series
Problem 1:
(Note the first page could be done using date functions much more simply, but since you want to do the second page too, I'll show you the general solution)
Problem 2:
You'll have to describe it more clearly.
(Note the first page could be done using date functions much more simply, but since you want to do the second page too, I'll show you the general solution)
Code: Select all
%list = "January February March April May June July August September October November December"
!num = @wcount(%list)
for !i = 1 to !num
smpl if @mod(@trend,!num)=!i-1
alpha mymonths = @word(%list,!i)
next
Problem 2:
You'll have to describe it more clearly.
Follow us on Twitter @IHSEViews
Re: repeat alpha series
I forgot to thank you Mr Gareth and Mr starz sorry.
1/ how can do this by function in monthly could you show me please. ( i have puting "_" for the unstructured page).
2/ i have 7 crossid. i would like to change 1 by inf
1 - 80m01 would be inf -80m01
1- 80m02 would be inf -80m02
.....
2 - 80m01 would be 1 -80m01
2- 80m02 would be 1 -80m02
1/ how can do this by function in monthly could you show me please. ( i have puting "_" for the unstructured page).
2/ i have 7 crossid. i would like to change 1 by inf
1 - 80m01 would be inf -80m01
1- 80m02 would be inf -80m02
.....
2 - 80m01 would be 1 -80m01
2- 80m02 would be 1 -80m02
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: repeat alpha series
1) Use the @datestr function
2) Same idea:
2) Same idea:
Code: Select all
%list = "inf gdp foo goo hoo boo doo"
for !i=1 to 7
smpl if @crossid=!i
alpha myalpha = @word(%list,!i)
next
Follow us on Twitter @IHSEViews
Re: repeat alpha series
i get error message Error in Sample: DATESTR is not defined in "SMPL IF DATESTR=1-1".
%list = "January February March April May June July August September October November December"
!num = @wcount(%list)
for !i = 1 to !num
smpl if datestr=!i-1
alpha mymonths = @word(%list,!i)
next
%list = "January February March April May June July August September October November December"
!num = @wcount(%list)
for !i = 1 to !num
smpl if datestr=!i-1
alpha mymonths = @word(%list,!i)
next
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: repeat alpha series
@ sign
Re: repeat alpha series
error messge Error in Sample: Incorrect number of arguments for @DATESTR function in "SMPL IF @DATESTR=1-1".
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: repeat alpha series
You need to give arguments to the @datestr function. Take a look in the Help system.
Re: repeat alpha series
@datestr(x,"m") Than what I put in the place x
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: repeat alpha series
Error in Sample: Numeric operator applied to string data in"SMPL IF @DATESTR(@DATE,"M")=1-1".
%list = "January February March April May June July August September October November December"
!num = @wcount(%list)
for !i = 1 to !num
smpl if @datestr(@date,"m")=!i-1
alpha mymonths = @word(%list,!i)
next
%list = "January February March April May June July August September October November December"
!num = @wcount(%list)
for !i = 1 to !num
smpl if @datestr(@date,"m")=!i-1
alpha mymonths = @word(%list,!i)
next
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: repeat alpha series
I thought it was by loop, sorry for the inconvenience.
thanks you Mr Gareth and Mr startz.
thanks you Mr Gareth and Mr startz.
Who is online
Users browsing this forum: No registered users and 17 guests