Displaying 1 result from an estimated 1 matches for "matrixstartingestimates".
2012 Sep 17
2
Constraint Optimization with constrOptim
..., byrow=TRUE)
#Computation of the means
tableMeans <- colMeans(dataset)
#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 resu...