add_population_parameter#
- pharmpy.modeling.add_population_parameter(model, name, init, lower=None, upper=None, fix=False)[source]#
Add a new population parameter to the model
- Parameters:
model (Model) – Pharmpy model
name (str) – Name of the new parameter
init (float) – Initial estimate of the new parameter
lower (float) – Lower bound of the new parameter
upper (float) – Upper bound of the new parameter
fix (bool) – Should the new parameter be fixed?
- Returns:
Model – Pharmpy model object
Examples
>>> from pharmpy.modeling import add_population_parameter, load_example_model >>> model = load_example_model("pheno") >>> model = add_population_parameter(model, 'POP_KA', 2) >>> model.parameters value lower upper fix POP_CL 0.004693 0.0 ∞ False POP_VC 1.009160 0.0 ∞ False COVAPGR 0.100000 -0.99 ∞ False IIV_CL 0.030963 0.0 ∞ False IIV_VC 0.031128 0.0 ∞ False SIGMA 0.013086 0.0 ∞ False POP_KA 2.000000 -∞ ∞ False