@INGRP Function
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
@INGRP Function
I would welcome an example how the pool group/series is created for this function and how it can be used. Thanks.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: @INGRP Function
Code: Select all
create u 100
series x_uk=nrnd
series x_jpn=nrnd
series x_kor=nrnd
series x_usa=nrnd
series y_uk=nrnd
series y_jpn=nrnd
series y_kor=nrnd
series y_usa=nrnd
pool p _uk _jpn _kor _usa
p.add @group asia _jpn _kor
p.ls y? c x? @ingrp(asia)
Re: @INGRP Function
Many thanks Gareth, perfect!
Re: @INGRP Function
Hi Gareth,
The function works fine, however. I ran an OLS regression from within the pool for a single series, compared this with a direct LS estimation and obtaimed identical coefficients. However, the R-squared values were totally different. Looking at the statistics for the dependent variable, in the pool it records 11 observations, which is the sample range, and in the LS 4 observations, which is the correct number of observations. Also, the Mean dependent var in the regression output, the values are different.
Furthermore, I ran a regression with two different groups, two @ingrp() statements, and did a Wald test on two coefficients that were completely different -large negative and large positive, and could not reject the null. I'd be grateful for your clarification, thanks.
The function works fine, however. I ran an OLS regression from within the pool for a single series, compared this with a direct LS estimation and obtaimed identical coefficients. However, the R-squared values were totally different. Looking at the statistics for the dependent variable, in the pool it records 11 observations, which is the sample range, and in the LS 4 observations, which is the correct number of observations. Also, the Mean dependent var in the regression output, the values are different.
Furthermore, I ran a regression with two different groups, two @ingrp() statements, and did a Wald test on two coefficients that were completely different -large negative and large positive, and could not reject the null. I'd be grateful for your clarification, thanks.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: @INGRP Function
Could you provide a program example, or your workfile?
Re: @INGRP Function
Attached is the Eviews file with the two series and the output. R-squared vals are different for the pool estimation and the LS estimation. Also note the difference in the number of included obs in each pool/LS regression and the mean value of the dependent variable. The Wald test now gives a different result - on the original data file I have many more series, but that should not interfere with the result.
- Attachments
-
- TEST_TO_GARETH.WF1
- (27.52 KiB) Downloaded 213 times
Re: @INGRP Function
I have added an extra series to the workfile and have re-run the pool regression with both original variables - see POOL_EQN_G1_G2_3SERIES. Note how the R-squared has changed as has the value of the mean dep variable. The Wald_test2 conclusion also changes i.e. no difference in the coefficients, whereas Wald_test1 showed that there was a difference. Perhaps after all the results are sensitive to the number of series? File attached.
- Attachments
-
- test_to_gareth_2.WF1
- (34.25 KiB) Downloaded 227 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: @INGRP Function
I'm not entirely sure I understand your complaint. In the pool you are running a regression on, essentially, two sets of data. The R-squared is the overall R-squared for those two sets of data. Even though the coefficients are, and should be, identical between the Pool estimates and the individual estimates, there is no reason that R-squared, Nobs, or mean(dep) should be the same.
Re: @INGRP Function
So why does the R-squared change in the multiple regression when there are three series in the workfile - one of which is not used in the regression, as does the Wald test result?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: @INGRP Function
But, you've included the extra series in the the pool object, so it is being used in the regression!
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: @INGRP Function
I'm not sure I understand the question.
Re: @INGRP Function
Not sure I follow now. The regression coefficients for G1 and G2,each of which consist of a single series, stay the same with and without the new series in the pool. What impact does the additional series have, other than on the regression diagnostics? There is no impact on the G1 or G2 coefficients, so where does the effect of the third series in the pool come through - where is it being used in the regression? Do the @group list of cross section identifiers not determine which series are being used in the pool regression? I would only like to use a sub-set of the identifiers in each group. Apologies if I'm mis-understanding how this works.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: @INGRP Function
By adding the variable into the pool, you've added more rows of data. By not having that variable in the groups, you've forced the coefficients for that variable to be zero. That doesn't mean that the variable isn't included in the overall regression though, just that you're forcing the coefficients to be zero.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: @INGRP Function
Perhaps the following program that does it without a pool can shed some light.
Code: Select all
create u 90
series y1=0
series y2=0
series y3=0
series x1=0
series x2=0
series x3=0
'make some data for the first group
smpl 1 30
y1=nrnd
x1=nrnd
'make some data for the 2nd group
smpl 31 60
y2=nrnd
x2=nrnd
'make some data for the third group
smpl 61 90
y3=nrnd
x3=nrnd
'make a pooled series for group 1 and 2
smpl @all
series y=y1+y2
series x=x1+x2
'estimate an equation for the first group
smpl 1 30
equation eq1.ls y1 x1
'estimate an equation for the second group
smpl 31 60
equation eq2.ls y2 x2
'estimate an equation for the two groups
smpl 1 60
equation eq.ls y x1 x2
'estimate an equation for all three groups
smpl @all
equation eqall.ls y x1 x2
Re: @INGRP Function
Ok, think I follow that. So, is the message is that in order to get a 'pure' estimate of @group coefficients and the underlying regression diagnostics e.g R-squared values/Wald tests, ALL of the identifiers must be allocated across the @group definitions? Otherwise, series which are omitted from the @group definitions will have a 'behind the scenes' impact on the underlying regression statistics, but not on the estimated regression coefficients?
Also, it seems that one cannot define subsets of series in @group and obtain pure (being independent of other pool identifiers not included in the @group defintion) R-squared values/Wald statistics. Thanks.
Also, it seems that one cannot define subsets of series in @group and obtain pure (being independent of other pool identifiers not included in the @group defintion) R-squared values/Wald statistics. Thanks.
Who is online
Users browsing this forum: No registered users and 2 guests
