Displaying 1 result from an estimated 1 matches for "matrixstartingestimatesnegativ".
2012 Sep 17
2
Constraint Optimization with constrOptim
...#Computation of the variance-covariance matrix
covarianceMatrix <- ((t(dataset)) %*% dataset) / 3
#--------------------SOLVER-START-----------------------------
#start estimates
startingEstimates = rep(1/9, 9)
matrixStartingEstimates = matrix(startingEstimates, nrow=1, ncol=9, byrow=TRUE)
matrixStartingEstimatesNegativ = matrix(rep(-1/9, 9), nrow=1, ncol=9, byrow=TRUE)
#The function which should be minimized
x <- matrixStartingEstimates
fkt <- function(x) {t(x) %*% covarianceMatrix %*% x}
#The constraints
#The results should be greater 0 !DOES NOT WORK!
constraint1 <- x[1...