[R] conditions simpler way
Kehl Dániel
kehld at ktk.pte.hu
Sun Jun 5 09:39:08 CEST 2011
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
More information about the R-help
mailing list