R/grfit.R

Defines functions grfit

grfit <-
function(dvec,matches,m,l,n){
	grd=1:n
	cl=1-1/l
	for(i in 1:n){
		svec=(m-matches[i,])*dvec/(1-dvec[i]*dvec)-matches[i,]*dvec*cl/(dvec[i]*dvec*cl+1/l)
		grd[i]=sum(svec)-svec[i]
	}
	grd
}

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.