search for: covariancematrix

Displaying 5 results from an estimated 5 matches for "covariancematrix".

2012 Sep 17
2
Constraint Optimization with constrOptim
...62, -0.058497, 0.050473, 0.026086, 0.004916, -0.015996, 0.003968, 0.030721, 0.034774, -0.004972, 0.019459, 0.000196, -0.001849), nrow=3, ncol=9, 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, n...
2011 Dec 19
2
Constrained Optimisation
Dear All I have a constrained optimisation problem, I want to maximise the following function t(weights) %*% CovarianceMatrix %*% weights for the weights, subject to constraints on each element within the weights & the weights vector summing to 1. i.e. weights = (x1, x2, x3), where x1 is within some given range (a +b, a - b). I have tried to do this using the optim function in R, setting the minimum & maxi...
2009 Jun 03
1
Function in R for computing correlation matrix and covariance matrix
Hi, At present, i have two distinct and real values for the coefficient, which is  required in AR(2) model. Based on my revision, for distinct and real values of the coefficients in AR(2) model, the correlation structure separated by lag h can be computed by p(h) = a*z1^(-h) + b*z2^(h), where p(h) is the autocorrelation separated by lag h, a and b can be determined by initial values, z1 and z2
2019 Jul 08
5
Format printing inside a matrix
Hi Abby, Thanks a lot for your paraphrasing and your suggestion! The problem of wrapping the list into a S3/S4 object, i.e. subclassing array or matrix, is that one also has to define a bunch of methods for subsetting, joining, etc, in order to make it behave like a list array. The reason is that most R functions for subsetting, joining, etc. do not preserve class attributes of the input, which
2007 Apr 23
4
Estimates at each iteration of optim()?
I am trying to maximise a complicated loglikelihood function with the "optim" command. Is there some way to get to know the estiamtes at each iteration? When I put "control=list(trace=TRUE)" as an option in "optim", I just got the initial and final values of the loglikelihood, number of iterations and whether the routine has converged or not. I need to know the