Page 1 of 1
how to save a regression coefficient
Posted: Thu Jun 18, 2020 12:33 pm
by superjocker
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
Re: how to save a regression coefficient
Posted: Thu Jun 18, 2020 1:16 pm
by ae_rojasm
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
Re: how to save a regression coefficient
Posted: Thu Jun 18, 2020 2:08 pm
by superjocker
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.
Re: how to save a regression coefficient
Posted: Thu Jun 18, 2020 2:44 pm
by superjocker
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