Skip to content
Prev 17563 / 398502 Next

query on lqs

On Sat, 2 Mar 2002 markhall at gol.com wrote:

            
That is what bestone does return.   It's on my agenda to document the lqs
return values, but I started with the commoner ones like lm!  In any case,
you have the code to read.

For example

     data(stackloss)
     set.seed(123)
     (fit <- lqs(stack.loss ~ ., data = stackloss))
[1]  7 10 11 15

That is the list of points used for the best fit found.  It always tries
subsets of size p.

lm (stack.loss ~ ., data = stackloss, subset = fit$bestone)

is slightly different: see the lqs help page for why.