program for 2 workfile pages

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

JamyOliver
Posts: 9
Joined: Thu Jan 31, 2013 6:00 am

program for 2 workfile pages

Postby JamyOliver » Thu Jan 31, 2013 6:25 am

Hey guys!

I need eviews for an event study analysis in my master thesis. First of all sorry for my englisch but I'm not a native as you'll see :lol:
My basic problem is that I have 2 pages in 1 workfile.

page1: has a range of 101 observations and has one table full of information for my programm (e.g. when the events occured)
page2: has a range of 881 observations and has all data of stocks+indices.

My problem is that I want to write a programm that gets its information out of my table of page 1, calculates log returns, expected returns in page 2 (according to the provided data of page 2). Additionally, I need all important information in page 1 to make a panel analysis. Important information are abnormal returns and some dummys that are related with it.

Is there any command that I can use to "switch" between the two pages in my program?! I found no solution for such a problem in the eviews guides.
Hopefully you understand my problem. Otherwise I have to explain it differently.

Thx for your help!

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: program for 2 workfile pages

Postby EViews Gareth » Thu Jan 31, 2013 7:29 am

pageselect

JamyOliver
Posts: 9
Joined: Thu Jan 31, 2013 6:00 am

Re: program for 2 workfile pages

Postby JamyOliver » Fri Feb 01, 2013 3:17 am

EDIT: I'm using Eviews6


Yeah great! That is what I've searched!!! Thx for your help!

But I have still another, rather small problem. Is there any possibility that control variable is stored and can be used in the other page of the programm? I just need this because my two pages have a different range as I have described above. I tried it this way but it doesn't work:

for !t = 1 to 448

!q = testtable (!t, 1)

pageselect page2

smpl !q-10 !q+10

'etc.

next

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: program for 2 workfile pages

Postby EViews Gareth » Fri Feb 01, 2013 6:46 am

That will work.

JamyOliver
Posts: 9
Joined: Thu Jan 31, 2013 6:00 am

Re: program for 2 workfile pages

Postby JamyOliver » Sat Feb 02, 2013 7:52 am

Thx for your support!

Now my whole program works!!! But I still have one problem to solve.

I want to copy some series from page2 to page 1 in my workfile (this makes my analysis easier). My first try was this command:

copy(smpl = 50 150) stocks_index\r_ab_1 result\

Basically, I can find my copy in page 1 but I still need to "cut" the sample. I wanted that the new copied series starts in Cell 1 with the first number of observation 50 of the other series that got copied. Generally, the numbers should be copied and presented beginning in cell 1 and ending in cell 101. Is this possible?

JamyOliver
Posts: 9
Joined: Thu Jan 31, 2013 6:00 am

Re: program for 2 workfile pages

Postby JamyOliver » Wed Feb 06, 2013 2:23 am

Hmm ok last day I tried about 3-4hours to solve my problems with the User guides for Eviews 6.

I found some arguments (p.700 User Guide I) that solve a lot of problems but unfortunately not mine :x

Is there any argument or other possibility that solves my problem? Again: I want to copy only some parts of my series from one workfile to another. E.g. I have to copy sample 200 until 300 from Series 1 into a "new Series 1". But the new Series 1 should have only 101 observations (therefore, only the ones that I want to copy) from 1 to 101.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: program for 2 workfile pages

Postby EViews Gareth » Wed Feb 06, 2013 9:40 am

Easiest way to do is it to make a series on each page that has the corresponding observation numbers, and use that to match-merge copy:

Code: Select all

wfcreate(page=page1) u 300 series mydate = @trend+1 series x = nrnd pagecreate(page=page2) u 101 series mydate = @trend+200 copy page1\x page2\x @src mydate @dest mydate

Alex_sad
Posts: 15
Joined: Thu Dec 05, 2013 10:55 pm

Re: program for 2 workfile pages

Postby Alex_sad » Thu Dec 05, 2013 11:01 pm

Hi
i have the same problem.
i have two sheet in one workfile that each one has a different sample and i want to write a program to compare r squared of these two samples.
How can i mention sheet name in programming?
Thank you

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: program for 2 workfile pages

Postby EViews Gareth » Thu Dec 05, 2013 11:25 pm

Could you explain what you mean?

Alex_sad
Posts: 15
Joined: Thu Dec 05, 2013 10:55 pm

Re: program for 2 workfile pages

Postby Alex_sad » Sat Dec 07, 2013 8:11 am

i want to compare r squared of one model that run into two different sample therefore i have to compare two r squared for determining the difference is significant or not. so i used cramer z statistics.
Now i have a little problem:
Both of my samples are panel data with random effects therefore i can't sum them in one page
i have them in two different page. when i want write a program i can't switch between pages. How can i do this?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: program for 2 workfile pages

Postby EViews Gareth » Sat Dec 07, 2013 2:00 pm

Pageselect


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest