[R-sig-Geo] R-help:spgwr

Roger Bivand Roger.Bivand at nhh.no
Wed Aug 31 10:25:26 CEST 2016


On Wed, 31 Aug 2016, Mengjie Zhou wrote:

> Hi,
>
> Sorry for the interruption.
>
> I have a few problems about geographically weighted regression when 
> using the gwr function (in the"spgwr" package). Could you help me to 
> solve these problems or give some references? Thank you very much for 
> your time!
>
> The function will return a list of class "gwr".
>
>
> In the "SDF", what are the meaning of these attributes list below?

As in everything else, the only authoritative guide is to read the source 
code of the function. There, in .GWR_int() in R/gwr.R you see:

line 494		sum.w[i] <- sum(w.i)

(sum of weights for the i'th fit point)

lines 500-502
                 if (GWR_args$predictions) {
                     pred[i] <- sum(predx[i,] * betas[i,])
                 }

(the value of "predictions" depends on combinations of your input 
arguments, so pred are predictions at fit points, but why they are 
returned depends on the complete command you entered).

Always include a working, reproducible example from a built-in data set.

Hope this clarifies,

Roger


>
> "sum.w"
>
>
> "pred"
>
>
> Thank you again for your time??????
>
>
> Best wishes??????
> 	[[alternative HTML version deleted]]

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://depsy.org/person/434412



More information about the R-sig-Geo mailing list