get_baselines#

pharmpy.modeling.get_baselines(model)[source]#

Baselines for each subject.

Baseline is taken to be the first row even if that has a missing value.

Parameters:

model (Model) – Pharmpy model

Returns:

pd.DataFrame – Dataset with the baselines

Examples

>>> from pharmpy.modeling import load_example_model, get_baselines
>>> model = load_example_model("pheno")
>>> get_baselines(model)
     TIME  AMT  WGT  APGR   DV  FA1  FA2
ID
1    0.0  25.0  1.4   7.0  0.0  1.0  1.0
2    0.0  15.0  1.5   9.0  0.0  1.0  1.0
3    0.0  30.0  1.5   6.0  0.0  1.0  1.0
4    0.0  18.6  0.9   6.0  0.0  1.0  1.0
5    0.0  27.0  1.4   7.0  0.0  1.0  1.0
6    0.0  24.0  1.2   5.0  0.0  1.0  1.0
7    0.0  19.0  1.0   5.0  0.0  1.0  1.0
8    0.0  24.0  1.2   7.0  0.0  1.0  1.0
9    0.0  27.0  1.4   8.0  0.0  1.0  1.0
10   0.0  27.0  1.4   7.0  0.0  1.0  1.0
11   0.0  24.0  1.2   7.0  0.0  1.0  1.0
12   0.0  26.0  1.3   6.0  0.0  1.0  1.0
13   0.0  11.0  1.1   6.0  0.0  1.0  1.0
14   0.0  22.0  1.1   7.0  0.0  1.0  1.0
15   0.0  26.0  1.3   7.0  0.0  1.0  1.0
16   0.0  12.0  1.2   9.0  0.0  1.0  1.0
17   0.0  22.0  1.1   5.0  0.0  1.0  1.0
18   0.0  20.0  1.0   5.0  0.0  1.0  1.0
19   0.0  10.0  1.0   1.0  0.0  1.0  1.0
20   0.0  24.0  1.2   6.0  0.0  1.0  1.0
21   0.0  17.5  1.8   7.0  0.0  1.0  1.0
22   0.0  15.0  1.5   8.0  0.0  1.0  1.0
23   0.0  60.0  3.1   3.0  0.0  1.0  1.0
24   0.0  63.0  3.2   2.0  0.0  1.0  1.0
25   0.0  15.0  0.7   1.0  0.0  1.0  1.0
26   0.0  70.0  3.5   9.0  0.0  1.0  1.0
27   0.0  35.0  1.9   5.0  0.0  1.0  1.0
28   0.0  60.0  3.2   9.0  0.0  1.0  1.0
29   0.0  20.0  1.0   7.0  0.0  1.0  1.0
30   0.0  18.0  1.8   8.0  0.0  1.0  1.0
31   0.0  30.0  1.4   8.0  0.0  1.0  1.0
32   0.0  70.0  3.6   9.0  0.0  1.0  1.0
33   0.0  17.0  1.7   8.0  0.0  1.0  1.0
34   0.0  34.0  1.7   4.0  0.0  1.0  1.0
35   0.0  25.0  2.5   5.0  0.0  1.0  1.0
36   0.0  30.0  1.5   5.0  0.0  1.0  1.0
37   0.0  24.0  1.2   9.0  0.0  1.0  1.0
38   0.0  26.0  1.3   8.0  0.0  1.0  1.0
39   0.0  56.0  1.9  10.0  0.0  1.0  1.0
40   0.0  19.0  1.1   3.0  0.0  1.0  1.0
41   0.0  34.0  1.7   7.0  0.0  1.0  1.0
42   0.0  28.0  2.8   9.0  0.0  1.0  1.0
43   0.0  18.0  0.9   1.0  0.0  1.0  1.0
44   0.0  14.0  1.4   7.0  0.0  1.0  1.0
45   0.0  16.0  0.8   2.0  0.0  1.0  1.0
46   0.0  11.0  1.1   8.0  0.0  1.0  1.0
47   0.0  40.0  2.6   9.0  0.0  1.0  1.0
48   0.0  14.0  0.7   8.0  0.0  1.0  1.0
49   0.0  26.0  1.3   8.0  0.0  1.0  1.0
50   0.0  20.0  1.1   6.0  0.0  1.0  1.0
51   0.0  18.0  0.9   9.0  0.0  1.0  1.0
52   0.0   9.5  0.9   7.0  0.0  1.0  1.0
53   0.0  17.0  1.7   8.0  0.0  1.0  1.0
54   0.0  18.0  1.8   8.0  0.0  1.0  1.0
55   0.0  25.0  1.1   4.0  0.0  1.0  1.0
56   0.0  12.0  0.6   4.0  0.0  1.0  1.0
57   0.0  20.0  2.1   6.0  0.0  1.0  1.0
58   0.0  14.0  1.4   8.0  0.0  1.0  1.0
59   0.0  22.8  1.1   6.0  0.0  1.0  1.0