R/pmc.R

Defines functions `pmc`

`pmc` <-
function(x, ...) {
# proportion of trials misclassified by observer
#  w/ respect to estimated scale
	if (!(class(x) %in% c("mlds", "mlbs")))
		stop("x must be of class mlds or mlbs")
	pred <- predict(x)
	if (x$method == "glm") 
		resp <- x$obj$data$resp else
		resp <- x$data$resp
	pmc <- 1 - sum(((pred > 0) == resp))/length(resp)
	pmc		
	}

Try the MLDS package in your browser

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

MLDS documentation built on Aug. 20, 2023, 9:06 a.m.