Skip to content
Prev 43791 / 398513 Next

for help about MLE in R

"Edward Sun" <edwardweisun at hotmail.com> writes:
Apologies if this wasn't a homework question, but

a) That is not the likelihood function. Try fn(0). What is the z doing
in there? The log((y)^2) makes the whole thing vector valued, which
you do not want. Get this right first and perhaps do a plot of the
function values.

b) Second argument to nlm is supposed to be a starting value for the
parameter (e.g., 0.5), and you seem to be thinking differently. Also
note that you are feeding the log-likelihood to a *minimizer*.