lmrob..D..fit.RdThis function calculates a Design Adaptive Scale estimate
for a given MM-estimate. This is supposed to be a part of a chain of
estimates like SMD or SMDM.
lmrob..D..fit(obj, x=obj$x, control = obj$control,
mf,
method = obj$control$method)lmrob-object based on which the estimate is to be
calculated.
the design matrix; if missing, the method tries
to get it from obj$x and if this fails from obj$model.
list of control parameters, as returned
by lmrob.control.
defunct.
optional; the method used for obj computation.
This function is used by lmrob.fit and typically not to
be used on its own. Note that lmrob.fit() specifies
control potentially differently than the default, but does use
the default for method.
The given lmrob-object with the following elements updated:
The Design Adaptive Scale estimate
TRUE if the scale calculation converged,
FALSE other.
Koller, M. and Stahel, W.A. (2011), Sharpening Wald-type inference in robust regression for small samples, Computational Statistics & Data Analysis 55(8), 2504–2515.
data(stackloss)
## Compute manual SMD-estimate:
## 1) MM-estimate
m1 <- lmrob(stack.loss ~ ., data = stackloss)
## 2) Add Design Adaptive Scale estimate
m2 <- lmrob..D..fit(m1)
print(c(m1$scale, m2$scale))
#> [1] 1.912355 2.650919
summary(m1)
#>
#> 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)
summary(m2) ## the covariance matrix estimate is also updated
#>
#> Call:
#> lmrob(formula = stack.loss ~ ., data = stackloss, method = "SMD")
#> \--> 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.5246 9.3676 -4.433 0.000365 ***
#> Air.Flow 0.9388 0.1230 7.636 6.84e-07 ***
#> Water.Temp 0.5796 0.3348 1.731 0.101505
#> Acid.Conc. -0.1129 0.1231 -0.917 0.371736
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Robust residual standard error: 2.651
#> 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)