Skip to content
Prev 175682 / 398506 Next

Deriving Samples from specific, not implemented PDF for a QQ-Plot

On Mar 31, 2009, at 11:53 AM, Arndt Zimmermann wrote:

            
Reproducible examples should not be too much to expect, since that is  
requested in the posting guide and multiple other locations.
Rather hard to tell, since you haven't described what I understand to  
be a problem, nor described how you see it.
It seems to be going fine for us. Did you break it?
Since you offer no examples, it is rather difficult to offer specific  
advice. You should be able to use the sample function on a pdf by  
assigning a vector of probabilities to the prob argument.

 > mean(sample(seq(-2,2,by=0.2), size=100,  
prob=dnorm(seq(-2,2,by=0.2)), replace=TRUE))
[1] -0.08
 > sd(sample(seq(-2,2,by=0.2), siez=100, prob=dnorm(seq(-2,2,by=0.2)),  
replace=TRUE))
[1] 0.911101


David Winsemius, MD
Heritage Laboratories
West Hartford, CT