[R-sig-Geo] How to get the Coefficient of Determination in the results of GWR
Danlin Yu
yud at mail.montclair.edu
Thu May 13 17:14:00 CEST 2010
In addition (I guess this is where the problem is), the argument "adapt"
in gwr.sel() is not the same as the argument "adapt" in gwr(). The
former will take a logical value (T or F), the latter takes numeric
values (0 - 1).
Danlin
huangykiz дµÀ:
> Hi,
> I know that a proportion of "adapt" between 0 and 1.For example,
> values below are calculated using adapt=TRUE, and then in gwr(), it
> will use the best adapt q=0.0008484767 (the last line) to compute. But
> I just want to ues adapt q=0.1(the red line) to compute in gwr() next,
> not adapt q=0.0008484767 (the last line). So I mean how to get the 10%
> proportion value and how to write it in gwr(), not just
> adaptive_proportion <- gwr.sel(...); */result <- gwr(...,
> adapt=adaptive_proportion; ...)./*
> Adaptive q: 0.381966 CV score: 24370.57
> Adaptive q: 0.618034 CV score: 27368.81
> Adaptive q: 0.236068 CV score: 21363.70
> Adaptive q: 0.1458980 CV score: 18875.33
> Adaptive q: 0.09016994 CV score: 16519.28
> Adaptive q: 0.05572809 CV score: 14424.12
> Adaptive q: 0.03444185 CV score: 12722.21
> Adaptive q: 0.02128624 CV score: 11354.84
> Adaptive q: 0.01315562 CV score: 10373.59
> Adaptive q: 0.008130619 CV score: 8748.126
> Adaptive q: 0.005024999 CV score: 7748.467
> Adaptive q: 0.00310562 CV score: 7251.083
> Adaptive q: 0.001919379 CV score: 6869.442
> Adaptive q: 0.001186241 CV score: 6769.606
> Adaptive q: 0.0008484767 CV score: 6343.859
> Adaptive q: 0.0005243874 CV score: 7706.465
> Adaptive q: 0.0009774913 CV score: 6428.712
> Adaptive q: 0.0007990996 CV score: 6356.182
> Adaptive q: 0.0008891668 CV score: 6354.715
> Adaptive q: 0.0008484767 CV score: 6343.859
> Thank you very much for your any helps.
> Cheers.
>
> ÔÚ2010-05-13 21:34:48£¬"Danlin Yu" <yud at mail.montclair.edu> дµÀ£º
>
> In gwr(), it's actually adapt = 0.1. It was a typo in my previous
> email. And actually before you ask this question, you shall really
> follow what Roger said, "READ THE HELP PAGES". Do some homework
> (Roger has already answered your question in his previous email,
> highlights by me, see:
>
> >>>>>> READ THE HELP PAGES!
> >>>>>>
> >>>>>> adaptive_proportion <- gwr.sel(...)
> >>>>>>
> >>>>>> /*result <- gwr(..., adapt=adaptive_proportion; ...)*/
> >>>>>>
> >>>>>> exactly as on the example om the help page:
> >>>>>>
> >>>>>> data(georgia)
> >>>>>> g.adapt.gauss <- gwr.sel(PctBach ~ TotPop90 + PctRural +
> PctEld
> >>>>>> + PctFB +
> >>>>>> PctPov + PctBlack, data=gSRDF, adapt=TRUE)
> >>>>>> res.adpt <- gwr(PctBach ~ TotPop90 + PctRural + PctEld +
> PctFB +
> >>>>>> PctPov +
> >>>>>> PctBlack, data=gSRDF, adapt=g.adapt.gauss)
> >>>>>> res.adpt
>
> )
>
> In addition, if you are considering using R quite often, I would
> suggest you try to read the codes that are provided by simply
> typing the name of the function. This way, you'll learn about the
> parameters, how they are used, what results are produced and how
> they are produced, etc. The open-source codes will certainly tell
> you "more detail" (more than you could imagine, I'd say).
>
> Hope this helps.
>
> Cheers,
> Danlin
>
> huangykiz дµÀ:
>> Hi,
>> Set In gwr.sel() or gwr()?. How to write the code about set
>> "adpt" parameter to 0.1? May you tell more detail.
>> Thank you very much.
>> Cheers,
>>
>> ÔÚ2010-05-13 20:29:14£¬"Danlin Yu" <yud at mail.montclair.edu> дµÀ£º
>> >You shall set "adpt" parameter to 0.1.
>> >
>> >Sent from my Iphone
>> >Dr. Danlin Yu
>> >Assistant Professor of GIS, Urban Geography
>> >Earth & Environmental Studies
>> >Montclair State University
>> >Montclair, NJ 07043
>> >Tel: 973-655-4313
>> >Fax: 973-655-4072
>> >Email: yud at mail.montclair.edu
>> >
>> >ÔÚ May 13, 2010£¬8:03 AM£¬huangykiz <huangykiz at 163.com> дµ½£º
>> >
>> >> Hi,
>> >> If I want to chang the adaptive Spatial Kernel = 10% neighbors in
>> >> gwr()? How to chang it?
>> >>
>> >> Thank you very much.
>> >>
>> >> Cheers.
>> >>
>> >>
>> >>
>> >>
>> >> ÔÚ2010-05-13 17:43:06£¬"Roger Bivand" <Roger.Bivand at nhh.no> дµÀ£º
>> >>> On Thu, 13 May 2010, huangykiz wrote:
>> >>>
>> >>>> Hi,
>> >>>
>> >>>> I am sorry I say that I cannot get the same R^2 between in
>> R/spgwr
>> >>>> and
>> >>>> SAM in my data.
>> >>>
>> >>> Establish that the adaptive proportion is exactly the same.
>> >>>
>> >>> You haven't done that - copy and paste from SAM to gwr(), not
>> using
>> >>> gwr.sel(). Do it first for fixed Gaussian, then if you get a
>> sensible
>> >>> figure from SAM for adaptive, do the same there. I see very
>> different
>> >>> bandwidths chosen by SAM and by gwr.sel() and GWR3 -
>> gwr.sel() and
>> >>> GWR3
>> >>> usually agree fairly well for CV fixed bandwidths, but gwr.sel()
>> >>> typically
>> >>> continues its search a little longer than GWR3.
>> >>>
>> >>> I don't know how SAM chooses its bandwidth or adaptive
>> proportion,
>> >>> it is
>> >>> closed source, so only its authors know.
>> >>>
>> >>> Is SAM using Great Circle distances, if so, you should set
>> >>> longlat=TRUE in
>> >>> gwr.sel() and gwr()? Are your coordinates geographical (decimal
>> >>> degrees)
>> >>> or projected (metres)?
>> >>>
>> >>> Roger
>> >>>
>> >>>> In R/spgwr
>> >>>> R^2: 0.972989;
>> >>>> AICc (GWR p. 61, eq 2.33; p. 96, eq. 4.21): 4668.92
>> >>>> Effective number of parameters (model: traceS): 435.7586;
>> >>>> Effective number of parameters (residual: 2traceS -
>> traceS'S): 582.3581
>> >>>> ;
>> >>>> Sigma (residual: 2traceS - traceS'S): 2.437066;
>> >>>> Sigma (model: traceS): 1.927127;
>> >>>> Sigma (ML): 1.325501;
>> >>>>
>> >>>> In SAM,
>> >>>> Coefficient of Determination : 0.696
>> >>>> Adjusted r-square (r?Adj): 0.693
>> >>>> Sigma: 20.058
>> >>>> Effective Number of Parameters: 10.002
>> >>>> Akaike Information Criterion (AICc): 4838.299
>> >>>> Correlation Coefficient (r): 0.834
>> >>>> F: 207.852
>> >>>>
>> >>>> Here are my code:
>> >>>> PET.adapt.gauss <- gwr.sel(SPECIES_RI ~ PET,
>> >>>> data=Environmental_variables,
>> coords=cbind(Environmental_variables
>> >>>> $LONGX,
>> >>>> Environmental_variables$LATY),adapt=TRUE)
>> >>>>
>> >>>> PET.gauss<- gwr(SPECIES_RI ~ PET, data=Environmental_variables,
>> >>>> coords=cbind(Environmental_variables$LONGX,
>> >>>> Environmental_variables$LATY),
>> >>>> gweight=gwr.Gauss,adapt=PET.adapt.gauss,hatmatrix=TRUE)
>> >>>>
>> >>>> 1 -
>> (PET.gauss$results$rss/crossprod(scale(Environmental_variables
>> >>>> $SPECIES_RI, scale=FALSE)))
>> >>>>
>> >>>> In SAM, I selecte "spatial Weighting Function"=gaussian,
>> adaptive
>> >>>> Spatial Kernel, and compute Geographical Distances based on
>> >>>> longitudinal
>> >>>> coordinate(X) and latitudinal coordinate(Y). I donot select
>> method
>> >>>> for
>> >>>> AIC optimisation.
>> >>>>
>> >>>> So I donot know where is wrong.
>> >>>>
>> >>>> Thank you very much for your great helps.
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> ÔÚ2010-05-13 00:07:23£¬"Roger Bivand" < Roger.Bivand at nhh.no>
>> дµÀ£º
>> >>>>> On Wed, 12 May 2010, Roger Bivand wrote:
>> >>>>>
>> >>>>>> On Wed, 12 May 2010, huangykiz wrote:
>> >>>>>>
>> >>>>>>> Hi, Is "adapt=TRUE"(spgwr) not the same as "adaptive Spatial
>> >>>>>>> Kernel"(SAM)?The result of "adaptive Spatial Kernel" may be
>> >>>>>>> better than
>> >>>>>>> fixed bandwidth. If I want to ues "adaptive Spatial
>> Kernel" in
>> >>>>>>> spgwr, how
>> >>>>>>> to write the code?
>> >>>>>>
>> >>>>>> READ THE HELP PAGES!
>> >>>>>>
>> >>>>>> adaptive_proportion <- gwr.sel(...)
>> >>>>>>
>> >>>>>> result <- gwr(..., adapt=adaptive_proportion; ...)
>> >>>>>>
>> >>>>>> exactly as on the example om the help page:
>> >>>>>>
>> >>>>>> data(georgia)
>> >>>>>> g.adapt.gauss <- gwr.sel(PctBach ~ TotPop90 + PctRural +
>> PctEld
>> >>>>>> + PctFB +
>> >>>>>> PctPov + PctBlack, data=gSRDF, adapt=TRUE)
>> >>>>>> res.adpt <- gwr(PctBach ~ TotPop90 + PctRural + PctEld +
>> PctFB +
>> >>>>>> PctPov +
>> >>>>>> PctBlack, data=gSRDF, adapt=g.adapt.gauss)
>> >>>>>> res.adpt
>> >>>>>>
>> >>>>>> Clear?
>> >>>>>
>> >>>>> I have now compared the same data in R/spgwr and SAM for
>> >>>>> effective number
>> >>>>> of parameters, sigma, and your questionable R^2, and they
>> agree
>> >>>>> adequately
>> >>>>> when the kernel and the bandwidth are the same. Having the
>> >>>>> algorithm
>> >>>>> choose the bandwidth does obscure what is going on. You should
>> >>>>> use SAM if
>> >>>>> you prefer GUI and not needing to know how things work, and
>> >>>>> remember that
>> >>>>> GWR is a very doubtful approach for anything beyond exploring
>> >>>>> non-stationarity, its original motivation.
>> >>>>>
>> >>>>>>
>> >>>>>>>
>> >>>>>>> Thanks a lot.
>> >>>>>>>
>> >>>>>>> Cheers.
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>> Hi,
>> >>>>>>>> I think that I use the same bandwidth and kernel. In SAM, I
>> >>>>>>>> use "spatial
>> >>>>>>>> Weighting Function"=gaussian, adaptive Spatial Kernel, and
>> >>>>>>>> compute
>> >>>>>>>> Geographical Distances based on longitudinal
>> coordinate(X) and
>> >>>>>>>> latitudinal
>> >>>>>>>> coordinate(Y). In spgwr, gweight is gwr.Gauss and adapt
>> is TRUE.
>> >>>>>>>>
>> >>>>>>>> For example, this is my code:
>> >>>>>>>
>> >>>>>>>> PET.bw <- gwr.sel(SPECIES_RI ~ PET, data=variables,
>> >>>>>>>> coords=cbind(variables$LONGX, variables$LATY),adapt=TRUE)
>> >>>>>>>
>> >>>>>>>> PET.gauss <- gwr(SPECIES_RI ~ PET, data=variables,
>> >>>>>>>> coords=cbind(variables$LONGX, variables$LATY),
>> bandwidth=PET.bw,
>> >>>>>>>> gweight=gwr.Gauss,adapt=TRUE,hatmatrix=TRUE)
>> >>>>>>>
>> >>>>>>> So where do you pass PET.bw to the gwr() function?
>> adapt=TRUE
>> >>>>>>> will treat
>> >>>>>>> the adaptive proportion as 1, so include all data points. If
>> >>>>>>> you want to
>> >>>>>>> compare, use a fixed bandwidth in both, with no CV
>> selection.
>> >>>>>>> Then you
>> >>>>>>> compare like with like.
>> >>>>>>>
>> >>>>>>> Note that your messages are *not* reaching the list, they
>> must
>> >>>>>>> be sent to:
>> >>>>>>>
>> >>>>>>> r-sig-geo at stat.math.ethz.ch, not
>> >>>>>>>
>> >>>>>>> r-sig-geo-request at stat.math.ethz.ch
>> >>>>>>>
>> >>>>>>> You are not thinking carefully and are rushing into
>> things and
>> >>>>>>> drawing
>> >>>>>>> wrong conclusions.
>> >>>>>>>
>> >>>>>>>>
>> >>>>>>>> Thanks a lot.
>> >>>>>>>>
>> >>>>>>>> Cheers.
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>> ÔÚ2010-05-12 20:28:47£¬ "Roger Bivand" <Roger.Bivand at nhh
>> >>>>>>>> .no> дµÀ£º
>> >>>>>>>>> On Wed, 12 May 2010, huangykiz wrote:
>> >>>>>>>>>
>> >>>>>>>>>> Hi,
>> >>>>>>>>>> One of SAM author ("Jos¨¦ Alexandre Felizola Diniz
>> >>>>>>>>>> Filho"<diniz at icb.ufg.br>) say that they also base on
>> GWR3 (the
>> >>>>>>>>>> Fotherigham book) and the data used within each kernel
>> may
>> >>>>>>>>>> be some
>> >>>>>>>>>> slight differences
>> >>>>>>>>>
>> >>>>>>>>> Naturally, if you are not using exactly the same kernel
>> and
>> >>>>>>>>> bandwidth,
>> >>>>>>>>> you should not be surprised by differences in values.
>> Please
>> >>>>>>>>> make sure
>> >>>>>>>>> that the bandwidth and kernel are the same and try again.
>> >>>>>>>>>
>> >>>>>>>>> Roger
>> >>>>>>>>>
>> >>>>>>>>>> Cheers
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> ÔÚ2010-05-12 20:28:47£¬"Roger Bivand" < Roger.Bivand at nhh.
>> >>>>>>> no> дµÀ£º
>> >>>>>>>> On Wed, 12 May 2010, huangykiz wrote:
>> >>>>>>>>
>> >>>>>>>>> Hi,
>> >>>>>>>>> One of SAM author ("Jos¨¦ Alexandre Felizola Diniz
>> >>>>>>>>> Filho"<diniz at icb.ufg.br>) say that they also base on
>> GWR3 (the
>> >>>>>>>>> Fotherigham book) and the data used within each kernel may
>> >>>>>>>>> be some
>> >>>>>>>>> slight differences
>> >>>>>>>>
>> >>>>>>>> Naturally, if you are not using exactly the same kernel and
>> >>>>>>>> bandwidth, you
>> >>>>>>>> should not be surprised by differences in values. Please
>> make
>> >>>>>>>> sure that
>> >>>>>>>> the bandwidth and kernel are the same and try again.
>> >>>>>>>>
>> >>>>>>>> Roger
>> >>>>>>>>
>> >>>>>>>>> Cheers.
>> >>>>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> ÔÚ2010-05-12 15:27:58£¬"Roger Bivand" < Roger.Bivand at nhh.
>> >>>>>>> no> дµÀ£º
>> >>>>>>>> On Wed, 12 May 2010, huangykiz wrote:
>> >>>>>>>>
>> >>>>>>>>> Hi,
>> >>>>>>>>>
>> >>>>>>>>> I am sorry I donot know how to install module spgwr from
>> >>>>>>>>> sourceforge (I
>> >>>>>>>>> can find it on the web
>> >>>>>>>>>
>> http://r-spatial.cvs.sourceforge.net/viewvc/r-spatial/spgwr/R/gwr.R?view=log
>>
>> >>>>>>>>> ).
>> >>>>>>>>> So I use the code sketch to calculate quasi-global R2. The
>> >>>>>>>>> results are
>> >>>>>>>>> different between SAM and spgwr(Attached are the
>> results ). The
>> >>>>>>>>> quasi-global R2 in R is 0.4515894, but in SAM is 0.696.
>> >>>>>>>>> This is my code:
>> >>>>>>>>>
>> >>>>>>>>> library(spgwr)
>> >>>>>>>>> Environmental_variables<-read.csv
>> >>>>>>>>> ("Environmental_variables100.csv",header=TRUE)
>> >>>>>>>>> attach(Environmental_variables)
>> >>>>>>>>> region_PET.bw <- gwr.sel(SPECIES_RI ~ PET,
>> >>>>>>>>> data=Environmental_variables,
>> >>>>>>>>> coords=cbind(Environmental_variables$LONGX,
>> >>>>>>>>> Environmental_variables$LATY),adapt=TRUE)
>> >>>>>>>>> region_PET.gauss <- gwr(SPECIES_RI ~ PET,
>> >>>>>>>>> data=Environmental_variables,
>> >>>>>>>>> coords=cbind(Environmental_variables$LONGX,
>> >>>>>>>>> Environmental_variables$LATY), bandwidth=region_PET.bw,
>> >>>>>>>>> gweight=gwr.Gauss,adapt=TRUE,hatmatrix=TRUE)
>> >>>>>>>>> names(region_PET.gauss$SDF)
>> >>>>>>>>> region_PET.gauss$SDF$localR2
>> >>>>>>>>> 1 -
>> >>>>>>>>> (region_PET.gauss$results$rss/crossprod(scale
>> >>>>>>>>> (Environmental_variables$SPECIES_RI,
>> >>>>>>>>> scale=FALSE)))
>> >>>>>>>>>
>> >>>>>>>>> Thank you very much.
>> >>>>>>>>
>> >>>>>>>> SAM is closed source - ask them how they compute it. For
>> >>>>>>>> spgwr, the code
>> >>>>>>>> is provided, so you can read it for yourself. For the
>> record,
>> >>>>>>>> the current
>> >>>>>>>> gwr() code in spgwr gives the same value as GWR3, which is
>> >>>>>>>> also closed
>> >>>>>>>> source, and where the Effective number of parameters
>> (model:
>> >>>>>>>> traceS),
>> >>>>>>>> Sigma, and Residual sum of squares also agree. I suppose
>> SAM
>> >>>>>>>> has a
>> >>>>>>>> different understanding of GWR internals than the
>> authors of
>> >>>>>>>> the GWR book.
>> >>>>>>>>
>> >>>>>>>> Once again:
>> >>>>>>>>
>> >>>>>>>> Please *do* write to the R-sig-geo list rather than to me
>> >>>>>>>> directly -
>> >>>>>>>> others can answer your question as well, perhaps better,
>> and
>> >>>>>>>> in a more
>> >>>>>>>> timely way than I can. In addition, threads in the list
>> can be
>> >>>>>>>> searched in
>> >>>>>>>> the archives, so others can avoid the same problem later.
>> >>>>>>>>
>> >>>>>>>> Please summarise to the list if this resolves the problem.
>> >>>>>>>>
>> >>>>>>>> Roger
>> >>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>>
>> >>>>>>>>> ÔÚ2010-05-12 01:16:18£¬ "Roger Bivand" <Roger.Bivand at nh
>> >>>>>>>>> h.no> дµÀ£º
>> >>>>>>>>>> On Wed, 12 May 2010, huangykiz wrote:
>> >>>>>>>>>>
>> >>>>>>>>>>> Hi, I just need one for global, not *each* fit point. In
>> >>>>>>>>>>> this case, how
>> >>>>>>>>>>> can I select or do? Why in other software such as SAM
>> >>>>>>>>>>> (Spatial Analysis
>> >>>>>>>>>>> in Macroecology) just gives one R2?
>> >>>>>>>>>>
>> >>>>>>>>>> If you believe theirs, good luck! The authors of the GWR
>> >>>>>>>>>> book have local
>> >>>>>>>>>> R^2 values in GWR3 and formulae that are wrong by
>> their own
>> >>>>>>>>>> admission in
>> >>>>>>>>>> private emails. The localR2 now agrees with the as-yet
>> >>>>>>>>>> unreleased GWR4
>> >>>>>>>>>> from the GWR authors. How SAM can be "better", I don't
>> know.
>> >>>>>>>>>> What you
>> >>>>>>>>>> are suggesting is that the model fitted with fit
>> points at
>> >>>>>>>>>> data points
>> >>>>>>>>>> (but not at other fit points) might have a "quasi-global"
>> >>>>>>>>>> R^2, based on
>> >>>>>>>>>> the RSS of the pooled fit. For the columbus case, that
>> might
>> >>>>>>>>>> be:
>> >>>>>>>>>>
>> >>>>>>>>>> 1 - (col.gauss$results$rss/crossprod(scale(columbus$crime,
>> >>>>>>>>>> scale=FALSE)))
>> >>>>>>>>>>
>> >>>>>>>>>> but I don't know whether this is in any way correct. I've
>> >>>>>>>>>> added it as:
>> >>>>>>>>>>
>> >>>>>>>>>> Quasi-global R2:
>> >>>>>>>>>>
>> >>>>>>>>>> to the print output of a GWR model fitted with a
>> hatmatrix,
>> >>>>>>>>>> and have
>> >>>>>>>>>> committed it to sourceforge, project r-spatial, module
>> >>>>>>>>>> spgwr. Arguably,
>> >>>>>>>>>> it ought to be adjusted by the ratio of degrees of
>> freedom,
>> >>>>>>>>>> but I don't
>> >>>>>>>>>> trust the DF either. Could you please check out spgwr
>> from
>> >>>>>>>>>> sourceforge
>> >>>>>>>>>> ,install it from source, and confirm that the
>> "quasi-global
>> >>>>>>>>>> R2" does the
>> >>>>>>>>>> same as SAM, or use the code sketch above to do the same,
>> >>>>>>>>>> and report
>> >>>>>>>>>> back?
>> >>>>>>>>>>
>> >>>>>>>>>> Roger
>> >>>>>>>>>>
>> >>>>>>>>>>>
>> >>>>>>>>>>> Thanks a lot.
>> >>>>>>>>>>>
>> >>>>>>>>>>> Cheers,
>> >>>>>>>>>>>
>> >>>>>>>>>>>
>> >>>>>>>>>>>
>> >>>>>>>>>>>
>> >>>>>>>>>>>
>> >>>>>>>>>>> ÔÚ2010-05-11 23:59:44£¬ "Roger Bivand" <Roger.Bivand@
>> >>>>>>>>>>> nhh.no> дµÀ£º
>> >>>>>>>>>>>> On Tue, 11 May 2010, huangykiz wrote:
>> >>>>>>>>>>>>
>> >>>>>>>>>>>>> Hi,
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>> There are 49 localR2 in the results. Which one do I
>> >>>>>>>>>>>>> need? The code
>> >>>>>>>>>>>>> "look for localR2:" cannot run.
>> >>>>>>>>>>>>
>> >>>>>>>>>>>> Well, how many do you want? There is one for each fit
>> >>>>>>>>>>>> point, they are
>> >>>>>>>>>>>> *local* R2. Please do try to grasp what GWR does -
>> it fits
>> >>>>>>>>>>>> one moddel
>> >>>>>>>>>>>> for *each* fit point.
>> >>>>>>>>>>>>
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>> Thans a lot
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>> Cheers.
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>>
>> >>>>>>>>>>>>> ÔÚ2010-05-11 22:33: 59£¬"Roger Bivand" <Roger.Biv
>> >>>>>>>>>>>>> and at nhh.no> дµÀ£º
>> >>>>>>>>>>>>>> On Tue, 11 May 2010, huangykiz wrote:
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>> Hi, OK. But I need it for compariation. In what some
>> >>>>>>>>>>>>>>> contexts to
>> >>>>>>>>>>>>>>> get it? May you tell me how to get it?
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> library(spgwr)
>> >>>>>>>>>>>>>> data(columbus)
>> >>>>>>>>>>>>>> col.bw <- gwr.sel(crime ~ income + housing,
>> data=columbus,
>> >>>>>>>>>>>>>> coords=cbind(columbus$x, columbus$y))
>> >>>>>>>>>>>>>> col.gauss <- gwr(crime ~ income + housing,
>> data=columbus,
>> >>>>>>>>>>>>>> coords=cbind(columbus$x, columbus$y),
>> bandwidth=col.bw,
>> >>>>>>>>>>>>>> hatmatrix=TRUE)
>> >>>>>>>>>>>>>> names(col.gauss$SDF)
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> look for localR2:
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> col.gauss$SDF$localR2
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> But do not rely on it or use it for anything at all!
>> >>>>>>>>>>>>>> Like all GWR,
>> >>>>>>>>>>>>>> it is most unreliable!
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> Roger Bivand
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>> Thank you very much for your great helps
>> >>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>> Best regards.
>> >>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>> ÔÚ2010-05- 11 18:28:44£¬"Roger Bivand" <Roger
>> >>>>>>>>>>>>>>> .Bivand at nhh.no <mailto:Bivand at nhh.no>> дµÀ£º
>> >>>>>>>>>>>>>>>> On Tue, 11 May 2010, huangykiz wrote:
>> >>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>>> Dear professor Bivand,
>> >>>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>>> I am a strudent. I recently use GWR(Geographically
>> >>>>>>>>>>>>>>>>> weighted
>> >>>>>>>>>>>>>>>>> regression) model. May I ask you a question?
>> There is
>> >>>>>>>>>>>>>>>>> not
>> >>>>>>>>>>>>>>>>> Coefficient of Determination in the results of
>> GWR.
>> >>>>>>>>>>>>>>>>> How can I get
>> >>>>>>>>>>>>>>>>> it? What is the programs to get it?
>> >>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>> Please address questions like this to the R-sig-geo
>> >>>>>>>>>>>>>>>> list rather
>> >>>>>>>>>>>>>>>> than to me directly in future.
>> >>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>> The local R2 values are available in some contexts
>> >>>>>>>>>>>>>>>> when running
>> >>>>>>>>>>>>>>>> gwr(), but are not well defined (neither in the GWR
>> >>>>>>>>>>>>>>>> book nor in
>> >>>>>>>>>>>>>>>> implementations). I advise against their use - they
>> >>>>>>>>>>>>>>>> are most
>> >>>>>>>>>>>>>>>> probably meaningless.
>> >>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>> Hope this helps,
>> >>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>> Roger Bivand
>> >>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>>> Thank you very much for your any helps.
>> >>>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>>> Best regards.
>> >>>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>>> Yong Huang
>> >>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>>> --
>> >>>>>>>>>>>>>>>> Roger Bivand
>> >>>>>>>>>>>>>>>> Economic Geography Section, Department of
>> Economics,
>> >>>>>>>>>>>>>>>> Norwegian
>> >>>>>>>>>>>>>>>> School of
>> >>>>>>>>>>>>>>>> Economics and Business Administration,
>> Helleveien 30,
>> >>>>>>>>>>>>>>>> N-5045
>> >>>>>>>>>>>>>>>> Bergen,
>> >>>>>>>>>>>>>>>> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
>> >>>>>>>>>>>>>>>> e-mail: Roger.Bivand at nhh.no
>> >>>>>>>>>>>>>>>>
>> >>>>>>>>>>>>>>
>> >>>>>>>>>>>>>> --
>> >>>>>>>>>>>>>> Roger Bivand
>> >>>>>>>>>>>>>> Economic Geography Section, Department of Economics,
>> >>>>>>>>>>>>>> Norwegian
>> >>>>>>>>>>>>>> School of
>> >>>>>>>>>>>>>> Economics and Business Administration, Helleveien 30,
>> >>>>>>>>>>>>>> N-5045 Bergen,
>> >>>>>>>>>>>>>> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
>> >>>>>>>>>>>>>> e-mail: Roger.Bivand at nhh.no
>> >>>>>>>>>>>>
>> >>>>>>>>>>>> --
>> >>>>>>>>>>>> Roger Bivand
>> >>>>>>>>>>>> Economic Geography Section, Department of Economics,
>> >>>>>>>>>>>> Norwegian School
>> >>>>>>>>>>>> of
>> >>>>>>>>>>>> Economics and Business Administration, Helleveien 30,
>> >>>>>>>>>>>> N-5045 Bergen,
>> >>>>>>>>>>>> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
>> >>>>>>>>>>>> e-mail: Roger.Bivand at nhh.no
>> >>>>>>>>>>
>> >>>>>>>>>> --
>> >>>>>>>>>> Roger Bivand
>> >>>>>>>>>> Economic Geography Section, Department of Economics,
>> >>>>>>>>>> Norwegian School of
>> >>>>>>>>>> Economics and Business Administration, Helleveien 30,
>> N-5045
>> >>>>>>>>>> Bergen,
>> >>>>>>>>>> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
>> >>>>>>>>>> e-mail: Roger.Bivand at nhh.no
>> >>>>>>>>
>> >>>>>>>> --
>> >>>>>>>> Roger Bivand
>> >>>>>>>> Economic Geography Section, Department of Economics,
>> Norwegian
>> >>>>>>>> School of
>> >>>>>>>> Economics and Business Administration, Helleveien 30,
>> N-5045
>> >>>>>>>> Bergen,
>> >>>>>>>> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
>> >>>>>>>> e-mail: Roger.Bivand at nhh.no
>> >>>>>>
>> >>>>>>
>> >>>>>
>> >>>>> --
>> >>>>> Roger Bivand
>> >>>>> Economic Geography Section, Department of Economics, Norwegian
>> >>>>> School of
>> >>>>> Economics and Business Administration, Helleveien 30, N-5045
>> >>>>> Bergen,
>> >>>>> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
>> >>>>> e-mail: Roger.Bivand at nhh.no
>> >>>
>> >>> --
>> >>> Roger Bivand
>> >>> Economic Geography Section, Department of Economics, Norwegian
>> >>> School of
>> >>> Economics and Business Administration, Helleveien 30, N-5045
>> Bergen,
>> >>> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
>> >>> e-mail: Roger.Bivand at nhh.no
>> >>
>> >> [[alternative HTML version deleted]]
>> >>
>> >> _______________________________________________
>> >> R-sig-Geo mailing list
>> >> R-sig-Geo at stat.math.ethz.ch
>> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>>
>> ------------------------------------------------------------------------
>> ÍøÒ×ΪÖÐСÆóÒµÃâ·ÑÌṩÆóÒµÓÊÏ䣨×ÔÖ÷ÓòÃû£©
>> <http://ym.163.com/?from=od3>
>
> --
> ___________________________________________
> Danlin Yu, Ph.D.
> Assistant Professor of GIS and Urban Geography
> Department of Earth & Environmental Studies
> Montclair State University
> Montclair, NJ, 07043
> Tel: 973-655-4313
> Fax: 973-655-4072
> email: yud at mail.montclair.edu
> webpage: csam.montclair.edu/~yu
>
>
>
> ------------------------------------------------------------------------
> ÍøÒ×ΪÖÐСÆóÒµÃâ·ÑÌṩÆóÒµÓÊÏ䣨×ÔÖ÷ÓòÃû£© <http://ym.163.com/?from=od3>
--
___________________________________________
Danlin Yu, Ph.D.
Assistant Professor of GIS and Urban Geography
Department of Earth & Environmental Studies
Montclair State University
Montclair, NJ, 07043
Tel: 973-655-4313
Fax: 973-655-4072
email: yud at mail.montclair.edu
webpage: csam.montclair.edu/~yu
More information about the R-sig-Geo
mailing list