[Robast-commits] r773 - in branches/robast-1.0/pkg/RobAStBase: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 1 20:06:49 CEST 2014
Author: ruckdeschel
Date: 2014-08-01 20:06:49 +0200 (Fri, 01 Aug 2014)
New Revision: 773
Modified:
branches/robast-1.0/pkg/RobAStBase/R/AllPlot.R
branches/robast-1.0/pkg/RobAStBase/R/comparePlot.R
branches/robast-1.0/pkg/RobAStBase/R/infoPlot.R
branches/robast-1.0/pkg/RobAStBase/man/comparePlot.Rd
branches/robast-1.0/pkg/RobAStBase/man/infoPlot.Rd
branches/robast-1.0/pkg/RobAStBase/man/plot-methods.Rd
Log:
[RobAStBase] comparePlot, infoPlot, and the plot-Method for ICs gain an argument x.vec; if given it is the x-grid on which to evaluate the ICs; by default this argument is NULL; then (as before) the grid is selected automatically according to the distribution of the IC. This can be useful for usage with a rescaling of the x-Axis to avoid that the evaluation points be selected too unevenly (i.e. on an equally spaced grid in the original scale, but then, after rescaling non-equally... The grid has to be specified in original scale; i.e.; when used with rescaling, should be chosen non-equally spaced...
Modified: branches/robast-1.0/pkg/RobAStBase/R/AllPlot.R
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/R/AllPlot.R 2014-08-01 17:24:30 UTC (rev 772)
+++ branches/robast-1.0/pkg/RobAStBase/R/AllPlot.R 2014-08-01 18:06:49 UTC (rev 773)
@@ -7,7 +7,7 @@
legend.location = "bottomright", legend.cex = 0.8,
withMBR = FALSE, MBRB = NA, MBR.fac = 2, col.MBR = par("col"),
lty.MBR = "dashed", lwd.MBR = 0.8,
- scaleX = FALSE, scaleX.fct, scaleX.inv,
+ x.vec = NULL, scaleX = FALSE, scaleX.fct, scaleX.inv,
scaleY = FALSE, scaleY.fct = pnorm, scaleY.inv=qnorm,
scaleN = 9, x.ticks = NULL, y.ticks = NULL,
mfColRow = TRUE, to.draw.arg = NULL){
@@ -84,14 +84,20 @@
upper <- max(upper,xM)
}
h <- upper - lower
- x.vec <- seq(from = lower - 0.1*h, to = upper + 0.1*h, length = 1000)
+ if(is.null(x.vec))
+ x.vec <- seq(from = lower - 0.1*h, to = upper + 0.1*h, length = 1000)
plty <- "l"
lty <- "solid"
}else{
- if(is(e1, "DiscreteDistribution")) x.vec <- support(e1)
- else{
- x.vec <- r(e1)(1000)
- x.vec <- sort(unique(x.vec))
+ if(!is.null(x.vec)){
+ if(is(distr, "DiscreteDistribution"))
+ x.vec <- intersect(x.vec,support(e1))
+ }else{
+ if(is(e1, "DiscreteDistribution")) x.vec <- support(e1)
+ else{
+ x.vec <- r(e1)(1000)
+ x.vec <- sort(unique(x.vec))
+ }
}
plty <- "p"
lty <- "dotted"
Modified: branches/robast-1.0/pkg/RobAStBase/R/comparePlot.R
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/R/comparePlot.R 2014-08-01 17:24:30 UTC (rev 772)
+++ branches/robast-1.0/pkg/RobAStBase/R/comparePlot.R 2014-08-01 18:06:49 UTC (rev 773)
@@ -10,7 +10,7 @@
legend.location = "bottomright", legend.cex = 0.8,
withMBR = FALSE, MBRB = NA, MBR.fac = 2, col.MBR = par("col"),
lty.MBR = "dashed", lwd.MBR = 0.8,
- scaleX = FALSE, scaleX.fct, scaleX.inv,
+ x.vec = NULL, scaleX = FALSE, scaleX.fct, scaleX.inv,
scaleY = FALSE, scaleY.fct = pnorm, scaleY.inv=qnorm,
scaleN = 9, x.ticks = NULL, y.ticks = NULL,
mfColRow = TRUE, to.draw.arg = NULL,
@@ -112,13 +112,19 @@
upper <- max(upper,xM)
}
h <- upper - lower
- x.vec <- seq(from = lower - 0.1*h, to = upper + 0.1*h, length = 1000)
+ if(is.null(x.vec))
+ x.vec <- seq(from = lower - 0.1*h, to = upper + 0.1*h, length = 1000)
plty <- "l"
if(missing(lty)) lty <- "solid"
}else{
- if(is(distr, "DiscreteDistribution")) x.vec <- support(distr) else{
- x.vec <- r(distr)(1000)
- x.vec <- sort(unique(x.vec))
+ if(!is.null(x.vec)){
+ if(is(distr, "DiscreteDistribution"))
+ x.vec <- intersect(x.vec,support(distr))
+ }else{
+ if(is(distr, "DiscreteDistribution")) x.vec <- support(distr) else{
+ x.vec <- r(distr)(1000)
+ x.vec <- sort(unique(x.vec))
+ }
}
plty <- "p"
if(missing(lty)) lty <- "dotted"
Modified: branches/robast-1.0/pkg/RobAStBase/R/infoPlot.R
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/R/infoPlot.R 2014-08-01 17:24:30 UTC (rev 772)
+++ branches/robast-1.0/pkg/RobAStBase/R/infoPlot.R 2014-08-01 18:06:49 UTC (rev 773)
@@ -8,7 +8,7 @@
bmar = par("mar")[1], tmar = par("mar")[3],
with.legend = TRUE, legend = NULL, legend.bg = "white",
legend.location = "bottomright", legend.cex = 0.8,
- scaleX = FALSE, scaleX.fct, scaleX.inv,
+ x.vec = NULL, scaleX = FALSE, scaleX.fct, scaleX.inv,
scaleY = FALSE, scaleY.fct = pnorm, scaleY.inv=qnorm,
scaleN = 9, x.ticks = NULL, y.ticks = NULL,
mfColRow = TRUE, to.draw.arg = NULL,
@@ -108,14 +108,20 @@
upper <- max(upper,xM)
}
h <- upper - lower
- x.vec <- seq(from = lower - 0.1*h, to = upper + 0.1*h, length = 1000)
+ if(is.null(x.vec))
+ x.vec <- seq(from = lower - 0.1*h, to = upper + 0.1*h, length = 1000)
plty <- "l"
if(missing(lty)) lty <- "solid"
}else{
- if(is(distr, "DiscreteDistribution")) x.vec <- support(distr)
- else{
- x.vec <- r(distr)(1000)
- x.vec <- sort(unique(x.vec))
+ if(!is.null(x.vec)){
+ if(is(distr, "DiscreteDistribution"))
+ x.vec <- intersect(x.vec,support(distr))
+ }else{
+ if(is(e1, "DiscreteDistribution")) x.vec <- support(distr)
+ else{
+ x.vec <- r(e1)(1000)
+ x.vec <- sort(unique(x.vec))
+ }
}
plty <- "p"
if(missing(lty)) lty <- "dotted"
Modified: branches/robast-1.0/pkg/RobAStBase/man/comparePlot.Rd
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/man/comparePlot.Rd 2014-08-01 17:24:30 UTC (rev 772)
+++ branches/robast-1.0/pkg/RobAStBase/man/comparePlot.Rd 2014-08-01 18:06:49 UTC (rev 773)
@@ -21,7 +21,7 @@
legend.location = "bottomright", legend.cex = 0.8,
withMBR = FALSE, MBRB = NA, MBR.fac = 2, col.MBR = par("col"),
lty.MBR = "dashed", lwd.MBR = 0.8,
- scaleX = FALSE, scaleX.fct, scaleX.inv,
+ x.vec = NULL, scaleX = FALSE, scaleX.fct, scaleX.inv,
scaleY = FALSE, scaleY.fct = pnorm, scaleY.inv=qnorm,
scaleN = 9, x.ticks = NULL, y.ticks = NULL,
mfColRow = TRUE, to.draw.arg = NULL,
@@ -80,6 +80,15 @@
\item{col.MBR}{color for the MBR lines; as usual \code{col}-argument;}
\item{lty.MBR}{line type for the MBR lines; as usual \code{lty}-argument;}
\item{lwd.MBR}{line width for the MBR lines; as usual \code{lwd}-argument;}
+ \item{x.vec}{a numeric vector of grid points to evaluate the influence curve;
+ by default, \code{x.vec} is \code{NULL}; then the grid is
+ produced automatically according to the distribution of the IC.
+ \code{x.vec} can be useful for usage with a rescaling of the
+ x-axis to avoid that the evaluation points be selected too
+ unevenly (i.e. on an equally spaced grid in the original scale,
+ but then, after rescaling non-equally).
+ The grid has to be specified in original scale; i.e.; when used
+ with rescaling, it should be chosen non-equally spaced. }
\item{scaleX}{logical; shall X-axis be rescaled (by default according to the cdf of
the underlying distribution)?}
\item{scaleY}{logical; shall Y-axis be rescaled (by default according to a probit scale)?}
Modified: branches/robast-1.0/pkg/RobAStBase/man/infoPlot.Rd
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/man/infoPlot.Rd 2014-08-01 17:24:30 UTC (rev 772)
+++ branches/robast-1.0/pkg/RobAStBase/man/infoPlot.Rd 2014-08-01 18:06:49 UTC (rev 773)
@@ -18,7 +18,7 @@
bmar = par("mar")[1], tmar = par("mar")[3],
with.legend = TRUE, legend = NULL, legend.bg = "white",
legend.location = "bottomright", legend.cex = 0.8,
- scaleX = FALSE, scaleX.fct, scaleX.inv,
+ x.vec = NULL, scaleX = FALSE, scaleX.fct, scaleX.inv,
scaleY = FALSE, scaleY.fct = pnorm, scaleY.inv=qnorm,
scaleN = 9, x.ticks = NULL, y.ticks = NULL,
mfColRow = TRUE, to.draw.arg = NULL,
@@ -72,6 +72,15 @@
of such arguments, one for each plotted panel.}
\item{legend.bg}{background color for the legend}
\item{legend.cex}{magnification factor for the legend}
+ \item{x.vec}{a numeric vector of grid points to evaluate the influence curve;
+ by default, \code{x.vec} is \code{NULL}; then the grid is
+ produced automatically according to the distribution of the IC.
+ \code{x.vec} can be useful for usage with a rescaling of the
+ x-axis to avoid that the evaluation points be selected too
+ unevenly (i.e. on an equally spaced grid in the original scale,
+ but then, after rescaling non-equally).
+ The grid has to be specified in original scale; i.e.; when used
+ with rescaling, it should be chosen non-equally spaced. }
\item{scaleX}{logical; shall X-axis be rescaled (by default according to the cdf of
the underlying distribution)?}
\item{scaleY}{logical; shall Y-axis be rescaled for abs.info-plot
Modified: branches/robast-1.0/pkg/RobAStBase/man/plot-methods.Rd
===================================================================
--- branches/robast-1.0/pkg/RobAStBase/man/plot-methods.Rd 2014-08-01 17:24:30 UTC (rev 772)
+++ branches/robast-1.0/pkg/RobAStBase/man/plot-methods.Rd 2014-08-01 18:06:49 UTC (rev 773)
@@ -15,7 +15,7 @@
legend.location = "bottomright", legend.cex = 0.8,
withMBR = FALSE, MBRB = NA, MBR.fac = 2, col.MBR = par("col"),
lty.MBR = "dashed", lwd.MBR = 0.8,
- scaleX = FALSE, scaleX.fct, scaleX.inv,
+ x.vec = NULL, scaleX = FALSE, scaleX.fct, scaleX.inv,
scaleY = FALSE, scaleY.fct = pnorm, scaleY.inv=qnorm,
scaleN = 9, x.ticks = NULL, y.ticks = NULL,
mfColRow = TRUE, to.draw.arg = NULL)
@@ -66,6 +66,15 @@
\item{col.MBR}{color for the MBR lines; as usual \code{col}-argument;}
\item{lty.MBR}{line type for the MBR lines; as usual \code{lty}-argument;}
\item{lwd.MBR}{line width for the MBR lines; as usual \code{lwd}-argument;}
+ \item{x.vec}{a numeric vector of grid points to evaluate the influence curve;
+ by default, \code{x.vec} is \code{NULL}; then the grid is
+ produced automatically according to the distribution of the IC.
+ \code{x.vec} can be useful for usage with a rescaling of the
+ x-axis to avoid that the evaluation points be selected too
+ unevenly (i.e. on an equally spaced grid in the original scale,
+ but then, after rescaling non-equally).
+ The grid has to be specified in original scale; i.e.; when used
+ with rescaling, it should be chosen non-equally spaced. }
\item{scaleX}{logical; shall X-axis be rescaled (by default according to the cdf of
the underlying distribution)?}
\item{scaleY}{logical; shall Y-axis be rescaled (by default according to a probit scale)?}
More information about the Robast-commits
mailing list