fix_parameters#
- pharmpy.modeling.fix_parameters(model, parameter_names, strict=True)[source]#
Fix parameters
Fix all listed parameters
- Parameters:
model (Model) – Pharmpy model
parameter_names (list or str) – one parameter name or a list of parameter names
strict (bool) – Whether all parameters in input need to exist in the model. Default is True
- Returns:
Model – Pharmpy model object
Example
>>> from pharmpy.modeling import fix_parameters, 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(model, 'POP_CL') >>> model.parameters['POP_CL'] Parameter("POP_CL", 0.00469307, lower=0.0, upper=∞, fix=True)
See also
fix_or_unfix_parameters
Fix or unfix parameters (given boolean)
fix_parameters_to
Fixing and setting parameter initial estimates in the same function
unfix_paramaters
Unfixing parameters
unfix_paramaters_to
Unfixing parameters and setting a new initial estimate in the same function