You can use a likelihood ratio test when the model is fitted by maximum likelihood (indeed, you need the likelihood under the null and alternative).
In the cases where the estimator you use does correspond to ML for some distributional assumption, under that same assumption you could generally get a likelihood ratio test.
In the case of M-estimators, it depends on the M-estimator. For example, a Huber M-estimator corresponds to ML for a particular distribution (one with a normal center and exponential tails) but the Hampel 3-part redescending M-estimator doesn't.
Note that this would assume either a known scale or a consistent estimator of it (which I think by applying Slutsky's theorem would then leave us still with the usual asymptotics for the LR test).
Even in cases where you use an estimator which wouldn't correspond to an ML estimator there are often tests that should have fairly good properties. In many cases, one could choose a permutation test based on some robust estimator, for example. In cases where you're testing all the regression coefficients at once, that should yield a distribution-free test. In the cases where you're only testing some of them, I think you would have an approximate test (you don't get exchangeability of residuals under the null -- except perhaps asymptotically, if your estimator is consistent). Alternatively, in many cases a parameter estimate might be shown to be asymptotically normal and so give a large sample test.
There's also the possibility that you might use a bootstrap test in large samples; I think that should work pretty well with the Huber psi function.
Note that even when a likelihood ratio test is possible, I'm not at all sure that rlm
will return a (log-)likelihood (or something from which you can easily compute it) -- you might have to evaluate the (log-)likelihood yourself. I haven't checked that it doesn't though.
rlm
you're using is in? Do you mean the one inMASS
? Further, your code isn't reproducible (since we don't have your x and y) -- a small reproducible example might be useful for potential answerers to illustrate their answers. $\endgroup$