Nothing
library("aroma.light")
# Simulate ten samples of different lengths
N <- 10000
X <- list()
for (kk in 1:8) {
rfcn <- list(rnorm, rgamma)[[sample(2, size=1)]]
size <- runif(1, min=0.3, max=1)
a <- rgamma(1, shape=20, rate=10)
b <- rgamma(1, shape=10, rate=10)
values <- rfcn(size*N, a, b)
# "Censor" values
values[values < 0 | values > 8] <- NA_real_
X[[kk]] <- values
}
# Add 20% missing values
X <- lapply(X, FUN=function(x) {
x[sample(length(x), size=0.20*length(x))] <- NA_real_
x
})
# Normalize quantiles
Xn <- normalizeAverage(X, na.rm=TRUE, targetAvg=median(unlist(X), na.rm=TRUE))
# Plot the data
layout(matrix(1:2, ncol=1))
xlim <- range(X, Xn, na.rm=TRUE)
plotDensity(X, lwd=2, xlim=xlim, main="The original distributions")
plotDensity(Xn, lwd=2, xlim=xlim, main="The normalized distributions")
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.