Andreas,
 
I don't know what it is exactly that you want to do, but perhaps you can try 
using limSolve,
which solves for the equations Ex>=F, Gx>=H. In the code below, lsei calculates 
the least squares solution (min sum(x^2)), xranges estimates the range of your 
variables, and xsample takes a random sample of solutions.
 
f.con<-matrix(c(0,2/3,1/3,1/3,
                1,1,1,1,
                1,0,0,0,
                0,1,0,0,
                0,0,1,0,
                0,0,0,1),nrow=6,byrow=TRUE)
f.rhs <- c(0.3, 1, 0, 0, 0, 0)
 
 
E<- f.con[1:2,]
G<- f.con[-(1:2),]
F<- f.rhs[1:2]
H<-f.rhs[-(1:2)]
 
require(limSolve)
 
lsei(E=E,F=F,G=G,H=H)
xranges(E=E,F=F,G=G,H=H)
xs <- xsample(E=E,F=F,G=G,H=H)
pairs(xs$X)

 
Hope this helps,
 
Karline

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to