fix_parameters_to#
- pharmpy.modeling.fix_parameters_to(model, inits, strict=True)[source]#
Fix parameters to
Fix all listed parameters to specified value/values
- Parameters:
model (Model) – Pharmpy model
inits (dict) – Inits for all parameters to fix and set init
strict (bool) – Whether all parameters in input need to exist in the model. Default is True
- Returns:
Model – Pharmpy model object
Examples
>>> from pharmpy.modeling import fix_parameters_to, load_example_model >>> model = load_example_model("pheno") >>> model.parameters['POP_CL'] Parameter("POP_CL", 0.00469307, lower=0.0, upper=∞, fix=False) >>> model = fix_parameters_to(model, {'POP_CL': 0.5}) >>> model.parameters['POP_CL'] Parameter("POP_CL", 0.5, lower=0.0, upper=∞, fix=True)
See also
fix_parameters
Fix parameters
fix_or_unfix_parameters
Fix or unfix parameters (given boolean)
unfix_paramaters
Unfixing parameters
unfix_paramaters_to
Unfixing parameters and setting a new initial estimate in the same function