Page 1 of 1

storing alpha/intercept/constant

Posted: Mon Sep 14, 2009 10:37 am
by lous
Hi
I need to store the intercept/constant for many (!) (CAPM-like) OLS regressions in a table/text.
How should I program such thing...? I have no experience with programming so please answer in ‘dummy-language :D ’
Thanks a lot!

Re: storing alpha/intercept/constant

Posted: Mon Sep 14, 2009 10:43 am
by EViews Gareth
You can retrieve any coefficient from an equation by using the @coef data member. Assuming you have the constant as the first coefficient in your regression, you would use equation_name.@coef(1) where equation_name is the name of your regression. You can then store that into a table. Something like:

Code: Select all

table mytable mytable(1,1) = myequation.@coef(1)
which would put the intercept from myequation into the first row, first column of a table called mytable

Re: storing alpha/intercept/constant

Posted: Tue Sep 15, 2009 3:10 am
by lous
Thanks so much!
With your help I also found out to make it a loop and store every alpha (500) below eachother :) Many thanks for your quick response...