这是我的代码:
x<-c(1300,541,441,35,278,167,276,159,126,60.8,160,5000,718,9740,135,3480,264.6,379,170,251.3,155.84,187.01,850)
y<-log10(x)
# load fitdistrplus package for using fitdist function
library(fitdistrplus)
# fit logistic distribution using MLE method
x.logis <- fitdist(y, "logis", method="mle")
b1 <- bootdist(x.logis, bootmethod="param", niter=20)
b1# Here are 20 b1.如何读取b1中的参数值(位置)?非常感谢!
发布于 2016-10-12 04:13:05
使用str函数检查数据的结构。实际上,b1是一个list,该列表的第一个对象包含一个常规数据框架。
# extract the data frame for the first object of the list
data <- b1$estim
data$location
data$scale
# Also you can use the double bracket operator
b1[[1]][, "location"]在代码的最后一部分,您可以注意到,双方括号用于列表的对象的子集,而普通的方括号用于对象的元素子集。
https://stackoverflow.com/questions/39990178
复制相似问题