calculate_cov_from_inf#
- pharmpy.modeling.calculate_cov_from_inf(information_matrix)[source]#
Calculate covariance matrix from an information matrix
- Parameters:
information_matrix (pd.DataFrame) – Information matrix
- Returns:
pd.DataFrame – Covariance matrix
Examples
>>> from pharmpy.modeling import load_example_model, calculate_cov_from_inf >>> model = load_example_model("pheno") >>> inf = model.modelfit_results.information_matrix >>> inf PTVCL PTVV THETA_3 IVCL IVV SIGMA_1_1 PTVCL 2.995567e+07 22660.028196 16057.855248 203511.614428 -39474.250514 -820118.299536 PTVV 2.266003e+04 2129.904642 260.176234 -375.266233 -2800.816246 -7718.769557 THETA_3 1.605786e+04 260.176234 187.038903 177.207683 -205.808480 -2225.150449 IVCL 2.035116e+05 -375.266233 177.207683 7527.530027 2462.974821 -9977.488860 IVV -3.947425e+04 -2800.816246 -205.808480 2462.974821 22343.198618 9370.758371 SIGMA_1_1 -8.201183e+05 -7718.769557 -2225.150449 -9977.488860 9370.758371 249847.177845 >>> calculate_cov_from_inf(inf) PTVCL PTVV THETA_3 IVCL IVV SIGMA_1_1 PTVCL 4.411510e-08 4.010000e-08 -0.000002 -0.000001 1.538630e-07 8.178090e-08 PTVV 4.010000e-08 7.233530e-04 -0.000804 0.000050 7.171840e-05 1.461760e-05 THETA_3 -1.665010e-06 -8.040250e-04 0.007016 -0.000108 -3.944800e-05 2.932950e-05 IVCL -1.093430e-06 4.981380e-05 -0.000108 0.000180 -1.856650e-05 4.867230e-06 IVV 1.538630e-07 7.171840e-05 -0.000039 -0.000019 5.589820e-05 -4.685650e-07 SIGMA_1_1 8.178090e-08 1.461760e-05 0.000029 0.000005 -4.685650e-07 5.195640e-06
See also
calculate_se_from_cov
Standard errors from covariance matrix
calculate_se_from_inf
Standard errors from information matrix
calculate_corr_from_cov
Correlation matrix from covariance matrix
calculate_cov_from_corrse
Covariance matrix from correlation matrix and standard errors
calculate_inf_from_cov
Information matrix from covariance matrix
calculate_inf_from_corrse
Information matrix from correlation matrix and standard errors
calculate_corr_from_inf
Correlation matrix from information matrix