panel.fit {carEx} | R Documentation |
Panel function to display predicted values and SE bands using
xyplot
in in lattice and
layer
or glayer
in latticeExtra
panel.fit(x, y, fit, lower, upper, subscripts, ..., type, group.number, alpha, col, col.line, col.symbol, border = F, font, fontface)
x, y |
these are place holders for the arguments that are automatically passed to
panel functions from |
fit |
fitted values defined as an argument named |
lower, upper |
lower and upper limits of error bands, passed in the same way as |
subscripts |
logical, passed |
... |
specify any additional arguments to prevent them from being silently passed from
|
group.number |
passed silently from |
alpha |
transparency of the bands, in the interval [0,1]. Provide a value or it will be passed silently from |
col |
color, may be specified, otherwise passed from |
col.line |
line color, if |
col.symbol |
color when using groups,may be specified, otherwise passed from |
border |
if TRUE draw borders on bands. Default is FALSE |
font |
may be specified, otherwise passed from |
fontface |
may be specified, otherwise passed from |
type |
currently not used. |
With layer
and glayer
in latticeExtra,
panel.fit
can be used to generate fitted values and
confidence or prediction bands that have render correctly
whether a plot uses groups or not.
If a data frame, data
, is used to fit a model and
contains variables for fitted values and standard error for estimation
or prediction, a typical use of panel.fit
has the following form:
library(latticeExtra)
xyplot( y ~ x, data, groups = g, fit = data$yhat,
lower = with(data, yhat - 2*se), upper = with(data, yhat + 2*se),
subscripts = T) +
glayer(panel.fit(...))
The panel.fit
,is invoked for its graphical effect.
Georges Monette <georges@yorku.ca>
## Not run: ### ### Exploring possible discontinuity in value of post-secondary education ### ## End(Not run) ## Not run: trellis.focus() panel.identify(labels = rownames(data),rot=-15,col = col.symbol, etc.) trellis.unfocus() ## End(Not run)