R/GallagherMod.R

Defines functions GallagherMod

Documented in GallagherMod

GallagherMod <- function(Z, R) {
# modified Gallagher index
	# x'=x/sum(xi^2)^.5
	Z.div <- sum(Z^2)^0.5
	Z.mod <- Z/Z.div
	# y'=y/sum(yi^2)^.5
	R.div <- sum(R^2)^0.5
	R.mod <- R/R.div
	sqrt(sum((Z.mod-R.mod)^2)/2)
  }

Try the polrep package in your browser

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

polrep documentation built on Jan. 5, 2024, 3:01 a.m.