我使用R来创建包fitdistrplus
的发行版,我遇到了一个问题
继承错误(f," fitdist"):object' fitw'未找到。
附件是我用于建模的代码。有谁知道我的代码有什么问题?
library(fitdistrplus)
timegaplist = c(133408000, 150828000, 175692000, 96000, 143000, 169000, 207000,
220000, 304000, 333000, 371000, 549000, 605000, 643000, 848000,
874000, 907000, 935000, 1054000, 1068000, 1481000, 2082000, 2440000,
2658000, 2836000, 3580000, 4138000, 4478000, 4536000, 4886000,
6238000, 6532000, 6609000, 6676000, 6886000, 7742000, 7931000,
8607000, 9186000, 9433000, 9575000, 9979000, 11139000, 13012000,
13099000, 13220000, 13660000, 13849000, 15585000, 16787000, 17591000,
18889000, 19169000, 19529000, 20863000, 22924000, 23463000, 24438000,
25203000, 25364000, 25557000, 27173000, 27436000, 28769000, 30435000,
31880000, 32342000, 33237000, 33497000, 34657000, 35227000, 35660000,
36641000, 37488000, 38384000, 38930000, 38950000, 39652000, 41143000,
44787000, 44979000, 45088000, 47357000, 52694000, 56774000, 59568000,
70066000, 73901000, 76181000, 78820000, 1875073000, 197330000,
197981000, 205765000, 216749000)
fitW = fitdist(timegaplist, "weibull",lower = c(0, 0))
gofw=gofstat(fitw)
wc=c(gofw$ks,gofw$kstest,gofw$aic,gofw$bic)
names(wc)=c("weibull.KS","weibull.KSTest","weibull.AIc","weibull.BIc")