[R-sig-Geo] A question about gwr.morantest pvalue

Apostolis atsiban at unipi.gr
Fri Feb 17 00:23:11 CET 2012


Dear list members

I am a new user of R and I would like to ask a question about the function
gwr.morantest which is included in the spgwr package.

According to the paper of Leung et al  page  881 
when 
 EQ.EQ3.gwr > 0 the pvalue of the test is  P(chisqh<= chi2.gwr)    
(equation 43) 

and when

 EQ.EQ3.gwr < 0    the pvalue  is  1 - P(chisqh<= chi2.gwr)  (equation 44) 

However in the function gwr.morantest the estimations in the IF  are
respectively: 

if (EQ.EQ3.gwr > 0) {
        chi2.gwr <- h.gwr - ((sqrt(2 * h.gwr) * EQ.gwr)/(sqrt(varQ.gwr)))
        p.gwr <- 1 - pchisq(chi2.gwr, h.gwr)
    }
    else if (EQ.EQ3.gwr < 0) {
        chi2.gwr <- (h.gwr + ((sqrt(2 * h.gwr) * EQ.gwr)/(sqrt(varQ.gwr))))
        p.gwr <- pchisq(chi2.gwr, h.gwr)
    }

Is it correct or there is an error? My problem is in the appearance  of 1 in 
p.gwr inside the IF. 

I wish to use the gwr.morantest function in a simulation study and I would
like to know whether the function estimates the pvalue which is described in
the paper  correctly.

Thanks in advance
Apostolis





--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/A-question-about-gwr-morantest-pvalue-tp7292670p7292670.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list