Hi
I need to make a recursive ols estimation saving SDeviation, coefficients and expected mean.
First, i need to run a ols model from t=0,...,T. Then i must run ols estimations like this
ols from sample 0,...,T-0
ols from sample 0,...,T-1
ols from sample 0,...,T-2
...
ols from sample 0,...,T+1-length(data)
T=length(data)
for !i =1 to length(data) or rowcount (I'm not sure)
eq1.ls gnp c gnp(-1) rate
then i need to store R2, coefficients, SD, mean, and pvalues for each ols estimation generated. I'm a bit lost.
I've read http://forums.eviews.com/viewtopic.php?f=5&t=1638 but i need do the resampling process...that's where i'm stuck.
Thanks for your time and interest.
Recursive OLS estimation?
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: Recursive OLS estimation?
What have you done so far?
Re: Recursive OLS estimation?
for example, i know how to declare the model i want or i know reading the tricks and guide posted on the forum. But there is nothing related to a
For sample i! 1 to rowcounter
i want to be able to declare the loop. The loop for resampling the data and estimate by ols.
For sample i! 1 to rowcounter
i want to be able to declare the loop. The loop for resampling the data and estimate by ols.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive OLS estimation?
Have you read through this:
http://forums.eviews.com/viewtopic.php?f=15&t=878
http://forums.eviews.com/viewtopic.php?f=15&t=878
Re: Recursive OLS estimation?
that code is above my knowledge...
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Recursive OLS estimation?
Well, you aren't going to be able to program what you want to do without understanding that program. You should read through that program line by line, and work out what each line does by referring to the Command and Programming Reference, and the posts on these forums. If you have specific questions, we'll be happy to help.
Re: Recursive OLS estimation?
thanks a lot for your help. The link you gave was very useful
these what i made and it worked, but i have some doubts about positions
I have n=130 obs, and i get 129 estimations of beta(coeficients), mean and sdeviation. Is it OK? And how do i graph by code? How do i graph the SDeviation, i mean, the positive and negative values? because i obtained only positive numbers and when i manually plot them, i only show the sd above zero. I know, it's a dumb question. Thanks again by your help.
these what i made and it worked, but i have some doubts about positions
Code: Select all
!length=@obsrange
vector(!length) roll_betas
vector(!length) roll_mediadep
vector(!length) roll_desvsd
for !i=0 to !length-2
smpl @first @first+!i+1
equation eq1
eq1.ls nd c ne
roll_betas(!i+1) = eq1.@coef(2)
roll_mediadep(!i+1)=eq1.@meandep
roll_desvsd(!i+1)=eq1.@sddep
nextRe: Recursive OLS estimation?
Hi
i need now to estimate the mean and sd for the fitted values in every loop. How do i store them?
i had declared in eq1 the model and i read the manual, but i couldn't find the function. Thanks
i need now to estimate the mean and sd for the fitted values in every loop. How do i store them?
i had declared in eq1 the model and i read the manual, but i couldn't find the function. Thanks
Who is online
Users browsing this forum: No registered users and 2 guests
