R/multdev.R

Defines functions multdev

multdev <-
function(theta,l,m,sel.curve,y,effort=NULL){
	
	# calculates the multinomial deviance for SELECT fitting
	
	if(is.null(effort)) phi. <- phi(theta,l,m,sel.curve)
        else phi. <- phi(theta,l,m,sel.curve,effort)
	tosum <- y != 0  # only worry about non-zero data (avoids problems involving a deadly log(0) when the selection curve is numerically zero)
	
	-2*sum(y[tosum]*log(phi.[tosum]))
}

Try the omnr.gillnet package in your browser

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

omnr.gillnet documentation built on May 2, 2019, 6:09 p.m.