积分并绘制密度函数

时间:2019-05-08 13:35:00

标签: r kernel-density integrate

我正在尝试积分,然后绘制密度函数的积分。

我已经尝试了integration.xy,但是绘制它时我得到的只是一个点,而不是整个集成函数。 ecdf(G_40_TmK_Alle_VP)是否合适,如果可以,绘制ECDF时如何获得一条平滑线而不是获得典型点?

非常感谢!

#Kernel Density 
G_40_TmK_Alle_VP_Kerndichte <- density(G_40_TmK_Alle_VP) 
plot(G_40_TmK_Alle_VP_Kerndichte,xlab ='Bedienzeit in s', ylab = 'f(x) in 1/s', main = 'Dichtefunktion, 40°C, TmK \n Gesamte Stichprobe ')
#45 Sekunden Grenze
abline(v=45, lty = "dashed")
text(47.5,0.05, "Bedienlimit")
G_40_TmK_Alle_VP_Kerndichte_x <- G_40_TmK_Alle_VP_Kerndichte$x
G_40_TmK_Alle_VP_Kerndichte_y <- G_40_TmK_Alle_VP_Kerndichte$y
#Bandwith
G_40_TmK_Alle_VP_Kerndichte_bw <- G_40_TmK_Alle_VP_Kerndichte$bw
#Now I would like to integrate and plot the function but I don't know how
ECDF <- ecdf(G_40_TmK_Alle_VP)
plot(ECDF)
#how could I get one smooth line and not the dots?

0 个答案:

没有答案