Basic programing
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
Basic programing
Hi
I tried to use the Eviews programming but was struggling at the very first step. I have an Eviews work file that I saved as DATA which is stored in the Documents in Disk C that I am working on. So I created a program call TESTING and try to open the work file DATA. I have tried so many ways but could not open it.
What I did is open the TESTING program that I created, then key in the commands and click RUN.
The commands that I tried are:
wfopen data then click RUN ========> I got this message: file is found not on disk in wfopendata
wfopen data.wf1
wfopen c:\users\anhdo\documents\data
wfopen c:\users\anhdo\documents\data.wf1
Could you please help...
Thank you
I tried to use the Eviews programming but was struggling at the very first step. I have an Eviews work file that I saved as DATA which is stored in the Documents in Disk C that I am working on. So I created a program call TESTING and try to open the work file DATA. I have tried so many ways but could not open it.
What I did is open the TESTING program that I created, then key in the commands and click RUN.
The commands that I tried are:
wfopen data then click RUN ========> I got this message: file is found not on disk in wfopendata
wfopen data.wf1
wfopen c:\users\anhdo\documents\data
wfopen c:\users\anhdo\documents\data.wf1
Could you please help...
Thank you
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13305
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Basic programing
Are you certain the file exists in that location?
Follow us on Twitter @IHSEViews
Re: Basic programing
I open the properties of the file and copy the file path from there...
The folder that I saved the file is This PC \ Documents
The folder that I saved the file is This PC \ Documents
Re: Basic programing
Oh so sorry, I actually saved the file in another folder in the documents folder. I just moved the file to Documents and it works when I used the command wfopen data.wf1 !!!!
Amazing!!
How come it does not work when I saved in another folder (it called 6.PhD\thesis), even I have stated the full paths : c\users\anhdo\documents\6.phd\thesis
Amazing!!
How come it does not work when I saved in another folder (it called 6.PhD\thesis), even I have stated the full paths : c\users\anhdo\documents\6.phd\thesis
Re: Basic programing
Hi Gareth,
If I want to create an object that includes 4 return series, should I create a string variable or a matrix??
If I want to create an object that includes 4 return series, should I create a string variable or a matrix??
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13305
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Basic programing
I have 17 countries (17 time series of log returns) and I want to run EGARCH for each pair of countries. If I do it one by one, I will have to do it 17x17 = 289 times (because each country will be an endogenous and exogenous variable), so I would like to create a loop (or something like that) to make it automatically run for 17 countries.
I tried to start with the string variable because I thought that I can assign 17 time series to that string variable. Is that correct?
I tried to start with the string variable because I thought that I can assign 17 time series to that string variable. Is that correct?
Re: Basic programing
Sorry Gareth, but can you please show me how to create a loop to transfer my price series into first difference log series?
say I have a prices series for 3 countries as AU UK and US.
So I tried this command
'%p = "AU UK US"
create 3 ln series
for %p
series ln{%p}=log{%p}
next
It says the "incomplete command in batch mode in CREATE 3 SERIES"
Can you please help
say I have a prices series for 3 countries as AU UK and US.
So I tried this command
'%p = "AU UK US"
create 3 ln series
for %p
series ln{%p}=log{%p}
next
It says the "incomplete command in batch mode in CREATE 3 SERIES"
Can you please help
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13305
- Joined: Tue Sep 16, 2008 5:38 pm
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Basic programing
Or start the line with an apostrophe if it was intended to be a comment
Re: Basic programing
Hi Gareth,
I took out the "create 3 ln series" and ran it again
'%p = "UK US"
for %p
series ln{%p} = log{%p}
next
then i got the message "syntax erro in control statement in "FOR %P"
so I changed it to :
'%p = "UK US"
for %p UK US
series ln{%p} = log{%p}
next
and I got LOGUK is not defined in "SERIES LN{%P}=LOGUK"
then I tried it one more time:
for %p UK US
series ln{%p} = log{%p}
next
and I got the same message LOGUK is not defined in "SERIES LN{%P}=LOGUK".
Can you please let me know where to fix my command.
Thanks a lot for your help.
I took out the "create 3 ln series" and ran it again
'%p = "UK US"
for %p
series ln{%p} = log{%p}
next
then i got the message "syntax erro in control statement in "FOR %P"
so I changed it to :
'%p = "UK US"
for %p UK US
series ln{%p} = log{%p}
next
and I got LOGUK is not defined in "SERIES LN{%P}=LOGUK"
then I tried it one more time:
for %p UK US
series ln{%p} = log{%p}
next
and I got the same message LOGUK is not defined in "SERIES LN{%P}=LOGUK".
Can you please let me know where to fix my command.
Thanks a lot for your help.
Re: Basic programing
startz wrote:Or start the line with an apostrophe if it was intended to be a comment
Thanks Starz- I did, but it still does not work...
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13305
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Basic programing
You need log({%p}).
At this point you're probably best off going through some of the online resources for learning EViews programming.
http://www.eviews.com/Learning/programming_a.html
http://www.eviews.com/help/helpintro.ht ... cs.html%23
viewtopic.php?f=5&t=1638
At this point you're probably best off going through some of the online resources for learning EViews programming.
http://www.eviews.com/Learning/programming_a.html
http://www.eviews.com/help/helpintro.ht ... cs.html%23
viewtopic.php?f=5&t=1638
Follow us on Twitter @IHSEViews
Re: Basic programing
EViews Gareth wrote:You need log({%p}).
At this point you're probably best off going through some of the online resources for learning EViews programming.
http://www.eviews.com/Learning/programming_a.html
http://www.eviews.com/help/helpintro.ht ... cs.html%23
viewtopic.php?f=5&t=1638
Thanks Gareth! It is really useful!
Who is online
Users browsing this forum: No registered users and 32 guests