pharmpy.results module¶
Option name |
Default value |
Type |
Description |
---|---|---|---|
|
|
bool |
Should shrinkage calculation of external tool be used. Otherwise pharmpy will calculate shrinkage |
- class pharmpy.results.ChainedModelfitResults(results=None)[source]¶
Bases:
collections.abc.MutableSequence
,pharmpy.results.ModelfitResults
A sequence of modelfit results given in order from first to final inherits from both list and ModelfitResults. Each method from ModelfitResults will be performed on the final modelfit object
- property correlation_matrix¶
The correlation matrix of the population parameter estimates
- property covariance_matrix¶
The covariance matrix of the population parameter estimates
- property evaluation_ofv¶
The ofv as if the model was evaulated
Currently works for classical estimation methods by taking the OFV of the first iteration.
- property individual_estimates¶
Individual parameter estimates
A DataFrame with ID as index one column for each individual parameter
- property individual_estimates_covariance¶
The covariance matrix of the individual estimates
- property individual_ofv¶
A Series with individual estimates indexed over ID
- property information_matrix¶
The Fischer information matrix of the population parameter estimates
- property minimization_successful¶
Was the minimization successful
- property model_name¶
- property ofv¶
Final objective function value
- property parameter_estimates¶
Parameter estimates as series
- property parameter_estimates_sdcorr¶
- property predictions¶
- property residuals¶
- property runtime_total¶
- property standard_errors¶
Standard errors of population parameter estimates
- property standard_errors_sdcorr¶
- class pharmpy.results.ModelfitResults(ofv=None, parameter_estimates=None, covariance_matrix=None, standard_errors=None, minimization_successful=None, individual_ofv=None, individual_estimates=None, runtime_total=None)[source]¶
Bases:
pharmpy.results.Results
Base class for results from a modelfit operation
- properties: individual_OFV is a df with currently ID and iOFV columns
model_name - name of model that generated the results model
- property aic¶
Final AIC value assuming the OFV to be -2LL
- property bic¶
Final BIC value assuming the OFV to be -2LL
- property correlation_matrix¶
The correlation matrix of the population parameter estimates
- property covariance_matrix¶
The covariance matrix of the population parameter estimates
- property evaluation_ofv¶
The ofv as if the model was evaulated
Currently works for classical estimation methods by taking the OFV of the first iteration.
- property individual_estimates¶
Individual parameter estimates
A DataFrame with ID as index one column for each individual parameter
- property individual_estimates_covariance¶
The covariance matrix of the individual estimates
- property individual_ofv¶
A Series with individual estimates indexed over ID
- property information_matrix¶
The Fischer information matrix of the population parameter estimates
- property minimization_successful¶
Was the minimization successful
- property ofv¶
Final objective function value
- property parameter_estimates¶
Parameter estimates as series
- plot_individual_predictions(predictions=None, individuals=None)[source]¶
Plot DV and predictions grouped on individuals
- Parameters
predictions (list) – A list of names of predictions to plot. None for all available
individuals (list) – A list of individuals to include. None for all individuals
- property relative_standard_errors¶
Relative standard errors of population parameter estimates
- property runtime_total¶
- property standard_errors¶
Standard errors of population parameter estimates
- class pharmpy.results.Results[source]¶
Bases:
object
Base class for all result classes
- get_and_reset_index(attr, **kwargs)[source]¶
Wrapper to reset index of attribute or result from method.
Used to facilitate importing multiindex dataframes into R
- class pharmpy.results.ResultsConfiguration[source]¶
Bases:
pharmpy.config.Configuration
- module = 'pharmpy.results'¶
This setting should be moved to the NONMEM plugin
- Type
FIXME
- native_shrinkage¶
Use shrinkage results from external tool
- class pharmpy.results.ResultsJSONEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]¶
Bases:
json.encoder.JSONEncoder
- default(obj)[source]¶
Implement this method in a subclass such that it returns a serializable object for
o
, or calls the base implementation (to raise aTypeError
).For example, to support arbitrary iterators, you could implement default like this:
def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) # Let the base class default method raise the TypeError return JSONEncoder.default(self, o)