[英]plot the theoretical cdf
I am trying to plot the empirical cumulative distribution function and theoretical cumulative distribution function. 我正在尝试绘制经验累积分布函数和理论累积分布函数。 This is my R code: 这是我的R代码:
x=rgamma(40, 2, 1/3)
plot(ecdf(x))
lines(x, pgamma(x, shape = 2, scale = 3), type="l", col = "red")
But I got the graph in the attached file which I think it is not reasonable. 但是我在附件中找到了该图,我认为这是不合理的。 What I do wrong? 我做错了什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.