Extending Sample Size

For questions regarding programming in the EViews programming language.

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

george m
Posts: 5
Joined: Wed Dec 15, 2010 1:12 am

Extending Sample Size

Postby george m » Wed Dec 15, 2010 5:02 pm

How does one extend sample size (i.e. past the last observation originally defined) using a command?
thanks,

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

Extending Sample Size

Postby EViews Gareth » Wed Dec 15, 2010 5:07 pm

Look up the pagestruct command.

george m
Posts: 5
Joined: Wed Dec 15, 2010 1:12 am

Re: Extending Sample Size

Postby george m » Wed Dec 15, 2010 5:42 pm

great, thanks!!

yxr
Posts: 9
Joined: Tue Aug 16, 2011 11:58 am

Re: Extending Sample Size

Postby yxr » Sun Aug 28, 2011 4:16 pm

Greetings!
In my programming, I want to increase the size of arrays in my work file to 10000 from the original 2715 observations. But Eviews 7 does not support "expand" meanwhile the examples of pagestruct in the user's manual does not explain explicitly enough to me.
I just want to know how to use pagestruct to do so explictly.
Thanks a lot

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Extending Sample Size

Postby startz » Sun Aug 28, 2011 4:21 pm

Code: Select all

pagestruct(start=1,end=10000)

yxr
Posts: 9
Joined: Tue Aug 16, 2011 11:58 am

Re: Extending Sample Size

Postby yxr » Sun Aug 28, 2011 4:45 pm

the code I find is as follows:

Code: Select all

load "c:\users\yang\documents\shanghai composite index.wf1" rndseed 12345 !nreps=10000 series rt series u series h series min series max series l1 series s1 scalar mcrrl scalar mcrrs rt=log(sh/sh(-1)) equation eq1.arch(m=100,) rt c eq1.makegarch h pagestruct(start=1,end=10000) series hsq=h^0.5 series resi=rt-@coefs(1) series sres=resi/hsq eq1.forecast rtf yse hf 'bootstrap loop for !z=1 to !nreps smpl 3 2715 group g1 sres g1.resample smpl 2716 2725 rt=@coefs(1)+@sqrt(hf(-2715))*sres_b(-10) sh=sh(-1)*exp(rt) min(!z)=@min(sh) max(!z)=@max(sh) next smpl 1 10000 l1=log(min/1138.73) mcrrl=1-(exp(-1.645*@stdev(l1))+@mean(l1))) s1=log(max/1138.73) mcrrs=(exp((1.645*@stdev(s1))+@mean(s1)))-1
It warns that "Incomplete WFSTRUCT" specification in "PAGESTRUCT (start=1, end=10000)"
I am total lost in it.
Thanks a lot for your advice.

yxr
Posts: 9
Joined: Tue Aug 16, 2011 11:58 am

Re: Extending Sample Size

Postby yxr » Sun Aug 28, 2011 4:50 pm

I did not leave space in the syntax mentioned above: pagestruct (start=1, end=10000)
but after I leave space between pagestruct and the bracket, it warns that start=1 is not defined in "pagestruct (start=1, end=10000)
I feel hopeless now

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Extending Sample Size

Postby startz » Sun Aug 28, 2011 5:31 pm

What version of EViews are you using? And is it uptodate?

yxr
Posts: 9
Joined: Tue Aug 16, 2011 11:58 am

Re: Extending Sample Size

Postby yxr » Sun Aug 28, 2011 5:38 pm

the version is 7.2

yxr
Posts: 9
Joined: Tue Aug 16, 2011 11:58 am

Re: Extending Sample Size

Postby yxr » Sun Aug 28, 2011 5:46 pm

I attached the data and programming code here. Thank you very much, Eviews expert.
Attachments
bootstrap.prg
bootstrap program
(760 Bytes) Downloaded 726 times
shanghai composite index.wf1
data
(74.23 KiB) Downloaded 660 times

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Extending Sample Size

Postby startz » Sun Aug 28, 2011 5:48 pm

I suspect the problem is that your pagestruct isn't compatible with your workfile structure. But I'm not sure.
Try this. Take out the load statement and the pagestruct. Load the workfile in manually and use Proc/Structure Resize to extend it manually. Then run the rest of the program.

yxr
Posts: 9
Joined: Tue Aug 16, 2011 11:58 am

Re: Extending Sample Size

Postby yxr » Sun Aug 28, 2011 6:03 pm

Yes, it works.
But after 5 minutes, it says that:
syntax error:

Code: Select all

mcrrl=1-(exp(-1.645*@stdev(l1))+@mean(l1)))
where is the mistake?
Thanks a lot.

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: Extending Sample Size

Postby startz » Sun Aug 28, 2011 6:05 pm

Your parentheses are unbalanced.

yxr
Posts: 9
Joined: Tue Aug 16, 2011 11:58 am

Re: Extending Sample Size

Postby yxr » Sun Aug 28, 2011 6:15 pm

How foolish I am!
Thank you very very much,Startz. You are so wonderful!Pay Homage to you!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests