I have done an ordinary least squared with an excel data set. Now I want to test α against the value of 0 and β against the value of 1 using an error probability of 0.05%.
How to do this in gretl?
I appreciate your answer!!!
I have done an ordinary least squared with an excel data set. Now I want to test α against the value of 0 and β against the value of 1 using an error probability of 0.05%.
How to do this in gretl?
I appreciate your answer!!!
我编辑您的帖子以添加一个 gretl 标志,希望我们在 SO 中也会有更多的 gretl 用户。
现在要回答您的问题,您需要处理模型中的一般线性限制并计算相关的 F 检验。
因此,要使用 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
函数)