how to save a regression coefficient

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

superjocker
Posts: 27
Joined: Mon Mar 30, 2020 5:45 pm

how to save a regression coefficient

Postby superjocker » Thu Jun 18, 2020 12:33 pm

Hi there, I have a question. When running a regression, a simpler one, y c x, how do you save just one of the coefficients in a table? not the alpha coefficient but the beta one. I want to save this coefficient in an independent table with just one number, the beta coefficient.

Thanks

ae_rojasm
Posts: 3
Joined: Wed Jun 17, 2020 11:37 pm

Re: how to save a regression coefficient

Postby ae_rojasm » Thu Jun 18, 2020 1:16 pm

Hello:

I think I know how to do this in Eviews 10. Assuming your equation is Y = C + betaX

Code: Select all

equation model1.ls y c x               'this creates the equation
TableName(1,1) = model1.@coef(2)         'this saves the beta estimate in your table


I hope this helps

superjocker
Posts: 27
Joined: Mon Mar 30, 2020 5:45 pm

Re: how to save a regression coefficient

Postby superjocker » Thu Jun 18, 2020 2:08 pm

Hi, thank you for your response, when running the first part of the code (equation model1.ls y c x) no problem, but when running the second part of the code (mytable(1,1)=model1.@coef(2)), says mytable is not defined or is an illegal command in "mytable(1,1)=model1.@coef(2)". I tried changing the name but same results.

superjocker
Posts: 27
Joined: Mon Mar 30, 2020 5:45 pm

Re: how to save a regression coefficient

Postby superjocker » Thu Jun 18, 2020 2:44 pm

I fixed it, I needed to add this code: table(1,1) table name, before the tablename(1,1)=modela.@coef(2).

Thank you very much


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 29 guests