Displaying 1 result from an estimated 1 matches for "lengthoftheta".
2012 Apr 26
0
Problem with constrOptim when hitting boundary
...t;Programming error -- negative probabilities")
if(any(probDist> 1+1e-10)) stop("Programming error -- >1 probabilities")
denom<-rowSums(sweep(wtMat,2,probDist,FUN="*")) #should be a vector length equal to N
-sum(sweep(numGr,1,denom,"/"))
}
lengthOfTheta<-K
uiL1<-diag(rep(-1,lengthOfTheta),nrow=lengthOfTheta,ncol=lengthOfTheta)
ciL1<-rep(1,lengthOfTheta)
uiGr0<-diag(rep(1,lengthOfTheta),nrow=lengthOfTheta,ncol=lengthOfTheta)
ciGr0<-rep(0,lengthOfTheta)
ui<-rbind(uiL1,uiGr0)
ci<- c(-ciL1,-ciGr0)
#The feasible region is de...