Summary method for R object of class "lmrob" and print method for the summary object.

Further, methods fitted(), residuals() work (via the default methods), and predict() (see predict.lmrob, vcov(), weights() (see weights.lmrob), model.matrix(), confint(), dummy.coef(), hatvalues(), etc., have explicitly defined lmrob methods. .lmrob.hat() is the lower level “work horse” of the hatvalues() method.

<!-- % all source in   ../R/lmrob.R &lt;&lt;&lt; -->
# S3 method for class 'lmrob'
summary(object, correlation = FALSE,
        symbolic.cor = FALSE, ...)
# S3 method for class 'summary.lmrob'
print(x, digits = max(3, getOption("digits") - 3),
      symbolic.cor= x$symbolic.cor,
      signif.stars = getOption("show.signif.stars"),
      showAlgo = TRUE, ...)

# S3 method for class 'lmrob'
vcov(object, cov = object$control$cov, complete = TRUE, ...)
# S3 method for class 'lmrob'
model.matrix(object, ...)

<!-- % not yet -->
<!-- % .lmrob.hat(x, w = rep(1, NROW(x)), wqr = qr(sqrt(w) * x)) -->

Arguments

object

an R object of class lmrob, typically created by lmrob.

correlation

logical variable indicating whether to compute the correlation matrix of the estimated coefficients.

symbolic.cor

logical indicating whether to use symbols to display the above correlation matrix.

x

an R object of class summary.lmrob, typically resulting from summary(lmrob(..),..).

digits

number of digits for printing, see digits in options.

signif.stars

logical variable indicating whether to use stars to display different levels of significance in the individual t-tests.

showAlgo

optional logical indicating if the algorithmic parameters (as mostly inside the control part) should be shown.

cov

covariance estimation function to use, a function or character string naming the function; robustbase currently provides ".vcov.w" and ".vcov.avar1", see Details of lmrob. Particularly useful when object is the result of lmrob(.., cov = "none"), where

  object$cov <- vcov(object, cov = ".vcov.w")

allows to update the fitted object.

complete

(mainly for R >= 3.5.0:) logical indicating if the full variance-covariance matrix should be returned also in case of an over-determined system where some coefficients are undefined and coef(.) contains NAs correspondingly. When complete = TRUE, vcov() is compatible with coef() also in this singular case.

...

potentially more arguments passed to methods.

Value

summary(object) returns an object of S3 class "summary.lmrob", basically a list with components "call", "terms", "residuals", "scale", "rweights", "converged", "iter", "control" all copied from object, and further components, partly for compatibility with summary.lm,

coefficients

a matrix with columns "Estimate", "Std. Error", "t value", and "PR(>|t|)", where "Estimate" is identical to coef(object). Note that coef(<summary.obj>) is slightly preferred to access this matrix.

df

degrees of freedom, in an lm compatible way.

sigma

identical to sigma(object).

aliased

..

cov

derived from object$cov.

r.squared

robust “R squared” or \(R^2\), a coefficient of determination: This is the consistency corrected robust coefficient of determination by Renaud and Victoria-Feser (2010).

adj.r.squared

an adjusted R squared, see r.squared.

References

Renaud, O. and Victoria-Feser, M.-P. (2010). A robust coefficient of determination for regression, Journal of Statistical Planning and Inference 140, 1852-1862.

Examples

mod1 <- lmrob(stack.loss ~ ., data = stackloss)
sa <- summary(mod1)  # calls summary.lmrob(....)
sa                   # dispatches to call print.summary.lmrob(....)
#> 
#> Call:
#> lmrob(formula = stack.loss ~ ., data = stackloss)
#>  \--> method = "MM"
#> Residuals:
#>       Min        1Q    Median        3Q       Max 
#> -10.50974  -1.43819  -0.09134   1.02503   7.23113 
#> 
#> Coefficients:
#>              Estimate Std. Error t value Pr(>|t|)    
#> (Intercept) -41.52462    5.29780  -7.838 4.82e-07 ***
#> Air.Flow      0.93885    0.11743   7.995 3.68e-07 ***
#> Water.Temp    0.57955    0.26296   2.204   0.0416 *  
#> Acid.Conc.   -0.11292    0.06989  -1.616   0.1246    
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Robust residual standard error: 1.912 
#> Multiple R-squared:  0.9593,	Adjusted R-squared:  0.9521 
#> Convergence in 17 IRWLS iterations
#> 
#> Robustness weights: 
#>  observation 21 is an outlier with |weight| = 0 ( < 0.0048); 
#>  2 weights are ~= 1. The remaining 18 ones are summarized as
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>  0.1215  0.8757  0.9428  0.8721  0.9797  0.9978 
#> Algorithmic parameters: 
#>        tuning.chi                bb        tuning.psi        refine.tol 
#>         1.548e+00         5.000e-01         4.685e+00         1.000e-07 
#>           rel.tol         scale.tol         solve.tol          zero.tol 
#>         1.000e-07         1.000e-10         1.000e-07         1.000e-10 
#>       eps.outlier             eps.x warn.limit.reject warn.limit.meanrw 
#>         4.762e-03         1.692e-10         5.000e-01         5.000e-01 
#>      nResample         max.it       best.r.s       k.fast.s          k.max 
#>            500             50              2              1            200 
#>    maxit.scale      trace.lev            mts     compute.rd fast.s.large.n 
#>            200              0           1000              0           2000 
#>                   psi           subsampling                   cov 
#>            "bisquare"         "nonsingular"         ".vcov.avar1" 
#> compute.outlier.stats 
#>                  "SM" 
#> seed : int(0) 

## correlation between estimated coefficients:
cov2cor(vcov(mod1))
#>             (Intercept)   Air.Flow  Water.Temp  Acid.Conc.
#> (Intercept)   1.0000000 -0.1918251 -0.62235475 -0.15451274
#> Air.Flow     -0.1918251  1.0000000 -0.21953075 -0.72959532
#> Water.Temp   -0.6223548 -0.2195308  1.00000000 -0.06605232
#> Acid.Conc.   -0.1545127 -0.7295953 -0.06605232  1.00000000
#> attr(,"weights")
#>         1         2         3         4         5         6         7         8 
#> 0.8117941 0.8732020 0.6748579 0.1215253 0.9364784 0.8841442 0.9705456 0.9997921 
#>         9        10        11        12        13        14        15        16 
#> 0.9494262 0.9973437 0.9881843 0.9993914 0.7747917 0.9491294 0.8830017 0.9815868 
#>        17        18        19        20        21 
#> 0.9977769 0.9939863 0.9739933 0.9358532 0.0000000 
#> attr(,"eigen")
#> eigen() decomposition
#> $values
#> [1] 2.809410e+01 4.572611e-02 1.463952e-02 1.339274e-05
#> 
#> $vectors
#>              [,1]        [,2]         [,3]        [,4]
#> [1,]  0.999510765 -0.02812919 -0.009497106 0.009837858
#> [2,] -0.004239886  0.30288779 -0.787802695 0.536290897
#> [3,] -0.030921157 -0.95232597 -0.236365500 0.190395596
#> [4,] -0.002033497  0.02330210  0.568689783 0.822219440
#> 

cbind(fit = fitted(mod1), resid = residuals(mod1),
      wgts= weights(mod1, type="robustness"),
      predict(mod1, interval="prediction"))
#> Warning: Predictions on current data refer to _future_ responses
#>          fit        resid      wgts       fit       lwr      upr
#> 1  39.180906   2.81909443 0.8117941 39.180906 31.693270 46.66854
#> 2  39.293827  -2.29382740 0.8732020 39.293827 31.725344 46.86231
#> 3  33.214651   3.78534941 0.6748579 33.214651 26.954348 39.47495
#> 4  20.768873   7.23112663 0.1215253 20.768873 15.901402 25.63635
#> 5  19.609767  -1.60976694 0.9364784 19.609767 15.118053 24.10148
#> 6  20.189320  -2.18932016 0.8841442 20.189320 15.538935 24.83970
#> 7  20.091342  -1.09134242 0.9705456 20.091342 15.323545 24.85914
#> 8  20.091342  -0.09134242 0.9997921 20.091342 15.323545 24.85914
#> 9  16.433939  -1.43393878 0.9494262 16.433939 11.904498 20.96338
#> 10 14.326625  -0.32662548 0.9973437 14.326625  9.926107 18.72714
#> 11 13.310329   0.68967095 0.9881843 13.310329  9.035506 17.58515
#> 12 12.843698   0.15630234 0.9993914 12.843698  8.414451 17.27294
#> 13 14.100782  -3.10078183 0.7747917 14.100782  9.762828 18.43874
#> 14 13.438195  -1.43819497 0.9491294 13.438195  9.185574 17.69082
#> 15  5.799566   2.20043370 0.8830017  5.799566  1.284572 10.31456
#> 16  6.138332   0.86166823 0.9815868  6.138332  1.770507 10.50616
#> 17  8.298791  -0.29879054 0.9977769  8.298791  4.053025 12.54456
#> 18  7.508338   0.49166223 0.9939863  7.508338  3.343199 11.67348
#> 19  7.974969   1.02503084 0.9739933  7.974969  3.752523 12.19742
#> 20 13.382198   1.61780243 0.9358532 13.382198  9.224451 17.53994
#> 21 25.509736 -10.50973597 0.0000000 25.509736 20.377911 30.64156

data(heart)
sm2 <- summary( m2 <- lmrob(clength ~ ., data = heart) )
#> Warning: find_scale() did not converge in 'maxit.scale' (= 200) iterations with tol=1e-10, last rel.diff=0
sm2
#> 
#> Call:
#> lmrob(formula = clength ~ ., data = heart)
#>  \--> method = "MM"
#> Residuals:
#>      Min       1Q   Median       3Q      Max 
#> -9.88238 -1.75544 -0.09021  0.81805  5.63795 
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)
#> (Intercept)  30.3033    62.6170   0.484    0.640
#> height       -0.1372     2.1246  -0.065    0.950
#> weight        0.3136     0.7346   0.427    0.679
#> 
#> Robust residual standard error: 2.59 
#> Multiple R-squared:  0.8671,	Adjusted R-squared:  0.8376 
#> Convergence in 36 IRWLS iterations
#> 
#> Robustness weights: 
#>  3 weights are ~= 1. The remaining 9 ones are
#>      2      3      4      5      6      7      8      9     11 
#> 0.9887 0.9299 0.9608 0.9082 0.9262 0.9963 0.1134 0.9665 0.6149 
#> Algorithmic parameters: 
#>        tuning.chi                bb        tuning.psi        refine.tol 
#>         1.548e+00         5.000e-01         4.685e+00         1.000e-07 
#>           rel.tol         scale.tol         solve.tol          zero.tol 
#>         1.000e-07         1.000e-10         1.000e-07         1.000e-10 
#>       eps.outlier             eps.x warn.limit.reject warn.limit.meanrw 
#>         8.333e-03         1.701e-10         5.000e-01         5.000e-01 
#>      nResample         max.it       best.r.s       k.fast.s          k.max 
#>            500             50              2              1            200 
#>    maxit.scale      trace.lev            mts     compute.rd fast.s.large.n 
#>            200              0           1000              0           2000 
#>                   psi           subsampling                   cov 
#>            "bisquare"         "nonsingular"         ".vcov.avar1" 
#> compute.outlier.stats 
#>                  "SM" 
#> seed : int(0)