为什么 gamlss 会给出错误的前高斯分布参数估计?

Why does gamlss give incorrect estimates of ex-gaussian distribution parameters?

来自 gamlss.dist exGAUSS 页面:

The ex-Gaussian distribution is often used by psychologists to model response time (RT). It is defined by adding two random variables, one from a normal distribution and the other from an exponential. The parameters mu and sigma are the mean and standard deviation from the normal distribution variable while the parameter nu is the mean of the exponential variable.

下面是我们应该如何估计参数:

library(gamlss)
y <- rexGAUS(100, mu = 300, nu = 100, sigma = 35)
m1 <- gamlss(y ~ 1, family = exGAUS)
m1

不幸的是,估计有很大偏差:

Family:  c("exGAUS", "ex-Gaussian") 
Fitting method: RS() 

Call:  gamlss(formula = y ~ 1, family = exGAUS) 

Mu Coefficients:
(Intercept)  
      302.9  
Sigma Coefficients:
(Intercept)  
      3.496  
Nu Coefficients:
(Intercept)  
       4.63  

一个已经从 CRAN 中消失的包,retimes,仍然可以从

https://cran.r-project.org/src/contrib/Archive/retimes/retimes_0.1-2.tar.gz
安装它有一个功能 mexgauss:

library(retimes)
mexgauss(y)

给出:

       mu     sigma       tau 
319.42880  55.51562  85.94403 

哪个更近

sigmanu 的估计值在模型输出中似乎有很大偏差。这是因为 exGaus() 默认情况下对这两个参数使用日志 link。从文档中,显示默认值:

exGAUS(mu.link = "identity", sigma.link = "log", nu.link = "log")

输出显示模型尺度上的结果,因此这两个参数的估计值在对数尺度上给出。

如果我们对 sigmanu 的结果取幂,那么我们得到的估计值看起来更合理,更接近我们的预期。

# estimated sigma should be close to 35
exp(3.496)
#> [1] 32.98325

# estimated nu shoud be close to 100
exp(4.63)
#> [1] 102.5141

reprex package (v2.0.0)

于 2021-10-11 创建