calculate_se_from_prec#

pharmpy.modeling.calculate_se_from_prec(precision_matrix)[source]#

Calculate standard errors from a precision matrix

Parameters:

precision_matrix (pd.DataFrame) – Input precision matrix

Returns:

pd.Series – Standard errors

Examples

>>> from pharmpy.modeling import calculate_se_from_prec
>>> from pharmpy.tools import load_example_modelfit_results
>>> results = load_example_modelfit_results("pheno")
>>> prec = results.precision_matrix
>>> prec
                  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_se_from_prec(prec)
PTVCL        0.000210
PTVV         0.026895
THETA_3      0.083762
IVCL         0.013415
IVV          0.007477
SIGMA_1_1    0.002279
dtype: float64

See also

calculate_se_from_cov

Standard errors from covariance matrix

calculate_corr_from_cov

Correlation matrix from covariance matrix

calculate_cov_from_prec

Covariance matrix from precision matrix

calculate_cov_from_corrse

Covariance matrix from correlation matrix and standard errors

calculate_prec_from_cov

Precision matrix from covariance matrix

calculate_prec_from_corrse

Precision matrix from correlation matrix and standard errors

calculate_corr_from_prec

Correlation matrix from precision matrix