I wish to apply maximum likelihood estimation with the following likelihood function:
From the dataset file, I have a column vector of three variables, rho, (s_x*)^2, and T. There are in total N = 3295 observations. I would like to maximize the above likelihood function with respect to two variables: mu and sigma^2.
By logging the above likelihood, we have the following log likelihood:
How can I find the MLE of mu and sigma^2? I have tried the following, but I am not confident if it is right.
Assume I imported the data into R with names rho, s.sq and T, then the following is my code: