R/lik6pt.R

Defines functions `lik6pt`

`lik6pt` <-
function(x, Six.Pts, ...) {	
	p <- if (x$method == "glm")
		c(predict(x, make.ix.mat(Six.Pts$A, length(x$pscale)), 
			type = "response"),
		  predict(x, make.ix.mat(Six.Pts$B, length(x$pscale)), 
			type = "response"),
		  predict(x, make.ix.mat(Six.Pts$E, length(x$pscale)), 
			type = "response") ) else
		c(predict(x, Six.Pts$A, type = "response"),
		  predict(x, Six.Pts$B, type = "response"),
		  predict(x, Six.Pts$E, type = "response")) 
	grt <- with(Six.Pts, c(A$resp, B$resp, E$resp))
	grt %*% log(p) + (1 - grt) %*% log(1 - p)
}

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.