calculate_pk_parameters_statistics#
- pharmpy.modeling.calculate_pk_parameters_statistics(model, parameter_estimates, covariance_matrix=None, seed=None)[source]#
Calculate statistics for common pharmacokinetic parameters
Calculate the mean (expected value of the distribution), variance (variance of the distribution) and standard error for some individual pre-defined pharmacokinetic parameters.
- Parameters:
model (Model) – A previously estimated model
parameter_estimates (pd.Series) – Parameter estimates
covariance_matrix (pd.DataFrame) – Parameter uncertainty covariance matrix
seed (Generator or int) – Random number generator or seed
- Returns:
pd.DataFrame – A DataFrame of statistics indexed on parameter and covariate value.
Examples
>>> from pharmpy.modeling import load_example_model, create_rng >>> from pharmpy.modeling import calculate_pk_parameters_statistics >>> from pharmpy.tools import load_example_modelfit_results >>> model = load_example_model("pheno") >>> results = load_example_modelfit_results("pheno") >>> rng = create_rng(23) >>> pe = results.parameter_estimates >>> cov = results.covariance_matrix >>> calculate_pk_parameters_statistics(model, pe, cov, seed=rng) mean variance stderr parameter covariates t_half_elim p5 173.337164 1769.493756 44.852625 median 149.567842 1317.474199 37.819338 p95 149.567842 1317.474199 37.819338 k_e p5 0.004234 0.000001 0.001100 median 0.004907 0.000001 0.001201 p95 0.004907 0.000001 0.001201
See also
calculate_individual_parameter_statistics
Calculation of statistics for arbitrary parameters