plregr.control: Further Arguments to 'plregr'

plregr.controlR Documentation

Further Arguments to plregr

Description

Specify some arguments of minor importance for the function plregr

Usage

plregr.control(x, data = NULL, xvar = TRUE, transformed = FALSE,
  weights = NULL, stdresid = TRUE, mar = NULL,
  glm.restype = "working", condquant = TRUE, smresid = TRUE,
  partial.resid = NULL, addcomp = NULL, cookdistlines = NULL,
  leveragelimit = NULL, condprob.range = NULL,
  testlevel = 0.05,
  refline = TRUE, 
  smooth = 2, 
  smooth.sim = NULL,
  xlabs = NULL, reslabs = NULL, markextremes = NULL,
  mf = TRUE, mfcol = FALSE, multnrow = 0, multncol = 0, marmult = NULL,
  oma = NULL, assign = TRUE, ...)

Arguments

x

an object (result of a call to a model fitting function such as lm, glm, .... This is the only argument that is needed. All others have useful defaults.

data

see ?plregr

xvar

variables for which residuals shall be plotted. Either a formula like ~ x1 + x2 or a character vector of names. Defaults to all variables (or terms, see transformed) in the model.

transformed

see ?plregr

weights

logical: should residuals be plotted against weights? Used in plresx.

stdresid

logical: should leverages and standardized residuals be calculated? This is avoided for plresx

mar

plot margins

glm.restype

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

condquant

logical: should conditional quantiles be shown for censored observations, binary and ordered responses?

smresid

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

partial.resid, addcomp

logical, synonyms: Should component effects be added to the residuals? This leads to what some authors call "partial residual plot".

cookdistlines

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

leveragelimit

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

condprob.range

numeric vector of length 2. In the case of residuals of class condquant, quartile bars are only drawn for residuals with probability between condprob.range[1] and condprob.range[1]. Default is c(0.05,0.8) for less than 50 observations, and c(0,0), suppressing the bars, otherwise.

testlevel

level for statistical tests

refline

logical: should reference line be shown? If refline==2, a confidence band be drawn for the component effects

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.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).

xlabs

labels for x variables. Defaults to vars

reslabs

labels for vertical axes

markextremes

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

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

marmult

plot margins for scatterplot matrices in the case of multivariate regression

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.

assign

logical: should the result of pl.control be assigned to the pl.envir environment? This will be done for high level pl functions, but avoided for low level ones. It allows for reusing the settings and helps debug unexpected behavior.

...

further arguments in the call, to be ignored by 'plotregr.control'

Value

A list containing all the items needed to specify plotting in plregr and plresx

Note

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

Author(s)

Werner A. Stahel, Seminar for Statistics, ETH Zurich

See Also

plregr and plresx

Examples

data(d.blast)
( r.blast <-
  lm(log10(tremor)~location+log10(distance)+log10(charge), data=d.blast) )

plargs <- plregr.control(r.blast, formula = ~.+distance, transformed=TRUE,
smooth.group = location )
showd(plargs$pdata)
names(plargs)


plgraphics documentation built on Oct. 19, 2023, 3 p.m.