[R] definition of meq at spg
Evgenia
evgts at aueb.gr
Mon May 30 11:30:38 CEST 2011
For my problem I have
#Constraints
b11<-0
b21<-0
b12<-0
b22<-0
n1>=0
n2>=0
n1<=1
n1<=1
n1+n2=1
In order to use spg I set
Amat<-matrix(rbind(c(rep(0,10)),c(rep(0,10)),c(rep(0,2),1,rep(0,7)),
c(rep(0,3),1,rep(0,6)),c(rep(0,10)),c(rep(0,10)),
c(rep(0,6),1,rep(0,3)),c(rep(0,7),1,rep(0,2)),
c(rep(0,8),1,rep(0,1)),c(rep(0,9),1,rep(0,0)),
c(rep(0,8),1,rep(0,1)),c(rep(0,9),1,rep(0,0)),
c(rep(0,8),1,1)),ncol=10)
b<-c(rep(0,4),rep(0,4),0,0,-1,-1,-1)
meq<-c(seq(1:8),13) #1:8 &13 condition is an equality
Although spg gives "Successful convergence" it also gives the message:
There were 50 or more warnings (use warnings() to see the first 50)
Warning messages:
1: In if (meq > 0 | any(b - c(A %*% par) > 0)) { ... :
the condition has length > 1 and only the first element will be used
How must I denote meq to be sure that algorithm takes into account the
conditions 1:8 &13 as equality and only conditions 9:12 as inequalities?
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/definition-of-meq-at-spg-tp3560285p3560285.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list