Model#
- class pharmpy.Model[source]#
Bases:
object
The Pharmpy model class
Attributes Summary
Definitions of model statements
Dataset connected to model
The model dependent variable, i.e. y.
A free text discription of the model
Definitions of estimation steps
Filename extension of model file
Initial estimates for individual parameters
Model type specific code
Modelfit results for this model
Name of the model
Transformation to be applied to the observation data
Definitions of population parameters
Name of parent model
Definitions of random variables
Definitions of model statements
The type of the model value (dependent variable)
Methods Summary
copy
()Create a deepcopy of the model object
create_model
([obj])Factory for creating a
pharmpy.model
object from an object representing the modelhas_same_dataset_as
(other)Check if this model has the same dataset as another model
read_modelfit_results
(path)Read in modelfit results
Update model.datainfo for a new dataset
Attributes Documentation
- datainfo#
Definitions of model statements
- dataset#
Dataset connected to model
- dependent_variable#
The model dependent variable, i.e. y
- description#
A free text discription of the model
- estimation_steps#
Definitions of estimation steps
- filename_extension#
Filename extension of model file
- initial_individual_estimates#
Initial estimates for individual parameters
- model_code#
Model type specific code
- modelfit_results#
Modelfit results for this model
- name#
Name of the model
- observation_transformation#
Transformation to be applied to the observation data
- parameters#
Definitions of population parameters
- parent_model#
Name of parent model
- random_variables#
Definitions of random variables
- statements#
Definitions of model statements
- value_type#
The type of the model value (dependent variable)
By default this is set to ‘PREDICTION’ to mean that the model outputs a prediction. It could optionally be set to ‘LIKELIHOOD’ or ‘-2LL’ to let the model output the likelihood or -2*log(likelihood) of the prediction. If set to a symbol this variable can be used to change the type for different records. The model would then set this symbol to 0 for a prediction value, 1 for likelihood and 2 for -2ll.
Methods Documentation
- static create_model(obj=None, **kwargs)[source]#
Factory for creating a
pharmpy.model
object from an object representing the model- Parameters:
obj – path-like object pointing to the model file or an IO object.
- Returns:
Model – Generic
Model
if obj is None, otherwise appropriate implementation is invoked (e.g. NONMEM7Model
).