I run the following command
for %y Y1 Y10 Y11 Y12 Y13 Y14 Y15 Y16 Y17 Y18 Y19 Y2 Y20 Y21 Y22 Y23 Y24 Y25 Y26 Y27 Y28 Y29 Y3 Y30 Y31 Y32 Y33 Y34 Y35 Y36 Y37 Y38 Y39 Y4 Y40 Y41 Y42 Y43 Y44 Y45 Y46 Y47 Y48 Y5 Y6 Y7 Y8 Y9
equation {%y}trend.ls(w=sd) {%y} c x
next
but instead of all the output from each equation, i require coefficients, their p-values, r-square and adjusted r-square, and standard error of regression. is there any command that can solve this problem???
how do I extract my required results from equations FORLOOP?
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how do I extract my required results from equations FORL
Read through the examples here
Re: how do I extract my required results from equations FORL
hi,
I run the following program but unable to get p-values of each coefficient in a matrix, how can I get them in a separate matrix as I do r-square t-values etc????
'create a group which will contain the xs
group xs
for %i y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 y27 y28 y29 y30 y31 y32 y33 y34 y35 y36 y37 y38 y39 y40 y41 y42 y43 y44 y45 y46 y47 y48
xs.add {%i}
next
'create vector to store r-squares
vector(48) rbar2s
'create vector to store r-squares
vector(48) r2s
'create vector to store standard error of regression
vector(48) se
'create matrix to store coefficients. We'll be running 48 regressions (so 48 columns) with two coefficients in each, so two rows
matrix(3,48) coefs
matrix(3,48) tstats
'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 xs.@count-0
%iname = xs.@seriesname(!i)
eq.ls(w=seu) {%iname} c betad upbeta
rbar2s(!rowcounter) = eq.@rbar2
!rowcounter = !rowcounter
r2s(!rowcounter) = eq.@r2
!rowcounter = !rowcounter
se(!rowcounter) = eq.@se
!rowcounter = !rowcounter+1
'store coefficients into matrix
colplace(coefs, eq.@coefs,!i)
'store coefficients into matrix
colplace(tstats, eq.@tstats,!i)
next
I run the following program but unable to get p-values of each coefficient in a matrix, how can I get them in a separate matrix as I do r-square t-values etc????
'create a group which will contain the xs
group xs
for %i y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14 y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 y27 y28 y29 y30 y31 y32 y33 y34 y35 y36 y37 y38 y39 y40 y41 y42 y43 y44 y45 y46 y47 y48
xs.add {%i}
next
'create vector to store r-squares
vector(48) rbar2s
'create vector to store r-squares
vector(48) r2s
'create vector to store standard error of regression
vector(48) se
'create matrix to store coefficients. We'll be running 48 regressions (so 48 columns) with two coefficients in each, so two rows
matrix(3,48) coefs
matrix(3,48) tstats
'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 xs.@count-0
%iname = xs.@seriesname(!i)
eq.ls(w=seu) {%iname} c betad upbeta
rbar2s(!rowcounter) = eq.@rbar2
!rowcounter = !rowcounter
r2s(!rowcounter) = eq.@r2
!rowcounter = !rowcounter
se(!rowcounter) = eq.@se
!rowcounter = !rowcounter+1
'store coefficients into matrix
colplace(coefs, eq.@coefs,!i)
'store coefficients into matrix
colplace(tstats, eq.@tstats,!i)
next
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how do I extract my required results from equations FORL
it does not work. i am working on eviews5
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how do I extract my required results from equations FORL
Then you'll have to calculate them from the t-statistics.
Re: how do I extract my required results from equations FORL
its not easy to calculate pvalues for 5040 coefficients. please suggest shortcut
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Who is online
Users browsing this forum: No registered users and 1 guest
