retrieving the p-value of the chi-square (GMM regression)
Posted: Thu Jul 29, 2010 3:39 am
Hi there,
I am doing a research project which involves running GMM regressions. I also want to retrieve the p-value of the Chi-square/J-statistic of these regression outputs.
My equation is as follows:
dividend=c(1)+c(2)*size+c(3)*profit+c(4)*growth+c(5)*value
the instrumental variables are: c size(-1) size(-2) profit(-1) profit(-2) growth(-1) growth(-2) value(-1) value(-2)
so I run the regression, get the regression output and then I enter the following two commands:
scalar jval=s1.@regobs*s1.@jstat
scalar pval=1-@cchisq(jval,NUMBER)
I wonder what NUMBER I have to insert in the second command. A research colleague told me that NUMBER is defined as:
No. of equations*No. of coefficients-No. of instruments
In my case:
1*5-9=-4
the problem is that eviews requires NUMBER to be positive.
But if I reduce the number of the instruments, I usually get the message that the regression cannot be run as it is a near singular matrix. If it runs, the R-square is usually -4 or -3.
Have I just got the wrong definition of NUMBER?
Thanks very much
M
I am doing a research project which involves running GMM regressions. I also want to retrieve the p-value of the Chi-square/J-statistic of these regression outputs.
My equation is as follows:
dividend=c(1)+c(2)*size+c(3)*profit+c(4)*growth+c(5)*value
the instrumental variables are: c size(-1) size(-2) profit(-1) profit(-2) growth(-1) growth(-2) value(-1) value(-2)
so I run the regression, get the regression output and then I enter the following two commands:
scalar jval=s1.@regobs*s1.@jstat
scalar pval=1-@cchisq(jval,NUMBER)
I wonder what NUMBER I have to insert in the second command. A research colleague told me that NUMBER is defined as:
No. of equations*No. of coefficients-No. of instruments
In my case:
1*5-9=-4
the problem is that eviews requires NUMBER to be positive.
But if I reduce the number of the instruments, I usually get the message that the regression cannot be run as it is a near singular matrix. If it runs, the R-square is usually -4 or -3.
Have I just got the wrong definition of NUMBER?
Thanks very much
M