R/bd.densdep.optim.discrete.R

Defines functions bd.densdep.optim.discrete

bd.densdep.optim.discrete<-function(x,maxN,minN,muset,model=-1,rho){
minlik<-10^100
for (k in minN:maxN){
	init<-c(2,1)
	if (muset<0) {init<-c(2)}
	res<-subplex(init,LikDD,model=model,root=1,x=x,Ndec=k,minN=minN,muset=muset,sampling=rho)
	print(k)
	print(res)
	if (res$value<minlik){
		minlik<-res$value
		mini<-res
		miniN<-k
		}
	#print(miniN)
	print(mini)
}
mini$par<-c(mini$par,miniN)
res<-mini
res
}

Try the TreePar package in your browser

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

TreePar documentation built on May 1, 2019, 9:20 p.m.