CORRELATED_BOOTSTRAP Calculate correlated bootstrap samples of P(X(t))
usage 1: [X] = correlated_bootstrap(X_t);
[X] = correlated_bootstrap(X_t, N);
usage 2: [X] = correlated_bootstrap(X_t, N, spike_rate);
Inputs: X_t - [N_mc x T] matrix of N_mc samples from a
distribution P(X(t) where X_t(:,i) are N_mc
samples from time i.
N - number of desired samples [default = 199]
spike_rate - [1xT] vector spike rates. [optional]
Outputs: X - [1xN] samples from distribution P(X). Calculate
confidence intervals using PRCTILE.
Compute N samples from distribution P(X) when all is known is
N_mc samples from P(X(t)) for each moment in time t=[1,T] and
samples from P(X(t=a)) is correlated with P(X(t=a+b)).
Usage 1: Standard correlated bootstrap procedure.
Usage 2: Correlated bootstrap but adjust P(X(t)) according to the
linear relationship with the spike rate. Specifiying the
spike rate centers the resampled estimates about the
mean spike rate.
See also: PRCTILE, BOOTSTRAP_PR
Original coding - Kennel
Edited - shlens 2005-09-23
Edited - shlens 2006-02-14
This function calls: