Page 1 of 1

getting the standard error and p values.

Posted: Thu Aug 02, 2012 8:41 am
by a_papageorgiou
hi there!
I used the info here http://forums.eviews.com/viewtopic.php?f=5&t=1638 to make a small program.
The program runs a multiple regression and outputs the Rsquared in a vector and gets the coefficients in a matrix.
the first thing I would like to know is whether or not I can also get additional items such as the standard error, or even better the test statistics and the p values
that is my current output is:
Intercept
coefficient 1
coefficient 2
coefficient 3
coefficient 4
and in a separate file I get the R^2 in vector

What I would like to get is:
Intercept
coefficient 1
coefficient 2
coefficient 3
coefficient 4
R^2
Test statistic
Std Error
P value

my current code is:

'create vector to store r-squares
vector(61) r2
'create matrix to store coefficients. We'll be running 15 regressions (so 15 columns) with two coefficients in each, so two rows
matrix(5,61) coefs
'create empty equation to be used inside the loop
equation eq

''counter of how many equations we have run
!rowcounter=1

'run pairwise regressions between each series
for !i=1 to 61
'equation eq{!i}.ls x{!i} c mkt_rf smb hml mom

eq.ls x{!i} c mkt_rf hml smb mom
r2(!rowcounter) = eq.@r2
!rowcounter = !rowcounter+1
'store coefficients into matrix
colplace(coefs, eq.@coefs, !i)
next

Re: getting the standard error and p values.

Posted: Thu Aug 02, 2012 8:43 am
by a_papageorgiou
one more comment!
Is it possible to get adjusted r squared instead of simple r squared???

Thank you in advance for your time!!

Re: getting the standard error and p values.

Posted: Thu Aug 02, 2012 8:45 am
by startz
Look in help under equation, data members. You'll find a list of everything available.

Re: getting the standard error and p values.

Posted: Thu Aug 02, 2012 8:57 am
by EViews Esther

Code: Select all

'.... eq.ls x{!i} c mkt_rf hml smb mom r2(!rowcounter) = eq.@r2 'r-squares rbar2(!rowcounter) = eq.@rbar2 'adjusted r-squares !rowcounter = !rowcounter+1 colplace(coefs, eq.@coefs, !i) colplace(stderrs, eq.@stderrs, !i) 'std errs colpace(tstats, e1.@tstats, !i) 'test-stat
Please see Page 34-35 of EViews 7 Object Ref.

Re: getting the standard error and p values.

Posted: Thu Aug 02, 2012 9:26 am
by a_papageorgiou
Thank you for the help!This is exactly what I needed! Will know know to look in object reference!
Cheers!

Re: getting the standard error and p values.

Posted: Mon Jul 01, 2019 5:18 am
by abhay16dec
Hi,
I want to know that how to save the standard errors of a forecast variables.
e.g. I'm running this equation
equation eq_temp5950V5.ls log(1+degCelsious_wrd) = c(1)+c(2)*log(CO2_riv19)
eq_temp5950V5.forecast degCelsious_wrdf5950 'saving the forecast variable

similar to forecast variable I want to save its corresponding standard errors (to save and plot for future analysis)
What is the command for saving standard errors?

Reagards,

Re: getting the standard error and p values.

Posted: Mon Jul 01, 2019 8:08 am
by EViews Gareth
Add a second name to the forecast proc.

http://www.eviews.com/help/helpintro.ht ... 23ww176268