[R] qqplot for binomial distribution
Spencer Graves
spencer.graves at effectivedefense.org
Mon Apr 17 15:01:47 CEST 2017
On 2017-04-17 7:58 AM, Ashim Kapoor wrote:
> Dear All,
>
> set.seed(123)
> qqplot(rbinom(n=100,size=100,p=.05), rbinom(n=100,size=100,p=.05) )
>
> I expect to see 1 clear line,but I don't. What am I misunderstanding?
The distribution is discrete, and points are superimposed. Try
the following:
set.seed(123)
qqplot(jitter(rbinom(n=100,size=100,p=.05)),
jitter(rbinom(n=100,size=100,p=.05) ))
Spencer Graves
>
> Best Regards,
> Ashim
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list