[R] GWR Predictions' standard deviation

Roger Bivand Roger.Bivand at nhh.no
Fri Oct 10 20:12:20 CEST 2008


Eduardo Marinho <eduardomarinho <at> gmail.com> writes:

> 
> 
> Dear all,
> 
> I would like to use a GWR model in order to spatially predict food
> insecurity in Africa. I have a georeferenced village data-bases and I've run
> a "classic" regression model (taking into account the spatial dependence of
> the errors) that works fairly well for Niger that is a quite homogenous
> country. Now, I would like to make the same thing for countries where it
> should be some heterogeneity in the spatial process, so I think it is
> essential to use a GWR. 
> 
> The problem comes when I try to get the standard deviation of my predicted
> values (not of my estimated coefficients). Indeed, this function seems not
> to be available in R or in any other software that runs GWR (I've checked
> for STATA and Matlab also). Does somebody know if there is any package that
> calculates that? If not, I would be interested to get some ideas about how
> can I program it in R.

There has been a thread on this on the R-sig-geo list recently (this month),
perhaps you could join that discussion? Since the chief aim of GWR 
(geographically weighted regression) is to explore variation in local 
coefficient estimates as an aid in resolving model misspecification, would
it be sensible to try to handle the heterogeneity in some other way, leaving
GWR as a last resort?

The gwr() function in the spgwr package does not return the weighted lm fits
that you would need to predict from. An argument could be added to the function
to do this, but it involves coding, though not coding from scratch.

Roger Bivand



> 
> Thank you very much,
> 
> Eduardo.



More information about the R-help mailing list