我用excel数据集做了一个普通的最小二乘。现在,我想使用0.05%的错误概率测试α和β。
如何在gretl中做到这一点?
非常感谢您的回答!
发布于 2013-04-14 18:58:12
我编辑了你的帖子,添加了gretl标志,希望我们也能有更多的gretl用户加入。
现在,为了回答您的问题,您需要处理模型中的一般线性限制并计算相关的F-test。
因此,要使用gretl执行此操作,可以使用gretl脚本语言hansl执行以下操作:
open murder_rates
ols executions const income lfp southern --quiet
restrict
b[income]=0
b[lfp]=1
end restrict我们得到了以下结果
## Restriction set
## 1: b[income] = 0
## 2: b[lfp] = 1
## Test statistic: F(2, 41) = 29633.7, with p-value = 1.6337e-65
## Restricted estimates:
## coefficient std. error t-ratio p-value
## ---------------------------------------------------------
## const -53.0056 0.370949 -142.9 3.29e-59 ***
## income 0.00000 0.00000 NA NA
## lfp 1.00000 0.00000 NA NA
## Standard error of the regression = 2.4606如果您想使用R轻松完成此操作,请查看car包(linearHypothesis函数)
https://stackoverflow.com/questions/15997478
复制相似问题