![]() |
|
Data Fields | |
char | name [101] |
int | vsize |
int | msize1 |
int | msize2 |
int | dsize |
apop_data * | data |
apop_data * | parameters |
apop_data * | info |
void(* | estimate )(apop_data *data, apop_model *params) |
long double(* | p )(apop_data *d, apop_model *params) |
long double(* | log_likelihood )(apop_data *d, apop_model *params) |
long double(* | cdf )(apop_data *d, apop_model *params) |
long double(* | constraint )(apop_data *data, apop_model *params) |
int(* | draw )(double *out, gsl_rng *r, apop_model *params) |
void(* | prep )(apop_data *data, apop_model *params) |
apop_settings_type * | settings |
void * | more |
size_t | more_size |
char | error |
The elements of the apop_model type, representing a statistical model.
long double(* apop_model::cdf)(apop_data *d, apop_model *params) |
Cumulative distribution function: the integral up to the single data point you provide. Call via apop_cdf
apop_data* apop_model::data |
The input data. Typically a link to what you sent to apop_estimate
int(* apop_model::draw)(double *out, gsl_rng *r, apop_model *params) |
Random draw from a parametrized model. Call via apop_draw
int apop_model::dsize |
The size of the parameter set. If a dimension is -1, then use yourdata->matrix->size2. For anything more complex, allocate the parameter set in the prep method. dsize
is for the canonical form, and is the size of the data the RNG will return.
void(* apop_model::estimate)(apop_data *data, apop_model *params) |
The estimation routine. Call via apop_estimate
apop_data* apop_model::info |
Several pages of assorted info, perhaps including the log likelihood, AIC, BIC, covariance matrix, confidence intervals, expected score. See your specific model's documentation for what it puts here.
long double(* apop_model::log_likelihood)(apop_data *d, apop_model *params) |
Log likelihood of the given data and parameterized model. Call via apop_log_likelihood
void* apop_model::more |
This element is copied and freed as necessary by Apophenia's model-handling functions, but is otherwise untouched. Put whatever information you want here.
size_t apop_model::more_size |
If setting more
, set this to sizeof(your_more_type)
so apop_model_copy can do the memcpy
as necessary.
long double(* apop_model::p)(apop_data *d, apop_model *params) |
Probability of the given data and parameterized model. Call via apop_p
apop_data* apop_model::parameters |
The coefficients or parameters estimated by the model.