[R-SIG-Finance] How to do multivariate MLE?

Ajay Shah ajayshah at mayin.org
Tue Aug 7 06:29:47 CEST 2007


On Mon, Aug 06, 2007 at 11:53:58PM -0400, Hung-Te(Stanley) Chu wrote:
> Hi,
> 
> If I generate random variables, X, from the bivariate t distribution with df 
> = 3:
>     x <- rmvt(n=10, sigma = diag(2), df = 3)
> 
> Now I want to perform MLE to "back out" the df. To do so, I define a 
> function loglik:
> 
> loglik <- function(v){
>   a <- 0.5;
>   b <- 0.5*v;
>   sum( -log( (1+x/v)^-((v+1)/2) ) + log( beta(a,b)*sqrt(v) ) )
> }
> 
> And then I use "nlminb()" to solve it. Somehow this setup is incorrect and I 
> don't know why.
> 
> Can anyone give me an example about how to do multivariate MLE?

You might find
http://www.mayin.org/ajayshah/KB/R/documents/mle/mle.html to be useful.

-- 
Ajay Shah                                      http://www.mayin.org/ajayshah  
ajayshah at mayin.org                             http://ajayshahblog.blogspot.com
<*(:-? - wizard who doesn't know the answer.



More information about the R-SIG-Finance mailing list