[Distr-commits] r690 - in branches/distr-2.3/pkg: distr/R distrMod/R distrMod/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 24 14:40:02 CET 2010


Author: ruckdeschel
Date: 2010-11-24 14:40:02 +0100 (Wed, 24 Nov 2010)
New Revision: 690

Modified:
   branches/distr-2.3/pkg/distr/R/internals-qqplot.R
   branches/distr-2.3/pkg/distrMod/R/SimpleL2ParamFamilies.R
   branches/distr-2.3/pkg/distrMod/R/qqplot.R
   branches/distr-2.3/pkg/distrMod/man/NBinomFamily.Rd
   branches/distr-2.3/pkg/distrMod/man/qqplot.Rd
Log:
[distrMod]: did the same as for distr as to qqplot (new args...); made doc for NbinomFamily error-free

Modified: branches/distr-2.3/pkg/distr/R/internals-qqplot.R
===================================================================
--- branches/distr-2.3/pkg/distr/R/internals-qqplot.R	2010-11-24 12:34:54 UTC (rev 689)
+++ branches/distr-2.3/pkg/distr/R/internals-qqplot.R	2010-11-24 13:40:02 UTC (rev 690)
@@ -189,7 +189,8 @@
                     n,exact.sCI=(n<100),exact.pCI=(n<100), nosym.pCI = FALSE,
                     with.legend = TRUE, legend.bg = "white",
                     legend.pos = "topleft", legend.cex = 0.8,
-                    legend.pref = "", legend.postf = "", legend.alpha=alpha){
+                    legend.pref = "", legend.postf = "", 
+                    legend.alpha = alpha){
 
    x <- sort(unique(x))
    if("gaps" %in% names(getSlots(class(D))))

Modified: branches/distr-2.3/pkg/distrMod/R/SimpleL2ParamFamilies.R
===================================================================
--- branches/distr-2.3/pkg/distrMod/R/SimpleL2ParamFamilies.R	2010-11-24 12:34:54 UTC (rev 689)
+++ branches/distr-2.3/pkg/distrMod/R/SimpleL2ParamFamilies.R	2010-11-24 13:40:02 UTC (rev 690)
@@ -255,8 +255,8 @@
     param <- ParamFamParameter(name = "probability of success",  
                                main = param0, 
                                trafo = trafo)
-    modifyParam <- function(theta){ Nbinom(size = theta[1], mean = theta[2]) }
-    body(modifyParam) <- substitute({ Nbinom(size = theta[1], mean = theta[2]) })
+    modifyParam <- function(theta){ Nbinom(size = theta[1], prob = theta[1]/(theta[1]+theta[2])) }
+    body(modifyParam) <- substitute({ Nbinom(size = theta[1], prob = theta[1]/(theta[1]+theta[2])) })
     props <- ""
     
     startPar <- function(x,...){ param1 <- c(1,0.5)

Modified: branches/distr-2.3/pkg/distrMod/R/qqplot.R
===================================================================
--- branches/distr-2.3/pkg/distrMod/R/qqplot.R	2010-11-24 12:34:54 UTC (rev 689)
+++ branches/distr-2.3/pkg/distrMod/R/qqplot.R	2010-11-24 13:40:02 UTC (rev 690)
@@ -91,7 +91,10 @@
              with.legend = TRUE,  ## shall a legend be plotted
              legend.bg = "white", ## background for the legend
              legend.pos = "topleft", ## position for the legend
-             legend.cex = 0.8     ## magnification factor for the legend
+             legend.cex = 0.8,     ## magnification factor for the legend
+             legend.pref = "",     ## prefix for legend  text
+             legend.postf = "",    ## postfix for legend text
+             legend.alpha = alpha.CI ## nominal level of CI
     ){ ## return value as in stats::qqplot
 
     mc <- match.call(call = sys.call(sys.parent(1)))
@@ -200,7 +203,8 @@
                   n, exact.sCI = exact.sCI, exact.pCI = exact.pCI,
                   nosym.pCI = nosym.pCI, with.legend = with.legend,
                   legend.bg = legend.bg, legend.pos = legend.pos,
-                  legend.cex = legend.cex)
+                  legend.cex = legend.cex, legend.pref = legend.pref,
+                  legend.postf = legend.postf, legend.alpha = legend.alpha)
        }
     }
     return(ret)

Modified: branches/distr-2.3/pkg/distrMod/man/NBinomFamily.Rd
===================================================================
--- branches/distr-2.3/pkg/distrMod/man/NBinomFamily.Rd	2010-11-24 12:34:54 UTC (rev 689)
+++ branches/distr-2.3/pkg/distrMod/man/NBinomFamily.Rd	2010-11-24 13:40:02 UTC (rev 690)
@@ -17,6 +17,7 @@
 \arguments{
   \item{size}{ number of trials }
   \item{prob}{ probability of success }
+  \item{mean}{ alternative parameter for negative binomial parameter}
   \item{trafo}{ function in \code{param} or matrix: transformation of the parameter }
 }
 \details{

Modified: branches/distr-2.3/pkg/distrMod/man/qqplot.Rd
===================================================================
--- branches/distr-2.3/pkg/distrMod/man/qqplot.Rd	2010-11-24 12:34:54 UTC (rev 689)
+++ branches/distr-2.3/pkg/distrMod/man/qqplot.Rd	2010-11-24 13:40:02 UTC (rev 690)
@@ -20,7 +20,8 @@
     cex.lbl = par("cex"), col.lbl = par("col"), adj.lbl = NULL,
     jit.fac = 0, check.NotInSupport = TRUE, col.NotInSupport = "red",
     with.legend = TRUE, legend.bg = "white",
-    legend.pos = "topleft", legend.cex = 0.8)
+    legend.pos = "topleft", legend.cex = 0.8, 
+    legend.pref = "", legend.postf = "",  legend.alpha = alpha.CI)
 \S4method{qqplot}{ANY,ProbFamily}(x, y,
    n = length(x), withIdLine = TRUE, withConf = TRUE,
    withConf.pw  = withConf,  withConf.sim = withConf,
@@ -95,6 +96,9 @@
 \item{legend.bg}{background color for the legend}
 \item{legend.pos}{position for the legend}
 \item{legend.cex}{magnification factor for the legend}
+\item{legend.pref}{character to be prepended to legend text}
+\item{legend.postf}{character to be appended to legend text}
+\item{legend.alpha}{nominal coverage probability}
 }
 \description{
   We generalize function \code{\link[stats:qqnorm]{qqplot}} from package \pkg{stats} to



More information about the Distr-commits mailing list