6
$\begingroup$

I'm running some regression analyses and got pretty confused about R's output when it comes to robust regression models. When I run a OLS -- using the command lm() -- I get this as output:

Coefficients:

                Estimate Std. Error t value Pr(>|t|)

But when I run a robust linear model using the rlm() command, the output looks like so:

Coefficients:

                Value   Std. Error t value

How do I get the p-values and the significance-levels in an rlm then? Without that, the whole analysis is somewhat pointless. Unfortunately, I couldn't find an answer to that anywhere, so I hope someone around here can help me out. Thanks a lot!!

$\endgroup$
2
  • $\begingroup$ add some data you model, add the model you test, read that [stackoverflow.com/questions/5963269/… $\endgroup$ Commented Mar 30, 2016 at 5:24
  • $\begingroup$ Another option is robustbase::lmrob() which reports p-values. $\endgroup$
    – kakarot
    Commented Oct 29 at 16:51

1 Answer 1

14
$\begingroup$

The sfsmisc package offers a helpful function for conducting a Wald test:

library(MASS)
library(sfsmisc)
summary(rsl <- rlm(stack.loss ~ ., stackloss))
#Call: rlm(formula = stack.loss ~ ., data = stackloss)
#Residuals:
#     Min       1Q   Median       3Q      Max 
#-8.91753 -1.73127  0.06187  1.54306  6.50163 
#
#Coefficients:
#            Value    Std. Error t value 
#(Intercept) -41.0265   9.8073    -4.1832
#Air.Flow      0.8294   0.1112     7.4597
#Water.Temp    0.9261   0.3034     3.0524
#Acid.Conc.   -0.1278   0.1289    -0.9922
#
#Residual standard error: 2.441 on 17 degrees of freedom

f.robftest(rsl, var = "Air.Flow")
#   robust F-test (as if non-random weights)
#
#data:  from rlm(formula = stack.loss ~ ., data = stackloss)
#F = 50.879, p-value = 1.677e-06
#alternative hypothesis: true Air.Flow is not equal to 0

f.robftest(rsl, var = "Acid.Conc.")
#   robust F-test (as if non-random weights)
#
#data:  from rlm(formula = stack.loss ~ ., data = stackloss)
#F = 1.0447, p-value = 0.3211
#alternative hypothesis: true Acid.Conc. is not equal to 0
$\endgroup$
8
  • $\begingroup$ Thank you very much for your comment Roland! That helps a lot. It still makes me wonder if that is the only way to do it - it feels a bit like a workaround since I think the significance is an important aspect of the regression output. Are there other commands that provide the significance for all coefficients more conveniently? Thanks again for your answer and your help! $\endgroup$
    – RJW
    Commented Mar 30, 2016 at 15:59
  • $\begingroup$ "since I think the significance is an important aspect of the regression output" Many statisticians disagree. $\endgroup$
    – Roland
    Commented Mar 30, 2016 at 18:51
  • 2
    $\begingroup$ Thanks for your link. I still wonder if there is a way of getting a regression table that includes conveniently the significance, like in an OLS. I can't imagine that this is such a unusual idea that nobody ever wanted that before, too. $\endgroup$
    – RJW
    Commented Apr 4, 2016 at 21:28
  • 1
    $\begingroup$ Can anyone comment on whether the standard inferential framework actually works out of the box for robust linear models, or whether these are omitted because the theoretical justification for using the standard approach is weak ... ? $\endgroup$
    – Ben Bolker
    Commented Jan 18, 2018 at 0:40
  • 2
    $\begingroup$ Following up on @BenBolker comment I found this useful. stat.ethz.ch/pipermail/r-help/2006-July/108659.html $\endgroup$ Commented Mar 4, 2019 at 23:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.