简体   繁体   English

如何使用 mhurdle 包在 R 中复制标准 Tobit 结果

[英]How to replicate standard Tobit results in R using mhurdle package

I'm exploring multiple-hurdle models using the mhurdle package in R. To start, I trying to simply replicate the results of a standard Tobit model run using the tobit() function from the AER package or the censReg() function from the censReg package (both produce the same results).我使用的是探索多障碍模型mhurdle包R.首先,我想简单地使用复制标准Tobit模型运行结果tobit()从功能AER包或censReg()从功能censReg包(两者都产生相同的结果)。 Using sample data from mhurdle , these latter two packages yield the same coefficient estimates for a Tobit regression, but I cannot replicate them using mhurdle() .使用来自mhurdle样本数据,后两个包为 Tobit 回归产生相同的系数估计值,但我无法使用mhurdle()复制它们。 Here is a basic example.这是一个基本的例子。 I suspect I'm overlooking something rather simple, but I can't figure it out.我怀疑我忽略了一些相当简单的事情,但我无法弄清楚。 Any idea where the misspecification lies between the two models?知道两个模型之间的错误规格在哪里吗?

library(censReg)
library(mhurdle)

### Load sample data from the mhurdle package
data(Interview) 

## mhurdle() results for standard Tobit specification
summary(mhurdle(vacations ~ 0 | linc, data=Interview, dist="n", h2=T))

## censReg() results for Tobit (same as tobit() from "AER")
summary(censReg(vacations ~ linc, data=Interview))

The mhurdle package produces the following output: mhurdle包产生以下输出:

Call:
mhurdle(formula = vacations ~ 0 | linc, data = Interview, dist = "n", 
    h2 = TRUE, method = "bfgs")

Frequency of 0:  0.848 

Coefficients :
               Estimate Std. Error  t-value              Pr(>|t|)    
h2.(Intercept) -8.97938    0.54647 -16.4315 < 0.00000000000000022 ***
h2.linc         4.98411    0.61031   8.1666  0.000000000000000222 ***
sd.sd           8.68863    0.18009  48.2463 < 0.00000000000000022 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Log-Likelihood: -765.67 on 3 Df

R^2 :
 Coefficient of determination : 0.040817 
 Likelihood ratio index       : NA  

The censReg and the AER packages produce the following output: censRegAER包产生以下输出:

Call:
censReg(formula = vacations ~ linc, data = Interview, method = "bfgs")

Observations:
         Total  Left-censored     Uncensored Right-censored 
          1000            848            152              0 

Coefficients:
            Estimate Std. error t value              Pr(> t)    
(Intercept) -6.33252    0.53559 -11.823 < 0.0000000000000002 ***
linc         3.51493    0.46583   7.545   0.0000000000000451 ***
logSigma     1.81278    0.06231  29.091 < 0.0000000000000002 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

BFGS maximization, 44 iterations
Return code 0: successful convergence 
Log-likelihood: -712.5855 on 3 Df

The mhurdle function has an argument "scaled". mhurdle 函数有一个参数“缩放”。 If its meaning is TRUE (default), the dependent variable is divided by its geometric mean.如果其含义为 TRUE(默认),则因变量除以其几何平均值。 So, in this case estimated coefficients are scaled by the geometric mean of dependent variable.因此,在这种情况下,估计系数按因变量的几何平均值进行缩放。 To obtain the standard result (tobit, censreg) just change "scaled" to FALSE.要获得标准结果(tobit、censreg),只需将“缩放”更改为 FALSE。

summary(mhurdle(vacations ~ 0 | linc, data=Interview, dist="n", h2=T, scaled = FALSE))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM