I have a Probability Density Function as provided below
ozone = airquality$Ozone density.ozone = density(ozone, na.rm = T) #kernel density plot ozone plot(density.ozone, main = 'Kernel Density Estimates of Ozone', xlab = 'Ozone (ppb)', ylab = 'Density', ylim = c(0, max(density.ozone$y, na.rm = T)), lty = 1)
I want to convert it to CDF. For this, I tried
# KDE to CDF library(spatstat) f_KDE_CDF=CDF(density.ozone) plot(f_KDE_CDF)
I want to get a plot with x-axis with real ozone value with y-axis as proability with max of 1.