June 2016
Beginner to intermediate
1783 pages
71h 22m
English
The empirical Cumulative Distribution Function (CDF) is the non-parametric maximum-likelihood estimation of the CDF. In this recipe, we will see how the empirical CDF can be produced.
To produce this plot, we need to use the latticeExtra library. We will use the simulated dataset as shown in the following code:
# Set a seed value to make the data reproducible
set.seed(12345)
qqdata <-data.frame(disA=rnorm(n=100,mean=20,sd=3),
disB=rnorm(n=100,mean=25,sd=4),
disC=rnorm(n=100,mean=15,sd=1.5),
age=sample((c(1,2,3,4)),size=100,replace=T),
sex=sample(c("Male","Female"),size=100,replace=T),
econ_status=sample(c("Poor","Middle","Rich"),
size=100,replace=T))To plot an empirical ...
Read now
Unlock full access