SCM

SCM Repository

[latticeextra] Diff of /pkg/man/panel.quantile.Rd
ViewVC logotype

Diff of /pkg/man/panel.quantile.Rd

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 73, Wed Dec 23 06:34:58 2009 UTC revision 194, Fri Jan 1 11:17:13 2016 UTC
# Line 5  Line 5 
5  }  }
6  \description{  \description{
7    Plot a quantile regression line with standard error bounds, using the    Plot a quantile regression line with standard error bounds, using the
8    \pkg{quantreg} package. This is based on the \code{\link[ggplot2]{stat_quantile}}    \pkg{quantreg} package. This is based on the
9    function from \pkg{ggplot2}.    \code{\link[ggplot2]{stat_quantile}} function from \pkg{ggplot2}.
10  }  }
11  \usage{  \usage{
12  panel.quantile(x, y, form = y ~ x, method = "rq", ...,  panel.quantile(x, y, form = y ~ x, method = "rq", ...,
# Line 30  Line 30 
30    \item{form, method}{    \item{form, method}{
31      the model is constructed (approximately) as      the model is constructed (approximately) as
32      \code{method(form, tau = tau, data = list(x=x, y=y), ...)}.      \code{method(form, tau = tau, data = list(x=x, y=y), ...)}.
   
33      See the Examples section for common choices.      See the Examples section for common choices.
34    }    }
35    \item{\dots}{    \item{\dots}{
# Line 79  Line 78 
78    \code{\link[ggplot2]{stat_quantile}}    \code{\link[ggplot2]{stat_quantile}}
79  }  }
80  \examples{  \examples{
81  library("quantreg")  ## library("quantreg")
82    
83  set.seed(1)  set.seed(1)
84  xy <- data.frame(x = runif(100), y = rt(100, df = 5))  xy <- data.frame(x = runif(100), y = rt(100, df = 5))
# Line 95  Line 94 
94  }  }
95    
96  xyplot(y ~ x, xy) +  xyplot(y ~ x, xy) +
97    layer(panel.quantile(x, y, tau = c(.9, .5, .1), superpose = TRUE))    layer(panel.quantile(x, y, tau = c(.5, .9, .1), superpose = TRUE))
   
98  update(trellis.last.object(),  update(trellis.last.object(),
99    key = simpleKey(paste(c(90,50,10), "\% quantile"),    auto.key = list(text = paste(c(50,90,10), "\% quantile"),
100                    points = FALSE, lines = TRUE))                    points = FALSE, lines = TRUE))
101    
102  ## seems not to work...  ## seems not to work...

Legend:
Removed from v.73  
changed lines
  Added in v.194

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge