Page 1 of 1
to report the p-value in a table
Posted: Tue Oct 26, 2010 1:11 pm
by nesheus
I need to report the p-value of a regression in a table in addition to the following statistics. I cannot find or know how to produce the p-value for each variable in the regression, could you help please?
I am using Eviews 6.
Thanks
best
equation eq2_2.ls dlcopp c ar(1) ar(2) ma(1) ma(2)
scalar aic2_2 = eq2_2.@aic
scalar schwarz2_2 = eq2_2.@schwarz
scalar coef2_2_2 = eq2_2.@COEFS(2)
scalar coef2_2_3 = eq2_2.@COEFS(3)
scalar coef2_2_4 = eq2_2.@COEFS(4)
scalar coef2_2_5 = eq2_2.@COEFS(5)
Re: to report the p-value in a table
Posted: Tue Oct 26, 2010 1:29 pm
by startz
EViews shows the p-value for each coefficient in the rightmost column of the regression output.
Re: to report the p-value in a table
Posted: Tue Oct 26, 2010 1:33 pm
by nesheus
I know. I want to put it in a customized table along with other statistics. So I need to program it.
Re: to report the p-value in a table
Posted: Tue Oct 26, 2010 1:45 pm
by EViews Gareth
Re: to report the p-value in a table
Posted: Tue Oct 26, 2010 2:09 pm
by nesheus
How can I calculate the p-values directly from t-statistics.
I am running an ARIMA model,
equation eq2.ls dlcopp c ar(1) ar(2) ma(1) ma(2)
I have tried the following for the second term ar(1) but it didn't work
scalar pval2= @tdist(eq2.@tstat(2),@obs(ar(1)) or scalar pval2= @tdist(eq2.@tstat(2),@obs)
how can I get the number of observations for each AR or MA series? please help.
thanks
Re: to report the p-value in a table
Posted: Tue Oct 26, 2010 2:14 pm
by EViews Gareth
you probably want to use eq.@regobs (although you might want to adjust by eq.@ncoef
Re: to report the p-value in a table
Posted: Tue Oct 26, 2010 2:21 pm
by nesheus
Should I write it like scalar pval2= @tdist(eq2.@tstat(2),@regobs(2) for the regression eq2.ls dlcopp c ar(1) ar(2) ma(1) ma(2)
Could you be more specific about the use of @regobs or @ncoef?
thanks a lot for your help.
Re: to report the p-value in a table
Posted: Tue Oct 26, 2010 2:48 pm
by EViews Gareth
Code: Select all
scalar pval2 = @tdist(eq2.@tstat(2), eq2.@regobs - eq2.@ncoefs)
Re: to report the p-value in a table
Posted: Wed Oct 27, 2010 6:30 am
by nesheus
thanks a lot, this was very helpful.
Just a quick question. can I write @regobs or @ncoefs after the regression without attaching it to the eq2? would I get the same result?
scalar pval2 = @tdist(eq2.@tstat(2), @regobs - @ncoefs)
Re: to report the p-value in a table
Posted: Wed Oct 27, 2010 8:16 am
by EViews Gareth
Without putting the eq2 in there, @regobs will return the number of observations used in the last regression run. Without knowing the rest of your code, I don't know if the last regression run was eq2 or not.
I think it is always best to be very specific as to which equation you are referring.