search for: confidencebound

Displaying 2 results from an estimated 2 matches for "confidencebound".

2008 Jun 25
1
confidence bounds using contour plot
...h >includes 95% of the points (at a level computed from the sorted values via >quantile()). > >-- >Brian D. Ripley >(...) -- Example: x <- rnorm(1000, mean = 0, sd = 1) y <- rnorm(1000, mean = 1, sd = 1.3) kerneld <- kde2d(x, y, n = 200, lims = c(-1.0, 1.0, 0.0, 2.0)) confidencebound <- quantile(kerneld$z, probs= 0.95) plot(x, y, pch=19, cex=0.5) contour(kerneld, levels = confidencebound, col="red", add = TRUE) -- How can I calculate the right contour containing 95% of the values? Thank's for your help. Pascal R 2.7.0, Win XP -- Pascal H?nggi Unive...
2012 Mar 03
2
contour for plotting confidence interval on scatter plot of bivariate normal distribution
...k. Pascal H?nggis code seems to work, but I don't understand the magic he does with pp <- array() for (i in 1:1000){ z.x <- max(which(den$x < x[i])) z.y <- max(which(den$y < y[i])) pp[i] <- den$z[z.x, z.y] } before doing the very same as I did above: confidencebound <- quantile(pp, 0.05, na.rm = TRUE) plot(x, y) contour(den, levels = confidencebound, col = "red", add = TRUE) My problems: 1.) setting probs=0.6827 is somehow a dirty trick which I can only use by simply knowing that this is the percentage of values inside +-1sd when a distributio...