时间预测模型
Time prediction model
尝试制作一个模型来预测项目需要多长时间。当前模型显示可能需要多长时间。但是我想制作一个模型 long 需要多长时间。这可以通过将所有先前的数字相加直到达到 100% 百分比来实现。结果应该类似于 S 曲线。也就是说,我希望它增加到 100%,而不是中途减少。
library(ggplot2)
library(mc2d)
library(scales)
n=1000
planing=rpert(n, min=30, mode=40, max=70, shape=0)
marketing=rpert(n, min=40, mode=60, max=120, shape=30)
hirepeople=rpert(n, min=25, mode=40, max=70, shape=30)
totallength=planing + marketing + hirepeople
p <- ggplot(data.frame(totallength), aes(x = totallength))
p <- p + geom_histogram(aes(y = (..count..)/sum(..count..)), color = "black", fill = "steelblue",
binwidth = 5)
p <- p + scale_y_continuous(labels = percent)
p <- p + xlab("Days") + ylab("Percentage")
p <- p + theme_bw()
print(p)
您应该使用 geom_histogram
的 ecdf
统计数据。这将对所有百分比求和并得出您要查找的结果。
qplot(totallength, stat = "ecdf", geom = "step")
添加类似 scale_y_continuous(breaks = seq(0, 1, by = 0.1),labels = percent_format()) 的内容应该添加百分比。
尝试制作一个模型来预测项目需要多长时间。当前模型显示可能需要多长时间。但是我想制作一个模型 long 需要多长时间。这可以通过将所有先前的数字相加直到达到 100% 百分比来实现。结果应该类似于 S 曲线。也就是说,我希望它增加到 100%,而不是中途减少。
library(ggplot2)
library(mc2d)
library(scales)
n=1000
planing=rpert(n, min=30, mode=40, max=70, shape=0)
marketing=rpert(n, min=40, mode=60, max=120, shape=30)
hirepeople=rpert(n, min=25, mode=40, max=70, shape=30)
totallength=planing + marketing + hirepeople
p <- ggplot(data.frame(totallength), aes(x = totallength))
p <- p + geom_histogram(aes(y = (..count..)/sum(..count..)), color = "black", fill = "steelblue",
binwidth = 5)
p <- p + scale_y_continuous(labels = percent)
p <- p + xlab("Days") + ylab("Percentage")
p <- p + theme_bw()
print(p)
您应该使用 geom_histogram
的 ecdf
统计数据。这将对所有百分比求和并得出您要查找的结果。
qplot(totallength, stat = "ecdf", geom = "step")
添加类似 scale_y_continuous(breaks = seq(0, 1, by = 0.1),labels = percent_format()) 的内容应该添加百分比。