Multivariate Normal parameters estimation using a given data set from MLE

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Multivariate Normal parameters estimation using a given data set from MLE


I am very new to the R language. Lately, I have been busy working on a statistical problem of parameter estimation using the Maximum Likelihood Estimation. I am given a data set and I am modelling the data with a multivariate normal distribution. My first goal is to estimate the parameters (which is mean vector and covariance matrix) and then I will use these estimates to do certain things. However, my problem is to write a code in R about estimating the parameters of the distribution.

First of all, I would just like to say that if one looks at the formula of the multivariate normal density, then it has vector and matrix operation involved in it. For one dimensional case (the univariate normal case), it's easy because all operations are simply converted into multiplication of numbers. However, in general setting, when I write the log likelihood function of the density, it involves matrix/vector multiplication with non-numeric entries (which I want to optimize). So, when I run my program, it simply says that my matrix entries are non-numeric and the operations involved there can't be performed.

If I use an alternative approach which is to use a 'tmvtnorm' package which has some built in functions, I still get some error message. So I was wondering if anyone can help me in this. I would be very grateful if anyone could provide me any references/ideas on it.

Ankush Goswami

P.S. Let me know if you need the code I wrote for the purpose to see if I am missing something.