Skip to content
Prev 323658 / 398503 Next

estimate value from simulations

On May 15, 2013, at 11:24 PM, Pascal Oettli wrote:

            
It seems from the dimensions expected that what your really want is not means of rows but rather means of columns.

matrix( c( colMeans( sim[c(TRUE,FALSE,FALSE), ]), # recycling picks out 1,4,7,10, ...
 colMeans( sim[c(FALSE,TRUE,FALSE), ]),
 colMeans( sim[c(FALSE,FALSE,TRUE), ])), ncol=6, byrow=TRUE)