Serguei Kaniovski
2011-Oct-19 13:31 UTC
[R] Estimating bivariate normal density with constrains
Dear R-Users I would like to estimate a constrained bivariate normal density, the constraint being that the means are of equal magnitude but of opposite signs. So I need to estimate four parameters: mu (meanvector (mu,-mu)) sigma_1 and sigma_2 (two sd deviations) rho (correlation coefficient) I have looked at several packages, including Gaussian mixture models in Mclust, but I am not sure what is the best way, or the best package to use for this task. Greatly appreciate any suggestions! Serguei Kaniovski ________________________________________ Austrian Institute of Economic Research (WIFO) P.O.Box 91 Tel.: +43-1-7982601-231 1103 Vienna, Austria Fax: +43-1-7989386 Mail: Serguei.Kaniovski@wifo.ac.at http://www.wifo.ac.at/Serguei.Kaniovski [[alternative HTML version deleted]]
On 20/10/11 02:31, Serguei Kaniovski wrote:> > Dear R-Users > > I would like to estimate a constrained bivariate normal density, the > constraint being that the means are of equal magnitude but of opposite > signs. So I need to estimate four parameters: > > mu (meanvector (mu,-mu)) > sigma_1 and sigma_2 (two sd deviations) > rho (correlation coefficient) > > I have looked at several packages, including Gaussian mixture models in > Mclust, but I am not sure what is the best way, or the best package to use > for this task. > > Greatly appreciate any suggestions!I very much doubt that there is anything built-in that you can use. However it shouldn't be *too* hard to get maximum likelihood estimates using optim() to maximise the (log) likelihood. For starting values I would try just using the ordinary covariance matrix estimate to get your sigma_1, sigma_2, and rho estimates, and for mu use (x1.bar - x2.bar)/2 (in what I hope is an obvious notation) for a starting value. Good luck! cheers, Rolf Turner