[R-sig-Geo] Weighted linear regression

Jean-Paul Kibambe Lubamba jean-paul.kibambe at uclouvain.be
Tue Sep 2 15:20:39 CEST 2008


Hi,

I am trying to explain some of my variables using a weighted linear
regression, with x and y-coordinates as my explanatory variables.

For example, I want to explain my variable 'agri' in the following way :
agri = x + y + x*y+ x^2 + y^2 where x and y are my coordinates and the
regression must be weighted by the variance.

How can I do it ? Thanks in advance !

JP

For illustration, here is a part of my database (var_agri = variance)

    agri	     se_agri	var_agri	   x	         y
1  -1.04E-05  4.47E-06	2.00E-11	  23.78230555	2.968836238
2  -1.01E-05  4.36E-06	1.90E-11	  26.05798185	4.476217345
3  -9.47E-06  4.55E-06	2.07E-11	  30.5248107	3.058706843
4  -1.00E-05  4.22E-06	1.78E-11	  26.97325452	0.737615804
5  -9.96E-06  3.74E-06	1.40E-11	  17.67392327	-3.908029603
6  -1.05E-05  4.44E-06	1.97E-11	  25.92926863	3.114662312
7  -1.01E-05  4.35E-06	1.89E-11	  25.4312434	1.572565497
8  -6.54E-06  4.38E-06	1.92E-11	  20.07104333	1.048456276
9  -9.65E-06  4.38E-06	1.91E-11	  23.92598192	1.728975609
10 -7.39E-06  4.20E-06	1.76E-11	  21.2291592	0.489260168




More information about the R-sig-Geo mailing list