0

I was wondering if someone has a good suggestion on how to plot CIs in R for thousands of points. I'd like to plot the CI for each point, and then also plot the TRUE value on top (simulated data) to check how many times my predictions are within the predicted CI.

I think this plot: Plotting Confidence Intervals may provide a good start, but I'd have to add the TRUE values in there as well.

Ideas are welcome.

Thanks!

Community
  • 1
  • 1
Dnaiel
  • 7,622
  • 23
  • 67
  • 126
  • 1
    This doesn't seem that hard: please give a reproducible example. `?segments`, `?points` ... – Ben Bolker Apr 14 '13 at 16:07
  • @Ben Bolker, i was thinking to use plotCI, and points, i don't think is hard the problem is that when there are two many points one cannot see much from the plot, but there may be better ideas on how to show it – Dnaiel Apr 14 '13 at 16:16
  • If you post code to simulate something that looks like your data then we can try it out and post some useful answers. **Please give a reproducible example.** – Gregor Thomas Apr 14 '13 at 16:31
  • @shujaa, good suggestion, let me try get the data and I'll post it later today – Dnaiel Apr 14 '13 at 16:32
  • 1
    Data is great; if you'd rather not wait, "data" in the form of `x <- runif(1000)`, `true_vals <- rpois(1000, 10)`... can be just as good. But if it's simulated data, it's better if you do it so that it looks something like your actual data. – Gregor Thomas Apr 14 '13 at 16:35
  • Some tips on how to make a small self-contained example: http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Roman Luštrik Apr 14 '13 at 18:22
  • 2
    I would suggest that plotting CI for thousands of points is not going to be of any use to your audience. How about calculating the CI and then plotting lines, one each for data and +CI, -CI . – Carl Witthoft Apr 14 '13 at 23:40
  • @CarlWitthoft that's a good idea. I m still debugging some errors with my data but that makes good sense. – Dnaiel Apr 15 '13 at 19:48

0 Answers0