Displaying 1 result from an estimated 1 matches for "plna3".
2006 Aug 26
1
Capture of iterative integration output
...<- 1.609437912
for(i in c(1:n))
{
integrand <- function(x)
{(x*V[[i]])^c[[i]]*exp(-x*V[[i]])/factorial(c[[i]])*0.3989422804014327/
(x*sigma)*exp(-.5*((log(x)-mu)/sigma)^2)}
y <- integrate(integrand, lower = 0, upper = Inf)
write.table(y[[1]],file="c:/Bayes/PLNA3-1.out",append=TRUE,
quote=FALSE,row.names=FALSE,col.names=FALSE)
}
z <-read.table(file="c:/Bayes/PLNA3-1.out")
z <- c(z)
LL <- log(c(z$V1))
#negative Log-Likelihood
print(-sum(LL),digits=6)
file.remove("c:/Bayes/PLNA3-1.out")
--
Terry W. Schulz
Applie...