【发布时间】:2025-04-21 16:50:02
【问题描述】:
我对 R 比较陌生,并试图模拟 Gumbel copula,其中一个边距是 gumbel pdf,另一个是指数型。
通过此代码
G3 <- gumbelCopula(1.37, dim=2)
gMvd2 <- mvdc(G3, c("Gumbel","exp"), param = list(list(shape=10.2988298881251, scale=1.02463492397923), list(rate=4)))
set.seed(11)
# n <- if(Xtras) 10000 else 200 # sample size (realistic vs short for example)
x <- rMvdc(100, gMvd2)
head(x)
输出是:
Error in eval(expr, envir, enclos): could not find function "qGumbel"
Traceback:
1. rMvdc(100, gMvd2)
2. eval(qdf.expr, list(x = u[, i]))
3. eval(expr, envir, enclos)
他们也提到了备注
mvdCheckM(margins, "p") 中的警告信息:
"margins correct? Currently, have no function(s) named: pGumbel"Warning message in mvdCheckM(margins, "d"):
"margins correct? Currently, have no function(s) named: dGumbel"
我认为问题在于边际分布的参数值,因为当我输入时
G3 <- gumbelCopula(1.37, dim=2)
gMvd2 <- mvdc(G3, c("exp","exp"), param = list(list(rate=2), list(rate=4)))
set.seed(11)
# n <- if(Xtras) 10000 else 200 # sample size (realistic vs short for example)
x <- rMvdc(100, gMvd2)
head(x)
没问题!!
【问题讨论】:
-
试过也没有用,所以,我想我得自己编写函数了。
标签: r statistics simulation