hi there!
I used the info here 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
getting the standard error and p values.
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Posts: 3
- Joined: Mon Jul 30, 2012 5:07 pm
-
- Posts: 3
- Joined: Mon Jul 30, 2012 5:07 pm
Re: getting the standard error and p values.
one more comment!
Is it possible to get adjusted r squared instead of simple r squared???
Thank you in advance for your time!!
Is it possible to get adjusted r squared instead of simple r squared???
Thank you in advance for your time!!
-
- Non-normality and collinearity are NOT problems!
- Posts: 3775
- Joined: Wed Sep 17, 2008 2:25 pm
Re: getting the standard error and p values.
Look in help under equation, data members. You'll find a list of everything available.
-
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: getting the standard error and p values.
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.
-
- Posts: 3
- Joined: Mon Jul 30, 2012 5:07 pm
Re: getting the standard error and p values.
Thank you for the help!This is exactly what I needed! Will know know to look in object reference!
Cheers!
Cheers!
-
- Posts: 3
- Joined: Wed Nov 21, 2018 5:52 am
Re: getting the standard error and p values.
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,
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,
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13306
- Joined: Tue Sep 16, 2008 5:38 pm
Re: getting the standard error and p values.
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: Google [Bot] and 25 guests