| lm.morantest.exact | R Documentation | 
The function implements Tiefelsdorf's exact global Moran's I test.
lm.morantest.exact(model, listw, zero.policy = attr(listw, "zero.policy"),
 alternative = "greater", spChk = NULL, resfun = weighted.residuals,
 zero.tol = 1e-07, Omega=NULL, save.M=NULL, save.U=NULL, useTP=FALSE,
 truncErr=1e-6, zeroTreat=0.1)
## S3 method for class 'moranex'
print(x, ...)
| model | an object of class  | 
| listw | a  | 
| zero.policy | default  | 
| alternative | a character string specifying the alternative hypothesis, must be one of greater (default), less or two.sided. | 
| spChk | should the data vector names be checked against the spatial objects for identity integrity, TRUE, or FALSE, default NULL to use  | 
| resfun | default: weighted.residuals; the function to be used to extract residuals from the  | 
| zero.tol | tolerance used to find eigenvalues close to absolute zero | 
| Omega | A SAR process matrix may be passed in to test an alternative hypothesis, for example  | 
| save.M | return the full M matrix for use in  | 
| save.U | return the full U matrix for use in  | 
| useTP | default FALSE, if TRUE, use truncation point in integration rather than upper=Inf, see Tiefelsdorf (2000), eq. 6.7, p.69 | 
| truncErr | when useTP=TRUE, pass truncation error to truncation point function | 
| zeroTreat | when useTP=TRUE, pass zero adjustment to truncation point function | 
| x | a moranex object | 
| ... | arguments to be passed through | 
A list of class moranex with the following components:
| statistic | the value of the exact standard deviate of global Moran's I. | 
| p.value | the p-value of the test. | 
| estimate | the value of the observed global Moran's I. | 
| method | a character string giving the method used. | 
| alternative | a character string describing the alternative hypothesis. | 
| gamma | eigenvalues (excluding zero values) | 
| oType | usually set to "E" | 
| data.name | a character string giving the name(s) of the data. | 
| df | degrees of freedom | 
Markus Reder and Roger Bivand
Roger Bivand, Werner G. Müller and Markus Reder (2009) "Power calculations for global and local Moran's I." Computational Statistics & Data Analysis 53, 2859-2872.
lm.morantest.sad
eire <- st_read(system.file("shapes/eire.gpkg", package="spData")[1])
row.names(eire) <- as.character(eire$names)
eire.nb <- poly2nb(eire)
e.lm <- lm(OWNCONS ~ ROADACC, data=eire)
lm.morantest(e.lm, nb2listw(eire.nb))
lm.morantest.sad(e.lm, nb2listw(eire.nb))
lm.morantest.exact(e.lm, nb2listw(eire.nb))
lm.morantest.exact(e.lm, nb2listw(eire.nb), useTP=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.