Patterns in static

Apophenia

Bootstrapping

Functions


Function Documentation

apop_data* apop_bootstrap_cov ( apop_data data,
apop_model  model,
gsl_rng *  rng,
int  iterations 
)

Give me a data set and a model, and I'll give you the bootstrapped covariance matrix of the parameter estimates.

Parameters:
data The data set. An apop_data set where each row is a single data point. (No default)
model An apop_model, whose estimate method will be used here. (No default)
iterations How many bootstrap draws should I make? (default: 1,000)
rng An RNG that you have initialized, probably with apop_rng_alloc. (Default: see Auto-allocated RNGs)
Returns:
An apop_data set whose matrix element is the estimated covariance matrix of the parameters.

This function uses the Designated initializers syntax for inputs.

apop_data* apop_jackknife_cov ( apop_data in,
apop_model  model 
)

Give me a data set and a model, and I'll give you the jackknifed covariance matrix of the model parameters.

The basic algorithm for the jackknife (with many details glossed over): create a sequence of data sets, each with exactly one observation removed, and then produce a new set of parameter estimates using that slightly shortened data set. Then, find the covariance matrix of the derived parameters.

Should I use the jackknife or the bootstrap? As a broad rule of thumb, the jackknife works best on models that are closer to linear. The worse a linear approximation does (at the given data), the worse the jackknife approximates the variance.

Sample usage:

apop_data_show(apop_jackknife_cov(your_data, your_model));
Parameters:
in The data set. An apop_data set where each row is a single data point.
model An apop_model, that will be used internally by apop_estimate.
Returns:
An apop_data set whose matrix element is the estimated covariance matrix of the parameters.

SourceForge.net Logo

Autogenerated by doxygen on 23 Nov 2009.