[S] How to use ltsreg()

Arman Maghbouleh (arman@csli.stanford.edu)
Thu, 3 Sep 1998 18:34:09 -0700

Hello, I read the recent discussion, Jan. '98, on robust regression
with great interest and am now trying to use least trimmed squares
regression in my work. Unfortunately, I have been unable to understand
the workings of ltsreg().

Here is a simple example using Splus Version 3.4 Release 1 for

> tempx <- 1:9
> tempy <- tempx+rnorm(10, sd=0.4); tempy[6:9] <- rnorm(4, sd=0.4)
> tempy
[1] 0.93479701 1.81926048 2.89615830 3.99846428 4.69133178 0.08691728
[7] 0.48187224 -0.06108673 0.32327048
> ltsreg(tempx, tempy, intercept = F)
[1] 0.9653861
[1] 0.01010092

[1] 3 3

[1] 65

My questions are:
1. Isn't the fit objective based on 6 observations? (from the help
page: quan=floor(n/2)+floor((k+1)/2) with n=10, k=1, quan==6 here)?

2. If yes, to the above, how does one get at those 6 observations?

3. I assumed the $stock component would contain those six
points. However, it seems the fit is defined by the third point alone
(model$stock[[1]]==c(3,3) and tempy[3]/tempx[3]==model$coefficients,
that is, 2.89615830/3== 0.9653861). What is the relation of $stock to
the six observations supposedly used in making the fit? Why does
stock contain two copies of 3?

4. Most importantly, in my application, I have some idea which points
are likely to be unreliable. I want to direct ltsreg() to be more
willing to discount those observations which I know are less
reliable. (I thought may be this could be done by possibly having the
regression routine in ltsreg() perform a weighted regression with less
weight on the unreliable points but the relevant code seems hidden in
a Fortran call.) Any ideas?

5. In general, my addled brain could not make sense of the terse help page
description of the algorithm. Is there any reference other than Burns
(1992) which may be useful?

I will post a summary of any replies directed specifically to me.

Many thanks,
Arman Maghbouleh.

This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news