[R] maximum likelihood estimation of 5 parameters
Ravi Varadhan
rvaradhan at jhmi.edu
Fri Jan 5 17:42:59 CET 2007
Franco,
Is it possible that you have failed to provide the negative of loglikelihood
to "optim", since optim, by default, minimizes a function? If you want to
do this withput redefining the log-likelihood, you should set fnscale= -1
(as hinted by Prof. Ripley). This would turn the problem into a
maximization problem.
If this doesn't work, you should provide more details (a reproducible code
with actual error message).
Ravi.
----------------------------------------------------------------------------
-------
Ravi Varadhan, Ph.D.
Assistant Professor, The Center on Aging and Health
Division of Geriatric Medicine and Gerontology
Johns Hopkins University
Ph: (410) 502-2619
Fax: (410) 614-9625
Email: rvaradhan at jhmi.edu
Webpage: http://www.jhsph.edu/agingandhealth/People/Faculty/Varadhan.html
----------------------------------------------------------------------------
--------
-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of francogrex
Sent: Friday, January 05, 2007 10:42 AM
To: r-help at stat.math.ethz.ch
Subject: Re: [R] maximum likelihood estimation of 5 parameters
Franco,
You can provide lower and upper bounds on the parameters if you use optim
with method="L-BFGS-B".
Hth, Ingmar
Thanks, but when I use L-BFGS-B it tells me that there is an error in
optim(start, f, method = method, hessian = TRUE, ...) : L-BFGS-B needs
finite values of 'fn'
--
View this message in context:
http://www.nabble.com/maximum-likelihood-estimation-of-5-parameters-tf292536
4.html#a8180120
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
R-help at stat.math.ethz.ch 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