Page 1 of 1

No. of parameter

Posted: Thu Aug 13, 2009 12:16 am
by zobee
can any1 tell me how to calculate no. of parameters in regression equation. question may sound bit childish but i have no idea how to calculate no. of parameters specially when one is using lagged terms in an equation, like y0= c+x0+x-1+x-2+y-1+y-2 +et. i need it for calculation of f-test value. thanks in advance.

Re: No. of parameter

Posted: Thu Aug 13, 2009 1:15 am
by trubador
I assume you are asking about the command:

Code: Select all

eq_name.@noef

Re: No. of parameter

Posted: Thu Aug 13, 2009 2:21 am
by zobee
thanks for your quick response. im referring to the Granger causality test where f-test value is obtained through following equation, to get probabilty value

F=((RSS_r-RSS_ur)/m)/(RSS_ur/(n-k))

Where RSS are residual sum of squares of two regressions, m is the number of lagged terms, n is the number of observations and k is the number of parameters in the unrestricted regression, im asking abt this k value.....hope it clairfies the question

Re: No. of parameter

Posted: Thu Aug 13, 2009 4:55 am
by trubador
If you are conducting a Granger causality test, then you should drop the contemporaneous term and include only the lagged terms of variables. As far as I know, the number of observations in the denominator of the formula should be written as (n-m-k). In that case, the k term you are seeking will be equal to 5 (constant plus the number of lags times the number of variables).

Re: No. of parameter

Posted: Thu Aug 13, 2009 6:08 am
by zobee
yeah...thanks. also one thing else related to this subject, the RSS used in this formula, should they be obtained through equation funtion or var funtion of eviews? because when i do it with var, there is this matrix like output....should i pick the RSS from var function, it be from column of dependent variable? thanks again :)

Re: No. of parameter

Posted: Thu Aug 13, 2009 7:10 am
by trubador
From single equation:

Code: Select all

eq_name.@ssr
From var equation:

Code: Select all

var_name.@ssr(1) var_name.@ssr(2) . . var_name.@ssr(k)
By the way, you can conduct Granger causality analysis directly via the following command:

Code: Select all

cause(l) ser1 ser2 .... serN
where l is the number of lags.

Re: No. of parameter

Posted: Thu Aug 13, 2009 7:44 am
by zobee
thanks for your help. as far i know, cause function only perform pairwise granger causality test, whereas i have 3 exogenous variables which are not covered by this function. by-the-way what does view->lag structure->granger causality/block exogeniuty test do? can this function be used for granger causality with exogenous variables? thanks

Re: No. of parameter

Posted: Thu Aug 13, 2009 7:50 am
by trubador
Yes, you can use that function if you need multivariate comparisons. However, if you want to include exogenous variables, then you should conduct the analysis manually via running your own regressions (i.e. OLS).

Re: No. of parameter

Posted: Thu Aug 13, 2009 8:20 am
by zobee
i think i'll have to do it manually, though with your help now i can do it easily. thanks for your patience and just last question, as you mention earlier for var_name.@ ssr funtion, which of these ssr(1), ssr(2).....ssr(k) values will be used in the f-test equation. i mean say for first regression, which of these values will be used in f-test for value of RSS_r? thanks again