plotregr.control: Further Arguments to 'plot.regr'

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Specify some arguments of minor importance for the function plot.regr

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
plotregr.control(x, formula = NULL, data = NULL, rawvars = TRUE,
  smooth.group = NULL, weights = NULL, plweights = NULL,
  plab = NULL, pch = NULL, pcol = NULL, cex.plab = -1, cex.pch = -1,
  markprop = NULL,
  glm.restype = "working", smresid = TRUE,
  jitter = TRUE, jitterbinary = TRUE, mbox = TRUE,
  partial.resid = TRUE, cookdistlines = 1:2, leveragelim = c(0.99, 0.5),
  smooth = 2, smooth.par = NA, smooth.iter = NULL, smooth.sim = NULL,
  reflines = TRUE, reflines.se = FALSE,
  ylim = TRUE, ylimfac = c(4, 3), ylimext = 0.1,
  plext = getUserOption("plext"), yaxp = NULL,
  lty = c(1, 2, 5, 3, 4, 6, 1, 1), lwd = c(1, 1, 2, 1, 1.5, 1, 1, 1),
  colors.ra = getUserOption("colors.ra"),
  colors.smgrp = getUserOption("colors"), smooth.pale = 0.2,
  main = NULL, cex.title = NULL, xlabs = NULL, ylabs = NULL,
  mf = TRUE, mfcol = FALSE, multnrow = 0, multncol = 0, oma = NULL,

  fit = TRUE, hat = TRUE, stresiduals = TRUE)

Arguments

x

regr object (result of a call to regr). This is the only argument that is needed. All others have useful defaults.

formula, data, rawvars

see ?plot.regr

smooth.group

grouping factor. If given, smooth will be drawn for each group rather than for the whole dataset.

weights, plweights

if TRUE (or NULL or NA), x$weights will be used if available as weights for calculating smooths and optionally be used to plot weighted residuals against it, and as sizes of symbols that show the data (residuals), respectively. Alternatively, a vector of weights can be specified. If FALSE, no weights will be used.

plab

labels of observations used to identify them, depending on markprop.

pch

plotting character to use for unlabeled points. Defaults to 3 (corresponding to a plus sign) for less that 100 observations, and to "." otherwise – unless residuals are of class condquant, when 15 (filled square) is used.

pcol

color(s) to use for points

cex.plab

character size for data labels

cex.pch

symbol size for data to be shown by pch

markprop

proportion of extreme residuals to be labeled. If all points should be labeled, let markprop=1.

glm.restype

type of residuals to be used for glm models. In addition to those allowed in residuals() for glm objects, type cond.quant is possible for (ungrouped) binary regression. See ?residuals.polr for an explanation. Warning: type "deviance" will not work with simulated smooths since NAs will emerge.

smresid

logical: Should residuals from smooth be used for 'tascale' and 'qq' plots?

jitter

amount of jitter to be used for plotting against factors

jitterbinary

will disappear

mbox

logical: For plotting residuals versus factors, should plmboxes be used?

partial.resid
cookdistlines

levels of Cook distance for which contours are plotted in the leverage plot

leveragelim

bound for leverages to be used in standardizing residuals and in calculation of standardized residuals from smooth (if smresid is TRUE).

smooth

if TRUE (or 1), smooths are added to the plots where appropriate. If ==2, smmooths to positive and negative residuals-from-smooth are also shown.

smooth.par

argument to the smooth function. In case of default smooth function, it is the argument span of loess

smooth.iter

if the loess smooth is used, this argument controls robustness of smooth. If ==0, least squares is used, otherwise, robust smoothing is, smooth.iter being the maximal number of iterations. Defaults to 0 if the family is binomial or multinomail, to 50 otherwise.

smooth.sim

number of simulated smooths added to each plot. If NULL (the default) 19 simulated smooths will be generated if possible and sensible (i.e., none if smooth.group is set).

reflines

logical: Should reference lines showing (approximately) constant response values be shown? If addcomp is TRUE, should component effects be shown?

reflines.se

logical: Should standard error bands be shown around reference lines?

ylim

Limits to be used for vertical axes for setting an "inner plotting range". Can be a vector of length 2 or a matrix with columns giving the ranges for each plot. [needs more explanation.] !!! If TRUE, they will be determined in the default way, using robrange.

ylimfac

factor to be used for determining the (default) inner plotting range, see ?robrange

ylimext

extension of the inner plotting range that determines the outer plotting range

plext

extension factors for the four sides of the plots, producing a "padding" area around the plotted points. This corresponds to setting par(xaxs="e", yaxs="e"), but allows to set different values for the 4 sides.

yaxp

axis parameters for the vertical axis, as in ?par.

lty, lwd, colors.ra

three vectors of length 9 each, defining the line types, line widths, and colors to be used for ...

[1]

observations;

[2]

reference lines;

[3]

smooth;

[4]

simulated smooths;

[5]

component effects in plresx;

[6]

confidence bands of component effects.

In the case of glm.restype="cond.quant"

[7]

(random) observations;

[8]

conditional medians;

[9]

bars showing conditional quantiles.

colors.smgrp

colors to be used for distinguishing groups as specified by smooth.group

smooth.pale

paling applied to the color(s) of the smooth lines to distinuish simulated lines from the line corresponding to the data

main

main title to be used on each page, defaults to the formula of object. If main starts by ":", this colon is dropped and the formula is appended to the remainder. If getUserOption("doc") is $>1$, then the tit attribute of x (see tit) is printed on a separate line.

cex.title

character size for title

xlabs

labels for x variables. Defaults to vars

ylabs

labels for vertical axes

mf

vector of 2 elements, indicating the number of rows and columns of panels on each plot page. Defaults to c(2,2), except for multivariate models, where it adjusts to the number of target variables. mf=c(1,1) or mf=1 asks for a single frame per page. mf=NA or mf=0 leaves the framing (and oma) unchanged.

mfcol

if TRUE, the panel will be filled columnwise

multnrow, multncol

number of rows and columns of panels on one page, for residuals of multivariate regression only

oma

vector of length 4 giving the number of lines in the outer margin. If it is of length 2, they refer to top an right margins.

fit, hat, stresiduals

logicals: should these items be generated?

Value

A list containing all the items needed to specify plotting in plot.regr and plresx

Note

This function is not explicitly called by the user, but by plot.regr and plresx. All the arguments specified here can and should be given as arguments to these functions.

Author(s)

WS

See Also

plot.regr and plresx

Examples

1
2
3
4
5
6
7
8
data(d.blast)
( r.blast <-
  regr(log10(tremor)~location+log10(distance)+log10(charge), data=d.blast) )

plargs <- plotregr.control(r.blast, formula = ~.+distance, rawvars=FALSE,
smooth.group = location )
showd(plargs$pldata)
names(plargs)

regr0 documentation built on May 2, 2019, 4:52 p.m.