我有一个矩阵
结果[i]
带有一些数据(分布参数):
list(structure(c(0.005, 0.004),
.Names = c("mean", "sd")))
例如。我想使用 fdist 并使用 results[i] 中包含的值作为分布参数的种子:
params = fitdist( data, dist,method="mle",
start=list(mean =mapply("[", results[1], 1),
sd=mapply("[", results[1], 2)))
我收到以下错误:
the function mle failed to estimate the parameters,
with the error code 100
因为开始列表是:
structure(list(mean = structure(0.005, .Names = "mean"),
sd = structure(0.004, .Names = "sd")), .Names = c("mean","sd"))
它应该是:
structure(list(mean = 0.005, sd = 0.004), .Names = c("mean","sd"))
最后的输出来自:
params = fitdist( data, dist,method="mle",
start=list(mean=0.005,
sd=0.004))
任何想法?
谢谢!