R/qF.R

Defines functions qF

qF <-
function(q, iter, Xpred, icov, P, Beta, Sigma) {
	toInvert <-  function(x, q, iter, Xpred, icov, P, Beta, Sigma) {
		return(sum(P[iter,]*pnorm(x, mean = Xpred[icov,]%*%t(Beta[iter,,]), sd = Sigma[iter,])) - q)
	}
	res <-  uniroot(toInvert, interval = c(-10^15,10^15), q, iter, Xpred, icov, P, Beta, Sigma)$root
	return(res)
}

Try the ROCnReg package in your browser

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

ROCnReg documentation built on March 31, 2023, 5:42 p.m.