Dear all,
I want to find the optimal values of a vector, x (with 6 elements)
say, satisfying the following conditions:
1. for all x>=0
2. sum(x)=1
3. x[5]<=0.5 and x[6]<=0.5
For the minimisation I'm using nlminb and to satisfy the first 2
conditions the logistic transformation is used with box c
Dear all,
I want to find the optimal values of a vector, x (with 6 elements)
say, satisfying the following conditions:
1. for all x>=0
2. sum(x)=1
3. x[5]<=0.5 and x[6]<=0.5
For the minimisation I'm using nlminb and to satisfy the first 2
conditions the logistic transformation is used with box c
code. Use something
> like 'opt5' for one and 'opt4' for the other.]
> Then
>
> Sig5 = A %*% vcov.nlminb(opt) %*% t(A).
> I believe the A matrix you want is as follows:
> A = matrix(NA, dim=c(5, 4))
> A[1:4, 1:4] <- diag(4)
> A[5,
nction 'f2(x1, ...)' that computes xFull = c(x1, 1-sum(x1))
> and feeds that to your 'fn'.
> If this makes sense, great. Else, if my answer is not useful, be so kind
> as to PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html and provid
Dear All,
I wanted to post some more details about the query I sent to s-news last
week.
I have a vector with a constraint. The constraint is that the sum of the
vector must add up to 1 - but not necessarily positive, i.e.
x[n] <- 1 -(x[1] + ...+x[n-1])
I perform the optimisation on the vector
Dear All,
I wanted to post some more details about the query I sent to s-news last
week.
I have a vector with a constraint. The constraint is that the sum of the
vector must add up to 1 - but not necessarily positive, i.e.
x[n] <- 1 -(x[1] + ...+x[n-1])
I perform the optimisation on the vector
6 matches
Mail list logo