Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lapply(1:10000, function(B){
- set.seed(B)
- x <- runif(15, min = 0, max = 1)
- a <- ks.test(x, 'punif')
- b <- ks.test(x, 'punif', min = min(x), max = max(x))
- c(true = a$p.value, est= b$p.value)
- }) -> boot
- library(ggplot2)
- dfs <- do.call(rbind, boot) %>% as.data.frame
- dd <- melt(dfs)
- ggplot() + geom_density(aes(x = value, colour = variable, group = variable), dd)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement