Description Usage Arguments Details Value Author(s) See Also Examples
'regr' fits regression models of various types: ordinary, robust, quantile, Tobit, logistic, generalized linear, multinomial, ordered response, multivariate, ...
It is a wrapper function which calls the respective S fitting functions and yields an extensive result, to be used by the respective print and plot methods.
1 2 3 4 5 6 7 8 9 10  regr(formula, data = NULL, tit = NULL, family = NULL, dist = NULL,
calcdisp = NULL, suffmean = 3, nonlinear = FALSE, start = NULL,
robust = FALSE, method = NULL,
subset = NULL, weights = NULL, na.action = nainf.exclude,
contrasts=getUserOption("regr.contrasts"),
model = FALSE, x = TRUE, termtable = TRUE, vif = TRUE,
factorNA = TRUE, testlevel = 0.05, hatlim=c(0.99,0.5), ...)
## S3 method for class 'regr'
summary(object, ...)

formula 
a symbolic description of the model to be fit. 
data 
data frame containing the variables in the model. 
tit 
title (becomes tit attribute of result) 
family 
character string describing the type of model and the
fitting procedure. By default, 
dist 
only used for survival regression if 
calcdisp 
a logical value indicating whether, for

suffmean 
!!! 
nonlinear 
if TRUE, a nonlinear model is expected, to be fitted
by 
start 
if 
robust 
if TRUE, robust fitting is used if a function is available, see Details. 
method 
"rq" or "quantreg" requires fitting by quantile
regression. Then, the argument 
subset 
an optional vector specifying a subset of observations to be
used in the fitting process. Names of variables in 
weights 
an optional vector of weights to be used for fitting. 
na.action 
a function which indicates what should happen when the data
contain 'NA's. The default is ' 
contrasts 
contrasts used for factors. Either a named list that
determines contrasts for each factor or a character vector of two
elements giving the names of the functions to be used for unordered
and ordered factors, respectively. See 
model, x 
logical values indicating whether the model frame or the model matrix, respectively, should be included as a component of the returned value. 
termtable 
if 
vif 
a logical value indicating whether the collinearity measure R2.j ahould be calculated 
factorNA 
a logical value indicating whether missing values in factors should be recoded by a respective level 
testlevel 
level for significance testing and confidence intervals 
hatlim 
bound for leverages to be used in standardizing residuals and calculation of standardized residuals from smooth 
... 
other argument to be passed to the fitting function 
object 
'summary.regr' simply returns its only argument

Robust fitting is available for ordinary linear models, by setting
robust = TRUE
.
By default, the function lmrob
from
package robustbase
is called with the argument setting="KS2011"
.
This default will be changed in future versions.
Alternative methods can be obtained by setting the method
argument. Choosing
method="rlm"
calls function rlm
from package MASS
with default method="MM"
.
Any further elements of method
will be passed on to the methods
argument of the called function.
The 'summary' generic function does nothing to 'regr' objects, since all useful information is already collected in the object.
regr
returns a list object of class regr
and secondary class as
produced by the fitting function. The components include generally
those of the results of the fitting function and its summary.
The important additional components are:
termtable 
data.frame,
table for testing terms both for single and mulitple
degree terms (continuous or binary explanatory variables and
factors).
The columns are
The 
allcoef 
All coefficients. This is a list with a component for
each term. Each component characterizes the coefficients similar to
the 
stres 
Standardized residuals 
sigma 
estimated standard deviation for normal errors, 
h 
leverage values 
allvars 
the variables used for fitting the model 
binfac 
levels of binary factors 
fitfun, funcall 
R function and call that has been used for fitting the model 
Werner A. Stahel, Seminar for Statistics, ETH Zurich
lm
, glm
, rlm
,
multinom
, polr
,...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34  data(d.blast)
( r.blast <
regr(log10(tremor)~location+log10(distance)+log10(charge), data=d.blast) )
## Anorexia
data(anorexia, package="MASS")
r.anorexia < regr(Postwt ~ Prewt + Treat + offset(Prewt),
data = anorexia)
## Annette Dobson (1990) "An Introduction to Generalized Linear Models".
## Page 9: Plant Weight Data.
ctl < c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt < c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
d.dob < data.frame(group = gl(2,10,20, labels=c("Ctl","Trt")),
weight = c(ctl, trt))
(r.dob < regr(weight ~ group, data=d.dob))
## multinomial regression
data(d.surveyenvir)
d.surveyenvir$dist.unordered < factor(as.character(d.surveyenvir$disturbance))
t.r < regr(dist.unordered~age+education+location, data=d.surveyenvir)
## ordered regression
## This example fails in the installation phase...
require(MASS) ## should not be needed
data(housing, package="MASS")
t.r < regr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
plot(t.r)
## multivariate regression
data(d.fossiles)
r.mregr <
regr(cbind(sAngle,lLength,rWidth)~SST.Mean+Salinity+lChlorophyll+region+N,
data=d.fossiles)

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