[R] Error in nlm : non-finite value supplied by 'nlm'
rvaradhan at jhmi.edu
Tue Jun 15 22:00:40 CEST 2010
You need to constrain your parameters such that 0 < vector < 1 and
vector > 0.
You could try the `spg' function in package "BB" or the `L-BFGS-B' function
in optim to perform this box-constrained optimization. There are other
options as well including the `nlminb' function.
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Hiba Baroud
Sent: Tuesday, June 15, 2010 1:33 PM
To: r-help at r-project.org
Subject: [R] Error in nlm : non-finite value supplied by 'nlm'
I am trying to compute MLE for non-Gaussian AR(1). The error term follows a
difference poisson distribution. This distribution has one parameter
So in total I want to estimate two parameters: the AR(1) paramter
(vector) and the distribution parameter.
My function is the negative loglikelihood derived from a mixing operator.
Error in nlm(f, p = c(-0.2354, 3.269e-05)) :
non-finite value supplied by 'nlm'
In addition: There were 50 or more warnings (use warnings() to see the first
1: In besselI(2 * vector, data$PC) : value out of range in 'bessel_i'
# all warnings are the same
I would like to know what are the possible ways to avoid having non-finite
Thank you very much.
Hotmail: Trusted email with Microsofts powerful SPAM protection.
[[alternative HTML version deleted]]
More information about the R-help