新浪博客

R语言 做累积分布图

2017-11-08 20:42阅读:
##-- Simple didactical ecdf example :
x <- rnorm(12)
Fn <- ecdf(x)


#本质上Fn是一个简单的function
Fn # a *function*
Fn(x) # returns the percentiles for x
tt <- seq(-2, 2, by = 0.1)
12 * Fn(tt) # Fn is a 'simple' function {with values k/12}
summary(Fn)


#如何获得对应的累计分布的x坐标轴和y坐标轴
##--> see below for graphics
knots(Fn)

# get the X-lab value:

knots(Fn)

#get the y-lab value:

Fn(knots(Fn))

plot(Fn,verticals =
TRUE, do.points =F)
R语言 <wbr>做累积分布图

我的更多文章

下载客户端阅读体验更佳

APP专享