R/rpartEval.R

Defines functions rpartEval

Documented in rpartEval

rpartEval <-
function(y, wt, parms){
	# Set a unique label
	label <- hmp.pkg.env$EVAL_COUNT_RPART
	hmp.pkg.env$EVAL_COUNT_RPART <- hmp.pkg.env$EVAL_COUNT_RPART + 1
	
	dev <- DM.MoM(y)$loglik * -1
	
	# Skip any infinite LL comparisons (makes lrt 0)
	if(dev == Inf || dev == -Inf)
		dev <- 0
	
	list(label=label, deviance=dev)
}

Try the HMP package in your browser

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

HMP documentation built on Aug. 31, 2019, 5:05 p.m.