我在一个名为 ph 的图中有一个概率密度函数,它是在 stackoverflow 用户的帮助下从两个数据样本中得出的,以这种方式
few <-read.table('outcome.dat',head=TRUE)
many<-read.table('alldata.dat',head=TRUE)
mh <- hist(many$G,breaks=seq(0,1.,by=0.03), plot=FALSE)
fh <- hist(few$G, breaks=mh$breaks, plot=FALSE)
ph <- fh
ph$density <- fh$counts/(mh$counts+0.001)
plot(ph,freq=FALSE,col="blue")
我想拟合 ph 曲线的最佳曲线,但我找不到工作方法。我怎样才能做到这一点?我必须从 ph 中提取值然后对它们进行处理?或者有相同的功能
plot(ph,freq=FALSE,col="blue")
直接地?