[R] rootogram for normal distributions

Hugo Mildenberger Hugo.Mildenberger at web.de
Sun Jan 16 11:45:27 CET 2011


Using R-2.12.1 and latticeExtra-0.6-14, I would like to understand 
why a rootogram displaying samples from the Poisson distribution looks like I 
expected it, whereas a rootogram using the normal distribution does not:

library(latticeExtra)
rootogram(~rpois(1000, lambda = 50), dfun = function(x) dpois(x, lambda = 50))

rootogram(~rnorm(1000), dfun = function(x) dnorm(x,mean(x),sd(x)))

I probably can't attach figures here. Thus a textual description of what I get may 
suffice: With increasing sample size, the rootogram using random samples 
from the Poisson distribution shows decreasing differences (bars are quickly 
approaching the zero line), whereas the displayed differences for random 
samples of the normal distribution are always large. The differences even increase 
with sample size, i.e,  the hanging bars tend to vanish for very large samples.



More information about the R-help mailing list