Displaying 2 results from an estimated 2 matches for "outcs39".
2006 Sep 26
1
warning message in nlm
...loglikcs39,len=120,method="BFGS")
> optcs39
$par
[1] -1.27795226 -0.03626846
$value
[1] 7470.551
$counts
function gradient
133 23
$convergence
[1] 0
$message
NULL
2. The output from using nlm is as follow
-----------------------------------------------------------
> outcs39<-nlm(loglikcs39,theta.start,len=120)
Warning messages:
1: NA/Inf replaced by maximum positive value
2: NA/Inf replaced by maximum positive value
3: NA/Inf replaced by maximum positive value
4: NA/Inf replaced by maximum positive value
5: NA/Inf replaced by maximum positive value
6: NA/Inf replac...
2006 Sep 30
1
Gradient problem in nlm
...b2*c(8:(7+len)))))
df.b2<- sum(-mcs39[1:len] * exp(b1+b2*c(8:(7+len))) * c(8:(7+len)) +
(pcs39[1:len] * exp(b1+b2*c(8:(7+len))) * c(8:(7+len)) )
/(a1+exp(b1+b2*c(8:(7+len)))) )
attr(value,"gradient")<-c(df.a1,df.b1,df.b2)
return(value)
}
theta.start<-c(0.01 ,-1.20, -0.0005)
outcs39<-nlm(loglikcs39,theta.start,len=50)
Error in nlm(loglikcs39, theta.start, len = 50) :
probable coding error in analytic gradient
Any light that can be shed on this would be highly appreciated.
Many thanks
Singyee Ling
[[alternative HTML version deleted]]