-
Notifications
You must be signed in to change notification settings - Fork 2
/
categorical_MARKOV1.xml
117 lines (96 loc) · 4.54 KB
/
categorical_MARKOV1.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?xml version="1.0" encoding="UTF-8"?>
<PharmML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.pharmml.org/pharmml/0.7/PharmML"
xsi:schemaLocation="http://www.pharmml.org/pharmml/0.7/PharmML http://www.pharmml.org/pharmml/0.7/PharmML"
xmlns:math="http://www.pharmml.org/pharmml/0.7/Maths"
xmlns:ct="http://www.pharmml.org/pharmml/0.7/CommonTypes"
xmlns:ds="http://www.pharmml.org/pharmml/0.7/Dataset"
xmlns:mstep="http://www.pharmml.org/pharmml/0.7/ModellingSteps"
implementedBy="MJS" writtenVersion="0.8" id="i1">
<ct:Name>Example 1: Simple Markov Model</ct:Name>
<ct:Description>Simple Markov Model from Sharing Disease Models Paper DRAFT</ct:Description>
<IndependentVariable symbId="t"/>
<!-- SECTION I -->
<ModelDefinition xmlns="http://www.pharmml.org/pharmml/0.7/ModelDefinition">
<!-- OBSERVATIONS -->
<ObservationModel blkId="om1">
<Discrete>
<CategoricalData>
<ListOfCategories>
<Category symbId="Alive"/>
<Category symbId="Dead"/>
</ListOfCategories>
<CategoryVariable symbId="Y"/>
<InitialStateVariable symbId="Yinit"/> <!-- 100 people - see ModellingSteps/SimulationStep -->
<PreviousStateVariable symbId="Yp"/>
<Dependance type="discreteMarkov"/>
<!-- P(Y=Dead|Yp=Alive)=0.05 -->
<ProbabilityAssignment>
<Probability symbId="p1">
<CurrentState>
<math:LogicBinop op="eq">
<ct:SymbRef symbIdRef="Y"/>
<ct:SymbRef symbIdRef="Dead"/>
</math:LogicBinop>
</CurrentState>
<PreviousState>
<math:LogicBinop op="eq">
<ct:SymbRef symbIdRef="Yp"/>
<ct:SymbRef symbIdRef="Alive"/>
</math:LogicBinop>
</PreviousState>
</Probability>
<ct:Assign>
<ct:Real>0.05</ct:Real>
</ct:Assign>
</ProbabilityAssignment>
</CategoricalData>
</Discrete>
</ObservationModel>
</ModelDefinition>
<!-- OBSERVATION DEFINITION: Amount of people in each state for years 1-10 -->
<TrialDesign xmlns="http://www.pharmml.org/pharmml/0.7/TrialDesign">
<Observations>
<Observation oid="obsOid">
<ObservationTimes>
<ct:Assign>
<ct:Sequence>
<ct:Begin>
<ct:Real>1</ct:Real>
</ct:Begin>
<ct:StepSize>
<ct:Real>1</ct:Real>
</ct:StepSize>
<ct:End>
<ct:Real>10</ct:Real>
</ct:End>
</ct:Sequence>
</ct:Assign>
</ObservationTimes>
<Discrete>
<ct:SymbRef blkIdRef="om1" symbIdRef="Y"/>
</Discrete>
</Observation>
</Observations>
</TrialDesign>
<!-- SIMULATION TASK DESCRIPTION -->
<mstep:ModellingSteps>
<mstep:SimulationStep oid="simOid">
<mstep:ObservationsReference>
<ct:OidRef oidRef="obsOid"/>
</mstep:ObservationsReference>
<ct:VariableAssignment>
<ct:SymbRef blkIdRef="om1" symbIdRef="Yinit"/>
<ct:Assign>
<ct:Vector>
<ct:VectorElements>
<ct:Real>100</ct:Real>
<ct:Real>0</ct:Real>
</ct:VectorElements>
</ct:Vector>
</ct:Assign>
</ct:VariableAssignment>
<mstep:Operation order="1" opType="Amount of people in each state for years 1-10"/>
</mstep:SimulationStep>
</mstep:ModellingSteps>
</PharmML>