creating weekly and semi annual dummies with @expand
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
creating weekly and semi annual dummies with @expand
i know @expand(@month) creates 12 dummies for a year
how do i create weekly dummies (ie 52 dummies) for a year and semiannual dummies (2 dummies) for a year with @expand command.
how do i create weekly dummies (ie 52 dummies) for a year and semiannual dummies (2 dummies) for a year with @expand command.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: creating weekly and semi annual dummies with @expand
What structure/frequency is your workfile?
Re: creating weekly and semi annual dummies with @expand
1900s01
1900s02
1901s01
1901s02
1902s01
1902s02
basically my sample is 1900s1 1905s2
and also 1900w01
1900w02
my sample for this series is 1900w01 1901w52
and i want to create dummies using @expand for both cases
1900s02
1901s01
1901s02
1902s01
1902s02
basically my sample is 1900s1 1905s2
and also 1900w01
1900w02
my sample for this series is 1900w01 1901w52
and i want to create dummies using @expand for both cases
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: creating weekly and semi annual dummies with @expand
@expand(@datepart(@date, "ww"))
@expand(@datepart(@date, "s"))
@expand(@datepart(@date, "s"))
Re: creating weekly and semi annual dummies with @expand
thanks very much.
i also tried using "for next" looping with "seas" command to see if i can create dummies also for the weekly series and i was getting this error message "flow of control statement executed from command line"
can i get some corrections in the code i wrote
1900w1
1900w2 to
1900w52
this is code i wrote expecting it to create 52 dummies
for !k = 1 to 52
genr weekdummy(!k)= seas(!k)
next
i also tried using "for next" looping with "seas" command to see if i can create dummies also for the weekly series and i was getting this error message "flow of control statement executed from command line"
can i get some corrections in the code i wrote
1900w1
1900w2 to
1900w52
this is code i wrote expecting it to create 52 dummies
for !k = 1 to 52
genr weekdummy(!k)= seas(!k)
next
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: creating weekly and semi annual dummies with @expand
For loops can only be used in a program.
Re: creating weekly and semi annual dummies with @expand
i want to fill out of sample data in my forecast series and standard error series with "na" when i use the forecast command
my data is from 1905m1
1905m2
to 1910m12
i want to forecast yhat and yhatse series values for 1906m1 1908m12 using the forecast command so that observations before and after these dates are filled with "na"
i tried
linermodel.forecast(f="na") yhat yhatse
it only worked on yhatse and filled out of sample series with "na"
but it didnt work on yhat series.
how do i fill both out of sample series for both yhat and yhatse with "na" using the forecast command.
my data is from 1905m1
1905m2
to 1910m12
i want to forecast yhat and yhatse series values for 1906m1 1908m12 using the forecast command so that observations before and after these dates are filled with "na"
i tried
linermodel.forecast(f="na") yhat yhatse
it only worked on yhatse and filled out of sample series with "na"
but it didnt work on yhat series.
how do i fill both out of sample series for both yhat and yhatse with "na" using the forecast command.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: creating weekly and semi annual dummies with @expand
The option is f=na, not f="na"
Re: creating weekly and semi annual dummies with @expand
my GDP data is from 1901m1 to 1910m12
is there a way to generate GDP data from the range say from 1905m1 to 1907m12 without coping it physically from the GDP series
i tried
smpl 1905m1 1907m12
stom(GDP,newGDP)
But it creates it has a vector.
is that a way to create it as a series so i used it to draw my graph and use it in my equation
is there a way to generate GDP data from the range say from 1905m1 to 1907m12 without coping it physically from the GDP series
i tried
smpl 1905m1 1907m12
stom(GDP,newGDP)
But it creates it has a vector.
is that a way to create it as a series so i used it to draw my graph and use it in my equation
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: creating weekly and semi annual dummies with @expand
I'm afraid I do not understand what you are asking.
Re: creating weekly and semi annual dummies with @expand
i have this
obs GDP
1900M1 12
1900M2 15
1900M3 5
. .
. .
1990m12 29
i want to generate a new column called newGDP with GDP figures from say 1920m1 to 1925m12 with a command to get something like this
obs GDP
1920M1 7
1920M2 10
.
.
1925M12 8
I tried this and it gives me newGDP as a vector.
smpl 1920m1 1925m12
stom(GDP,newGDP)
I need newGDP as a series not as a vector without "na" appearing in the out of sample data.
is there a better way to do this
obs GDP
1900M1 12
1900M2 15
1900M3 5
. .
. .
1990m12 29
i want to generate a new column called newGDP with GDP figures from say 1920m1 to 1925m12 with a command to get something like this
obs GDP
1920M1 7
1920M2 10
.
.
1925M12 8
I tried this and it gives me newGDP as a vector.
smpl 1920m1 1925m12
stom(GDP,newGDP)
I need newGDP as a series not as a vector without "na" appearing in the out of sample data.
is there a better way to do this
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: creating weekly and semi annual dummies with @expand
Still not particularly clear, I'm afraid.
I think you want to create a new series called NewGDP. What I don't know is where the data for that series is going to come from.
I think you want to create a new series called NewGDP. What I don't know is where the data for that series is going to come from.
Re: creating weekly and semi annual dummies with @expand
let see if i can explain it better
my range is 1952q1 1996q4 180 obs
sample is 1953q1 1954q4 8 obs
each quarter has GDP Value in a series called GDP
My question is how can i pull out the GDP VAlues from my sample 1953q1 1954q4 with an eview command from my range to analyse and name the new series as newGDP without physically copying and pasting it in an empty group myself .
my range is 1952q1 1996q4 180 obs
sample is 1953q1 1954q4 8 obs
each quarter has GDP Value in a series called GDP
My question is how can i pull out the GDP VAlues from my sample 1953q1 1954q4 with an eview command from my range to analyse and name the new series as newGDP without physically copying and pasting it in an empty group myself .
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: creating weekly and semi annual dummies with @expand
Code: Select all
series newgdp = gdp
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: creating weekly and semi annual dummies with @expand
Or to expand on Gareth's suggestion?Code: Select all
series newgdp = gdp
Code: Select all
smpl 1953q1 1954q4
series newgdp = gdp
Who is online
Users browsing this forum: No registered users and 1 guest
