Blocked Standard Error of the Mean

From Rizzo_Lab
Revision as of 17:41, 7 February 2011 by Tbalius (talk | contribs)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Let X be a time dependent vector of length M.

Brake X into N number of blocks.

Let m = FLOOR(M/N) be the block sizes.

Let r = M mod N be the remainder.

for {B1,B2, ... BM} be the blocks.

Sudo code

for N = 2:M
  start = 1
  a is an array of lenth M
  for i = 1:N
    if i > r 
       stop = start+m
    else
       stop = start+m+1
 
    B = X(start:stop)
 
    a[i] = mean(B)   
  bsem = sem(a)