Dear All,

I have a MCMC result in x1. I was wondering if there is a simpler, more elegant way of evaluating the estimate of an integral then this (I am pretty sure there is): Also if I want to count the x's say -1<x<2 but not the ones in the burn in period.

[code]
z <- -2
burnin <- 2000
int1 <- length(x1$x[(burnin+1):length(x1$x)][x1$x[(burnin+1):length(x1$x)]<z])/(length(x1$x)-burnin)
[\code]

Thank you:
Daniel

______________________________________________
R-help@r-project.org 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.

Reply via email to