Hello,

I have encountered a problem which may be arising from details of my data and or the statistics I am trying to do, or may be arising due to the way leaps works internally. Unfortunately, I am not yet savvy enough to tell why.

I can say that this statement works (or at least works to the degree I expect):

b <- regsubsets(FUND~.,data=all, intercept=TRUE, nbest=1, nvmax=8, really.big=T, method="forward")

It does produce a warning:

Warning message:
In leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in = force.in,  :
  2  linear dependencies found

But I can appreciate that and can reduce my dataset to deal with it. However, if I use this command:

b <- regsubsets(FUND~.,data=all, intercept=FALSE, nbest=1, nvmax=8, really.big=T, method="forward")

I get the following:

Warning message:
In leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in = force.in,  :
  2  linear dependencies found
> b <- regsubsets(FUND~.,data=all, intercept=FALSE, nbest=1, nvmax=8, really.big=T, method="forward")
Reordering variables and trying again:
Error in if (any(index[force.out] == -1)) stop("Can't force the same variable in and out") :
  missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In leaps.setup(x, y, wt = wt, nbest = nbest, nvmax = nvmax, force.in = force.in,  :
  1  linear dependencies found
2: In sing$lindep[-1] & force.in :
  longer object length is not a multiple of shorter object length
3: In sing$lindep | c(FALSE, force.out) :
  longer object length is not a multiple of shorter object length

I can understand how the inclusion (or not) of an intercept can impact regression significance, but I am not exactly sure how to interpret this particular output and what may be going on in the background. Thanks in advance for any insights.


James McGrath


	[[alternative HTML version deleted]]

