R/gearyc.stat.R

Defines functions gearyc.stat

Documented in gearyc.stat

gearyc.stat<-function(data, applyto="SMR", ...)
{
	n<-length(data$Observed)

	if(applyto != "SMR")
	{
		Z<- data$Observed - data$Expected
	}
	else
	{
		Z<- data$Observed/data$Expected 
		Z[!is.finite(Z)]<-0
	}

	return(spdep::geary(x=Z, ...)$C)
}

Try the DCluster package in your browser

Any scripts or data that you put into this service are public.

DCluster documentation built on Sept. 3, 2023, 5:07 p.m.