storing alpha/intercept/constant

For questions regarding programming in the EViews programming language.

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

lous
Posts: 2
Joined: Mon Sep 14, 2009 10:25 am

storing alpha/intercept/constant

Postby lous » Mon Sep 14, 2009 10:37 am

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!

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

Re: storing alpha/intercept/constant

Postby EViews Gareth » Mon Sep 14, 2009 10:43 am

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

lous
Posts: 2
Joined: Mon Sep 14, 2009 10:25 am

Re: storing alpha/intercept/constant

Postby lous » Tue Sep 15, 2009 3:10 am

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...


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 0 guests