[R] Error in solve.default(inf, tol = tol.solve) :

Uwe Ligges ligges at statistik.tu-dortmund.de
Sat Feb 5 19:18:59 CET 2011



On 04.02.2011 08:37, Marie-Line Glaesener wrote:
> Hello,
>
>
>
> I'm trying to run a lagsarlm (maximum likelihood estimation of a spatial lag model)  in the spdep library ; but R gives following error message:
>
>
>
> Error in solve.default(inf, tol = tol.solve) :
>
>    system is computationally singular: reciprocal condition number = 4.20137e-12

May we guess that you have almost perfectly correlated columns in your 
data - or factor levels with very few observations? Or many levels? But 
since we cannot know since we do not have your data. Read about how to 
invert matrices numerically and you will find that it is not easy if 
your matrix is almost singular.

Uwe Ligges



>
>
> I get the same message when I try to run de lagsarlm with a bigger data set (4333 regions).
>
>
>
> The command I used:
>
> TestLag<-lagsarlm( mean_price ~  transcount+  C1_5_1+ C1_5_2+ C1_5_3+ C1_5_4, data=DataB,transcecB.listw)
>
>
>
> summary(transcecB.listw)
>
> Characteristics of weights list object:
>
> Neighbour list object:
>
> Number of regions: 521
>
> Number of nonzero links: 2904
>
> Percentage nonzero weights: 1.069846
>
> Average number of links: 5.573896
>
> Link number distribution:
>
>
>
>    1   2   3   4   5   6   7   8   9  10  11  13
>
>    2  17  46  86 116 108  68  43  23   7   2   3
>
> 2 least connected regions:
>
> 12070513 12070504 with 1 link
>
> 3 most connected regions:
>
> 12060503 11040601 11020701 with 13 links
>
>
>
> Weights style: W
>
> Weights constants summary:
>
>      n     nn  S0       S1       S2
>
> W 521 271441 521 200.3434 2169.626
>
>
>
> If any further information is needed, please let me know.
>
>
>
> I hope this is the right platform to get some help in solving this problem.
>
>
>
> Best regards,
>
>
>
> Marie-Line Glaesener
>
>
>
> Phd. Student
>
> Unité de Recherche IPSE (Identités. Politiques, Sociétés, Espaces) Laboratoire de Géographie et Aménagement du Territoire
>
>
>
> UNIVERSITÉ DU LUXEMBOURG
>
> CAMPUS WALFERDANGE
>
> Route de Diekirch / BP 2
>
> L-7201 Walferdange
>
> Luxembourg
>
> www.geo.ipse.uni.lu<http://www.geo.ipse.uni.lu>
>
> 	[[alternative HTML version deleted]]
>
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list