# [Distr-commits] r587 - branches/distr-2.2/pkg

Thu Sep 10 21:58:15 CEST 2009

```Author: ruckdeschel
Date: 2009-09-10 21:58:15 +0200 (Thu, 10 Sep 2009)
New Revision: 587

Modified:
branches/distr-2.2/pkg/qqplot.R
Log:
yet some small changes; forgot an increment scale for normal approximation in case discrete distribution has no spacing of 1

Modified: branches/distr-2.2/pkg/qqplot.R
===================================================================
--- branches/distr-2.2/pkg/qqplot.R	2009-09-10 19:21:05 UTC (rev 586)
+++ branches/distr-2.2/pkg/qqplot.R	2009-09-10 19:58:15 UTC (rev 587)
@@ -108,7 +108,7 @@
#    print(c(pq[1:3], x[1:3],dsupp.p[1:3],dsupp.m[1:3],m,s))
dp <- log(pnorm((x+dsupp.p/2-m)/s) - pnorm((x-dsupp.m/2-m)/s))
}
- return(exp(pq/2-dp)*qnorm((1+alpha)/2))
+ return(exp(pq/2-dp)*(dsupp.p+dsupp.m)/2*qnorm((1+alpha)/2))
}

.confqq <- function(x,D,alpha,col.pCI,lty.pCI,lwd.pCI,col.sCI,lty.sCI,lwd.sCI,
@@ -209,7 +209,6 @@
ind <- seq(along=x)
col <- .makeLenAndOrder(col,ind)
colx <- t(sapply(ind,function(i) colorRamp(c("white",col[i]))(x[i])))
- print(colx)
colv2col <- function(colvec)
rgb(red = colvec[1], green = colvec[2], blue = colvec[3], maxColorValue = 255)
apply(colx,1,function(x) colv2col(x))

```