[RsR] Maximum number of variables with lmRob? Error: singular matrix encountered

Andreas Alfons @ndre@@@@||on@ @end|ng |rom ku|euven@be
Sun Aug 26 20:16:13 CEST 2012


On Sun, Aug 26, 2012 at 4:18 PM, Fabricio Vasselai
<fabriciovasselai using gmail.com> wrote:
> Thank you very much for the fast reply.
>
> What info about the dataset would be helpful to figure out what's going on
> about that error message? I am using a dataset wth N = 602, with
> information political institution in countries. Variables are almost all
> continuous and a few are binary. I am running two interation terms in the
> models. I'll be more than happy to provide any needed info.

Without a fully reproducible example (data + code), I'm afraid there's
not much anybody can really do to help you.  If your data are
confidential, please try to reproduce the error with simulated data.

-Andreas


> 2012/8/26 Kaveh Vakili <kaveh.vakili using wis.kuleuven.be>
>
>>
>>
>> whatever it is, it is specific to the dataset you are using, not the
>> software:
>>
>> library(robust)
>> p<-20
>> n<-200
>> x<-matrix(rnorm(n*p),n,p)
>> b<-rnorm(p+1)
>> y<-cbind(1,x)%*%b+rnorm(n)
>> lmRob(y~x)
>>
>>
>> you should therefore provide more informations about the dataset,
>>
>>
>>
>>
>>
>>
>> On 08/26/2012 07:33 AM, Fabricio Vasselai wrote:
>>
>>> Dear list,
>>>
>>> I've been trying different models with lmRob for the past days and I was
>>> wondering: is there a maximum number of variables to include in a model so
>>> to avoid the following error in lmRob?
>>> The error message is:
>>>
>>> Error in lmRob.fit.compute(x2, y, x1 = x1, x1.idx = x1.idx, nrep = nrep,
>>>  :
>>>    Singular matrix encountered.Erro em ans[[i]]$call : $ operator is
>>>
>>> invalid for atomic vectors
>>>
>>>
>>> It seems to me that there is a limit of 14 independent variables plus the
>>> intercept. It can run any combination of variables in any dataset I try,
>>> as
>>> far as final parameters are not beyond this limit.
>>> Is it right? I did not find information about this yet. Is there a way to
>>> go beyond this number of variables?
>>>
>>> Thanks in advance!
>>> Best,
>>>
>>> FABRICIO
>>>
>>>         [[alternative HTML version deleted]]
>>>
>>> ______________________________**_________________
>>> R-SIG-Robust using r-project.org mailing list
>>> https://stat.ethz.ch/mailman/**listinfo/r-sig-robust<https://stat.ethz.ch/mailman/listinfo/r-sig-robust>
>>>
>>
>> ______________________________**_________________
>> R-SIG-Robust using r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-sig-robust<https://stat.ethz.ch/mailman/listinfo/r-sig-robust>
>>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Robust using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-robust



-- 
Andreas Alfons
Faculty of Business and Economics, KU Leuven
www.econ.kuleuven.be/andreas.alfons/public/




More information about the R-SIG-Robust mailing list