apop_hist.c File Reference
Functions
Detailed Description
PMF and CMF manipulations.
Copyright (c) 2006--2007 by Ben Klemens. Licensed under the modified GNU GPL v2; see COPYING and COPYING2. (Except psmirnov2x, Copyright R Project, but also licensed under the GPL.)
Function Documentation
Give me an existing histogram (i.e., an apop_model) and I'll create a new histogram with the same bins, but with data from draws random draws from the parametrized model you provide.
Unlike with most other histogram-genrating functions, this one will normalize the output to integrate to one. It uses the Designated initializers syntax for inputs.
- Parameters:
-
| base | An apop_model produced using a form like apop_estimate(yourdata, apop_histogram). I.e. a histogram model to be used as a template. (No default) |
| m | The model to be drawn from. Because this function works via random draws, the model needs to have a draw method. (No default) |
| draws | The number of random draws to make. (arbitrary default = 1e5) |
| rng | The gsl_rng used to make random draws. (default: see note on Auto-allocated RNGs) |
Scale a histogram so it integrates to one (and is thus a proper PMF).
Give me an existing histogram (i.e., an apop_model) and I'll create a new histogram with the same bins, but with data from the vector you provide
- Parameters:
-
| template | An apop_model produced using a form like apop_estimate(yourdata, apop_histogram). |
| indata | The new data to be binned. |
Test the goodness-of-fit between two histograms (in apop_model form). I assume that the histograms are aligned.
Run the Kolmogorov test to determine whether two distributions are identical.
- Parameters:
-
- Returns:
- The
-value from the Kolmogorov test that the two distributions are equal.
Autogenerated by doxygen on 23 Nov 2009.