[R-gregmisc-users] SF.net SVN: r-gregmisc:[1904] trunk/gplots/man/bandplot.Rd
Brought to you by:
warnes
From: <wa...@us...> - 2014-12-02 01:38:03
|
Revision: 1904 http://sourceforge.net/p/r-gregmisc/code/1904 Author: warnes Date: 2014-12-02 01:38:01 +0000 (Tue, 02 Dec 2014) Log Message: ----------- Man page fixes. Modified Paths: -------------- trunk/gplots/man/bandplot.Rd Modified: trunk/gplots/man/bandplot.Rd =================================================================== --- trunk/gplots/man/bandplot.Rd 2014-12-02 01:12:45 UTC (rev 1903) +++ trunk/gplots/man/bandplot.Rd 2014-12-02 01:38:01 UTC (rev 1904) @@ -8,14 +8,14 @@ } \usage{ bandplot(x,...) -\method{bandplot}{formula}(x, data=parent.frame(), subset, na.action, ..., +\method{bandplot}{formula}(x, data, subset, na.action, ..., xlab=NULL, ylab=NULL, add = FALSE, sd = c(-2:2), sd.col=c("magenta", "blue", "red", "blue", "magenta"), - sd.lwd=c(2, 2, 3, 2, 2), sd.lty=c(2, 1, 1, 1, 2), + sd.lwd=c(2, 2, 3, 2, 2), sd.lty=c(2, 1, 1, 1, 2), method = "frac", width = 1/5, n=50) \method{bandplot}{default}(x, y, ..., add = FALSE, sd = c(-2:2), sd.col=c("magenta", "blue", "red", "blue", "magenta"), - sd.lwd=c(2, 2, 3, 2, 2), sd.lty=c(2, 1, 1, 1, 2), + sd.lwd=c(2, 2, 3, 2, 2), sd.lty=c(2, 1, 1, 1, 2), method = "frac", width = 1/5, n=50) } \arguments{ @@ -23,11 +23,19 @@ an single independent variable (x) to use as coordinates in the scatter plot or a numeric vector of x locations} \item{y}{numeric vector of y locations} - \item{data}{a data.frame (or list) from which the variables in `formula' - should be taken.} - \item{subset}{ an optional vector specifying a subset of observations to be - used in the fitting process. } - \item{\dots}{Additional plotting parameters. } + \item{data}{an optional data.frame, list, or environment contianing + the variables used in the model (and in \code{subset}). If not found in + data, the variables are taken from environment(formula), + typically the environment from which lm is called.} + \item{subset}{an optional vector specifying a subset of observations to be + used in the fitting process.} + \item{na.action}{a function which indicates what should happen when + the data contain NAs. The default is set by the na.action + setting of options, and is na.fail if that is unset. The + factory-fresh default is na.omit. Another possible value is + NULL, no action. Value na.exclude can be useful. } + \item{\dots}{Additional plotting parameters} + \item{xlab, ylab}{x and y axis labels} \item{add}{ Boolean indicating whether the local mean and standard deviation lines should be added to an existing plot. Defaults to FALSE.} @@ -39,15 +47,13 @@ help page for \code{\link{wapply}} for details.} } \details{ - \code{bandplot} was created to look for changes in the mean or variance of scatter plots, particularly plots of regression residuals. - + The local mean and standard deviation are calculated by calling 'wapply'. By default, bandplot asks wapply to smooth using intervals that include the nearest 1/5 of the data. See the documentation of that function for details on the algorithm. - } \value{ Invisibly returns a list containing the x,y points plotted for each line. @@ -61,6 +67,7 @@ x <- 1:1000 y <- rnorm(1000, mean=1, sd=1 + x/1000 ) bandplot(x,y) +bandplot(y~x) # fixed varance, changing mean x <- 1:1000 @@ -79,10 +86,11 @@ # regression picks up the mean trend, but not the change in variance reg <- lm(y~x) summary(reg) +abline(reg=reg, col="blue", lwd=2) # using bandplot on the original data helps to show the mean and # variance trend -bandplot(x,y) +bandplot(y ~ x) # using bandplot on the residuals helps to see that regression removes # the mean trend but leaves the trend in variability This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |