R/fit.R

Defines functions fit

fit <-
function(dvec,matches,m,l,n){
	pimat=1/l+(1-1/l)*(dvec%*%t(dvec))
	smat=matches*log(pimat)+(m-matches)*log(1-pimat)
	val=(sum(diag(smat))-sum(smat))/2
	val
}

Try the SubCultCon package in your browser

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

SubCultCon documentation built on May 2, 2019, 5:08 a.m.