plregr
Specify some arguments of minor importance for the function
plregr
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, ...)
A list containing all the items needed to specify plotting
in plregr
and plresx
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.
see ?plregr
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.
see ?plregr
logical: should residuals be plotted against weights?
Used in plresx
.
logical: should leverages and standardized residuals
be calculated? This is avoided for plresx
plot margins
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.
logical: should conditional quantiles be shown for censored observations, binary and ordered responses?
logical: Should residuals from smooth be used for 'tascale' and 'qq' plots?
logical, synonyms: Should component effects be added to the residuals? This leads to what some authors call "partial residual plot".
levels of Cook distance for which contours are plotted in the leverage plot
bound for leverages to be used in standardizing
residuals and in calculation of standardized residuals from smooth
(if smresid
is TRUE
).
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.
level for statistical tests
logical: should reference line be shown?
If refline==2
, a confidence band be drawn for the component
effects
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.
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).
labels for x variables. Defaults to vars
labels for vertical axes
proportion of extreme residuals to be labeled.
If all points should be labeled, let markextremes=1
.
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.
if TRUE, the panel will be filled columnwise
number of rows and columns of panels on one page, for residuals of multivariate regression only
plot margins for scatterplot matrices in the case of multivariate regression
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.
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'
Werner A. Stahel, Seminar for Statistics, ETH Zurich
plregr
and plresx
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)
Run the code above in your browser using DataLab