10. [R] nlm = non linear minimization (Jan24)

10. [R] nlm = non linear minimization (Jan24) - model.fit...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
neg.log.lik = function ( lam, x) { n = length(x) L = n*log(lam) - lam*sum(x) L = -L attr(L, "gradient") = -n/lam + sum(x) L } x = rexp(48, rate = 2) model.fit = neg.log.lik(2, x)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: model.fit Page 1 of 1 25/01/2011 http://www.stats.uwo.ca/faculty/kulperger/Stat3858/Computing/RScripts/nlm-eg-exp.txt...
View Full Document

Ask a homework question - tutors are online