![]() |
|
Data Structures | |
struct | apop_fix_params_settings |
Macros | |
#define | cut_if_missing(method) if (!model_in->method) model_out->method = NULL; |
Functions | |
Apop_settings_init (Apop_settings_copy(apop_fix_params, Apop_assert(in.base_model,"I can't fix a NULL model's parameters.");) | |
void | set_starting_point (apop_data *in_params, apop_model *model_out, double *start, apop_data *predict_tab) |
apop_model * | apop_model_fix_params (apop_model *model_in) |
apop_model * | apop_model_fix_params_get_base (apop_model *fixed_model) |
Set some of the parameters of a model to fixed values.
apop_model* apop_model_fix_params | ( | apop_model * | model_in | ) |
Produce a model based on another model, but with some of the parameters fixed at a given value.
You will send me the model whose parameters you want fixed, with the parameters
element set as follows. For the fixed parameters, simply give the values to which they will be fixed. Set the free parameters to NaN
.
For example, here is a Binomial distribution with a fixed but
allowed to float freely:
The output is an apop_model
that can be estimated, Bayesian updated, et cetera.
estimate
method always uses an MLE, and it never calls the base model's estimate
method.estimate
method. Otherwise, I'll set my own.more
pointer of the parameters
for additional pages and NaN
s on those pages.Here is a sample program. It produces a few thousand draws from a Multivariate Normal distribution, and then tries to recover the means given a var/covar matrix fixed at the correct variance.
model_in | The base model |
apop_model* apop_model_fix_params_get_base | ( | apop_model * | fixed_model | ) |
The apop_model_fix_params function produces a model that has only the non-fixed parameters of the model. After estimation of the fixed-parameter model, this function fills the parameters
element of the base model and returns a pointer to the base model.