Page 1 of 2

@INGRP Function

Posted: Wed Jun 13, 2012 3:00 pm
by farmer02
I would welcome an example how the pool group/series is created for this function and how it can be used. Thanks.

Re: @INGRP Function

Posted: Wed Jun 13, 2012 3:17 pm
by EViews Gareth

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

Posted: Wed Jun 13, 2012 3:39 pm
by farmer02
Many thanks Gareth, perfect!

Re: @INGRP Function

Posted: Thu Jun 14, 2012 4:10 am
by farmer02
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.

Re: @INGRP Function

Posted: Thu Jun 14, 2012 7:44 am
by EViews Gareth
Could you provide a program example, or your workfile?

Re: @INGRP Function

Posted: Thu Jun 14, 2012 9:07 am
by farmer02
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.

Re: @INGRP Function

Posted: Thu Jun 14, 2012 9:32 am
by farmer02
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.

Re: @INGRP Function

Posted: Thu Jun 14, 2012 9:59 am
by EViews Gareth
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

Posted: Thu Jun 14, 2012 10:31 am
by farmer02
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?

Re: @INGRP Function

Posted: Thu Jun 14, 2012 10:41 am
by EViews Gareth
But, you've included the extra series in the the pool object, so it is being used in the regression!

Re: @INGRP Function

Posted: Thu Jun 14, 2012 10:43 am
by EViews Glenn
I'm not sure I understand the question.

Re: @INGRP Function

Posted: Thu Jun 14, 2012 11:08 am
by farmer02
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.

Re: @INGRP Function

Posted: Thu Jun 14, 2012 11:20 am
by EViews Gareth
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.

Re: @INGRP Function

Posted: Thu Jun 14, 2012 11:33 am
by EViews Gareth
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

Posted: Thu Jun 14, 2012 11:57 am
by farmer02
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.