Displaying 1 result from an estimated 1 matches for "cmhn".
Did you mean:
chn
2012 Oct 20
4
Error in integrate(integrand, 0, Inf) : non-finite function value
...length(1:2))
integ<-vector("numeric",length(1:2))
for (k in 1:2){
ll<-function(p){
cmh<-delta[,k]*(h[,k]*log(0.5))+p*log(gamma(1+1/p))
for(s in 1:10){
integrand<-function(x)
x^d[s,k]*exp(-x*gamma(1+1/p))^p*p*x^(p-1)*exp(-x*h[s,k])
}
integ<-integrate(integrand,0,Inf)$value
cmhn<-as.vector(cmh)
lik<-sum(cmhn+integ)
-lik
}
initial<-c(1)
t<-nlm(ll,initial)
out[k]<-t$estimate
}
est<-as.vector(out)
--
View this message in context: http://r.789695.n4.nabble.com/Error-in-integrate-integrand-0-Inf-non-finite-function-value-tp4646868.html
Sent from the R help...