[R] Help: Maximum likelihood estimation

Ravi Varadhan rvaradhan at jhmi.edu
Fri Oct 22 19:33:39 CEST 2010


I am not surprised that you are running into difficulties with this model
estimation, since you are treating a constrained optimization problem as
unconstrained one.  It is not so easy to set constraints on the covariance
matrix (i.e. positive definiteness).  The is the beauty of the EM algorithm
is that not only does it possess the ascent property (i.e. the likelihood is
guaranteed to not decrease) for any starting value, but it also ensures that
the constraints are automatically satisfied.  Therefore, EM would be my
preferred choice.  Why do you not want to try that?  

If you really want to use direct maximization, you could try to impose all
the constraints on the parameters, including positive definiteness of
covariance matrix, and solve the constrained optimization problem.  R has
two packages: "alabama" and "Rsolnp" that can handle nonlinear constraints.

Ravi.


-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of roach
Sent: Thursday, October 21, 2010 10:24 PM
To: r-help at r-project.org
Subject: [R] Help: Maximum likelihood estimation


I was trying to reproduce a result in a published journal, and I have come
across some difficulties.
I have the following equation, which is two equations combined together.
http://r.789695.n4.nabble.com/file/n3006584/Screenshot.png 
where
http://r.789695.n4.nabble.com/file/n3006584/Screenshot-1.png 
http://r.789695.n4.nabble.com/file/n3006584/Screenshot-2.png 
http://r.789695.n4.nabble.com/file/n3006584/Screenshot-3.png 
I[t] is unknown, but have the following distribution
http://r.789695.n4.nabble.com/file/n3006584/Screenshot-4.png 
hence, the probability density function is 
http://r.789695.n4.nabble.com/file/n3006584/Screenshot-5.png 
and the likelihood function is 
http://r.789695.n4.nabble.com/file/n3006584/Screenshot-6.png 
It used Kiefer's E-M algorithm to estimate the problem. To simplify, first
assume lamda is known. I multiply the matrix in the probability density
function, and write it in a non-matrix form, and use the function optim() to
estimate the maximum. but I got non-sensible estimates of the parameters,
and got 39 warnings. the inverse of sigma is negative, and the warnings says
that in log(det(sigma)): NaNs produced.
What did I do wrong? Can anybody give me a hint?
-- 
View this message in context:
http://r.789695.n4.nabble.com/Help-Maximum-likelihood-estimation-tp3006584p3
006584.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list