Re: [R] Bootstrapping a covariance matrix

2011-09-04 Thread R. Michael Weylandt
Your code seems generally ok (though I wonder why you define a function Var() to do exactly the same thing as var) but your problem is with your use of mean, not in the bootstrap code. It collapses things into a vector before taking a mean -- c.f., R> x = array(1:27,c(3,3,3)) R> mean(x) [1] 14

[R] Bootstrapping a covariance matrix

2011-09-03 Thread meddee
Dear all I am a bit new to R so please keep your swords sheathed! I would simply like to bootstrap a covariance matrix from a multivariate gaussian density. At face value that seemed like a very straightforward problem to solve but I somehow could not get the boot package to work and did not reall