経済学書専門出版 エコノミスト社
Top書籍情報計量経済・統計ソフトウェアRATSHypothesis Testing
ファイナンス大系
リアルオプション
Excelとその応用
統計学大系
経済学大系
e-ビジネス
計量経済学
ゲーム理論
経済数学
環境問題・環境経済学
人口学講座
ナレッジマネジメント
ビジネス書
NLP理論
複雑系経済学
経営学・商学大系
マーケティング
心理学・行動科学大系
金融工学・数理ファイナンス
マクロ経済学
法情報学
企業法学講座
経営工学大系
計量経済・統計ソフトウェア
オペレーションズ・リサーチ
会計学・簿記・税務
楽しい数学
時系列分析ソフトウェア
RATS

3-6. RATS Basics: Hypothesis Testing


RATS includes several built-in hypothesis testing instructions. Its flexibility also allows you to implement many others. We'll look at a couple of simple examples, and show you how to program a more complex test.

Our Example Program
Here is our example program so far:


CALENDAR 1922
ALLOCATE 1941:1
OPEN DATA C:\RATS\FOODDATA.RAT
DATA(FORMAT=RATS) / FOODCONS PRRETAIL DISPINC FOODPROD PRFARM
TABLE
PRINT
SET TREND = T
SET AVGPRICES = (PRFARM+PRFARM{1})/2.0
LINREG FOODCONS
# CONSTANT PRRETAIL DISPINC TREND
LINREG FOODCONS
# CONSTANT PRRETAIL DISPINC{0 1}

Let's look at the second regression model, and test the hypothesis that both of the DISPINC variables (zero lag and one lag) can jointly be excluded from the regression (i.e. that both coefficients are zero). The easiest way to do that is to use the EXCLUDE instruction. After executing the second LINREG instruction above, we can do the following:

EXCLUDE
# DISPINC{0 1}

Which produces the following output:

Null Hypothesis : The Following Coefficients Are Zero
DISPINC Lag(s) 0 to 1
F(2,15)= 27.52708 with Significance Level 0.00000955

The null hypothesis is strongly rejected in this case.

Other Examples
RATS offers several other instructions, including TEST which tests specific coefficient values, and RESTRICT and MRESTRICT, which test general linear hypothesis.

The example below regresses Y on X1, X2, and X3, and tests the hypothesis that the coefficients on X1 and X2 sum to 1.0 (i.e. that 1.0*β1 + 1.0*β2 = 1.0, where β1 and β2 are the coefficients of X1 and X2, respectively):

LINREG Y
# X1 X2 X3
RESTRICT 1
# 1 2
# 1.0 1.0 1.0

The following code implements a somewhat more involved test for the presence of Autoregressive Conditional Heteroscedasticity. First, we do an OLS regression, and save the residuals in a series called RESIDS. Next, we regress the squared residuals on its lag. We then compute our test statistic, which is T times R-squared from the squared-residuals regression. Finally, we use the CDF instruction to compute the marginal significance level for the test statistic. CDF allows you to choose from F, t, chi-squared, or normal distributions. Here, we use the chi-squared distribution, with one degree of freedom.

LINREG Y / RESIDS
# CONSTANT X1 X2 X3 X4
SET RESSQR = RESIDS**2
LINREG(NOPRINT) RESSQR
# CONSTANT RESSQR{1}
COMPUTE TEST_STAT = %NOBS*%RSQUARED
CDF CHISQR TEST_STAT 1

Here's the output from the CDF instruction:

Chi-Squared(1)= 2.501825 with Significance Level 0.11371447

In this case, the significance level is slightly larger than 0.10, so we cannot reject the ARCH hypothesis at the 10% level.


←3-5. Ordinary Least Squares Regressions
→3-7. RATS Basics: Forecasting


←RATSのTopページに戻る