作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试从 this answer 中复制代码,但是我在这样做时遇到了问题。我正在使用包 VGAM
中的gumbel 发行版和 fitdistrplus
.
做的时候出现问题:
fit = fitdist(data1, 'gumbel', start = list(location = 0, scale = 1))
Error in mledist(data, distname, start, fix.arg, ...) :
'start' must specify names which are arguments to 'distr'.
location
和
scale
不是*gumbel 的论据。
dgumbel
,
pgumbel
,
rgumbel
和
qgumbel
由
VGAM
正确提供.
gumbel
的函数。 , 具有不同的语法。这可能会导致问题吗?
FAdist
而是工作得很好。
最佳答案
供引用,来自 package vignette在评论中链接:
library(fitdistrplus)
data(groundbeef)
serving <- groundbeef$serving
dgumbel <- function(x, a, b) 1/b*exp((a-x)/b)*exp(-exp((a-x)/b))
pgumbel <- function(q, a, b) exp(-exp((a-q)/b))
qgumbel <- function(p, a, b) a-b*log(-log(p))
fitgumbel <- fitdist(serving, "gumbel",
start=list(a=10, b=10))
VGAM
的函数:
rm(dgumbel) ## get rid of previous definition
## hack behaviour of VGAM::pgumbel() a little bit
pgumbel <- function(x,...) {
if (length(x)==0) numeric(0) else VGAM::pgumbel(x,...)
}
library(VGAM)
fitgumbel <- fitdist(serving, "gumbel",
start=list(location=10, scale=10))
关于r - 使用 fitdistrplus 拟合 Gumbel 分布,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36087240/
问题:我希望您能帮助我在 Matlab 中从具有尺度 mu 和位置 beta 的 Gumbel 分布中抽取随机数。 我想使用 Wikipedia 提供的 Gumbel 分布的定义(请参阅页面右侧的 P
我正在尝试从 this answer 中复制代码,但是我在这样做时遇到了问题。我正在使用包 VGAM 中的gumbel 发行版和 fitdistrplus . 做的时候出现问题: fit = fi
我已经计算了桥梁的荷载,我想使用最大似然估计将 Gumbel 分布拟合到其中最高的 20%。我需要帮助计算分布参数。我已经通读了 scipy.optimize 文档,但我无法理解如何在其中应用函数来估
我是一名优秀的程序员,十分优秀!