Multiple Observed Fields
An example of multiple observed fields, is shown in table_multiple_obs.
DRUG1 |
DRUG1_FLAG |
DRUG2 |
DRUG2_FLAG |
comment |
|
|---|---|---|---|---|---|
obs |
10.5 |
1 |
0.2 |
1 |
Both drugs valid |
obs |
10.5 |
1 |
0.0 |
0 |
only drug1 valid |
obs |
-4.1 |
0 |
0.0 |
0 |
both drugs invalid |
obs |
-4.1 |
0 |
0.5 |
1 |
only drug2 valid |
In this case the PREDICTIONS section may look something like:-
PREDICTIONS: |
p[DRUG1] = s[CEN1]/m[V1]
c[DRUG1] ~ norm(p[DRUG1], m[ANOISE_var1])
p[DRUG2] = s[CEN2]/m[V2]
c[DRUG2] ~ norm(p[DRUG2], m[ANOISE_var2])
Here PoPy uses the ‘DRUG1_FLAG’ and ‘DRUG2_FLAG’ fields from the data set to only compute the likelihood from valid observations. You don’t have to use ‘if’ statements in the PREDICTIONS section to achieve this.