我运行fitdist并将结果存储在:
params = fitdist( data, dist,method="mle" )
results[[i]]<-params
我的问题是我何时使用:
plot(results[[1]])
我得到了几个图形,包括qqplot。我想改变qqplot线条的颜色。我怎么能这样做?
由于
答案 0 :(得分:1)
如果您逐步使用denscomp
,qqcomp
,cdfcomp
和ppcomp
功能创建此图表,您可以影响fitdistrplus
包颜色:
# sample dataset:
data <- rnorm(1000, 0, 1)
# calculate fitting:
fitting <- fitdist(data, "norm")
# the original plot:
par(mfrow=c(1,1))
plot(fitting)
# create it graph by graph with different colors:
par(mfrow=c(2,2))
denscomp(fitting, datacol="gray", fitcol="blue")
qqcomp(fitting, fitpch = 20, fitcol="gray", line01col ="blue")
cdfcomp(fitting, datacol="gray", fitcol="blue")
ppcomp(fitting, fitpch = 20, fitcol="gray", line01col = "blue")