Hi I am using eviews 6.
I have to calculate Ck = summation from t = 1 to k (rt^2)
I am trying a for loop
for !i = 1 to 4352
c!i = c(!i-1)+resid2(!i)
next
It gives me c!i is undefined or illegal command. I am only trying to like define the variable as c0, c1, c2, and so on up to c4352. How do I proceed with it so that it takes c!i as a string?
Thanks
string declaration
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: string declaration
I'm confused. What is c!i?
Re: string declaration
well it's like the variable name, c1, c2, c3 and so on upto ck... Oh i think i should store it in a matrix. Is that correct?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: string declaration
You're going to have to be more clear as to what you're trying to achieve.
Re: string declaration
Well I am trying to implement the ICSS(Iterated Cumulative Sum of Squares) algorithm where I use the residuals from a garch model to find the cumulative sum of squared residuals... if rt si the residual, then i need
c1 = r1
c2 = r1+r2 = c1+r2
c3 = r1+r2+r3 = c2 + r3
and so on
so i am trying to implement a for loop after declaring a scalar c0=0 such that
for !i=1 to 1000
c!i = c(!i-1) + r!i
next
I hope i am clearer now coz I really dont know how to explain it :?
Thanks
c1 = r1
c2 = r1+r2 = c1+r2
c3 = r1+r2+r3 = c2 + r3
and so on
so i am trying to implement a for loop after declaring a scalar c0=0 such that
for !i=1 to 1000
c!i = c(!i-1) + r!i
next
I hope i am clearer now coz I really dont know how to explain it :?
Thanks
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: string declaration
Perhaps you could talk about things in a more EViews like fashion. What is C1, C2 etc..? What type of object are they? Same goes for R1...
Re: string declaration
Lol I am just so bad at explaining but I think I have got what I was looking for.
Thanks loads for replying :)
Thanks loads for replying :)
Who is online
Users browsing this forum: No registered users and 2 guests
