search for: constraint3

Displaying 1 result from an estimated 1 matches for "constraint3".

Did you mean: constraints
2012 Sep 17
2
Constraint Optimization with constrOptim
...Estimates fkt <- function(x) {t(x) %*% covarianceMatrix %*% x} #The constraints #The results should be greater 0 !DOES NOT WORK! constraint1 <- x[1:9] #The summ of the results should be between 0.999 and 1.001 constraint2 <- sum(matrixStartingEstimatesNegativ) constraint3 <- sum(x) constraintMatrix <- rbind(constraint1, constraint2, constraint3) constraintVektor <- c(0, -1.00001, 0.99999) #Optimization constrOptim(startingEstimates, fkt, NULL, ui = constraintMatrix, ci = constraintVektor) #------------------------SOLVER-END------------------------...