# NOT RUN {
# Generate data
x=rlnorm(500, meanlog = 8, sdlog = 1)
classes <- c(0,500,1000,1500,2000,2500,3000,4000,5000, 6000,8000,10000, 15000,Inf)
xclass <- cut(x,breaks=classes)
weights <- abs(rnorm(500,0,1))
oecd <- rep(seq(1,6.9,0.3),25)
# Estimate statistical indicators with default settings
Indicator <- kdeAlgo(xclass = xclass, classes = classes)
# Include custom indicators
Indicator_custom <- kdeAlgo(xclass = xclass, classes = classes,
custom_indicator = list(quant5 = function(y, threshold)
{quantile(y, probs = 0.05)}))
# Indclude survey and oecd weights
Indicator_weights <- kdeAlgo(xclass = xclass, classes = classes,
weights = weights, oecd = oecd)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab