Description Details Author(s) References See Also Examples
This package helps to perform efficient model building for many kinds
of regression models, including (generalized) linear, robust linear,
ordinal (aka polr
) etc.
It also contains some useful utility functions.
Package:  regr 
Type:  Package 
Date:  >= 20080820 
License:  GPL 
LazyLoad:  yes 
The principal function regr()
allows fitting regression
models of many types by calling wellknown R functions for
Ordinary linear regression,
logistic, Poisson, other generalized linear models, also for
ordinal or nominal response variable.
The output of the function is somewhat different from the output of the
base R functions lm
, glm
, polr
etc. – it should
be more informative for the task of model building.
The next most important function is the plot
method for results
of regr
(see plot.regr
), which gives more complete
regression diagnostic plots than the specific plot methods of the
mentioned “base” R functions.
An important part of residual analysis which is often neglected is
plotting residuals versus explanatory variables, often called term
plots. This is part of plot.regr
, but can also be called
independently by calling plresx
.
If a regr
result is printed, the output is more informative than
the classical tables.
The package contains the methods for the usual extractor functions, like
residuals
, predict
, ..., as well as for drop1
,
add1
, etc, ...
The package contains a number of additional functions that should be useful for efficient data analysis. They include
plresx()
to plot residuals against explanatory variables,
plres2x()
to produce a plot showing interactions between two
continuous regressors,
plmatrix()
, a version of pairs
that
displays any rectangular scatterplot matrix and can also be used to
produce the full usual quadratic scatterplot matrix for many variables
in appropriate junks with panels that are still large enough to be useful.
The package also includes some additional utility functions, like
logst()
for log transformation of variables with zeros,
showd()
for printing a "representative" part of a dataset.
For documenting the steps of the data analysis, there are several documenting functions:
tit
and doc
add attributes to data and results, which
should allow for tracing the history of these objects (not yet
thoroughly implemented).
stamp
adds tracking information to plots, consisting of a project
title, a step label, and the date when the plot is produced.
Some default options are added to options
to reflect user
preferences for output, see the help entries for
stamp
.
Werner A. Stahel, ETH Zurich, [email protected]
More information is available at http://stat.ethz.ch/~stahel/regression
The car package.
1 2  r.savings < regr(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
plot(r.savings)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.