## Hn En212w En23n3n3mEn 12m

where Ôpr(*) = E^T(*) — Ep^(*), with conditional expectations and co-variances evaluated at point .

Appendix 2

The following recurrent formulas can be easily verified using Bayes theorem.

We first consider the case of completely observable covariates and assume that Z is partitioned into two disjoint blocks Z = (Z0lZ\). For m > 1, let (jo,ji, ■ ■ ■ ,jm) be a possible path in the model connecting the initial state jo with a transient or an absorbing state jm and such that (jo,ji, ■ ■ ■ ,jm-i) C T. Let (to = O^ti^^^tm) be an ordered sequence 0 = to < ti ■■■ < tm of potential times of entrances into states given by the sequence {ji, t = O^^m}. For m > 0, put Wm = (Ti,Ji)m=o, wm = (te,je)m=o. Under assumptions of condition 2.1, the posterior distribution of the covariate Zo is of the form

= Jlm(dzo,T\Wm,Zi) if jm eT,tm < T < tm+i,m > 0 ,

where no(d,zo\jo,zi) is the conditional distribution of the covariate Zo given the initial state Jo = jo and the covariate Zi = zi. For m > 1

f (j m, tm \ jm —i, tm— i, (zi, zo))^m—i(dzo\wm—i,zi) Em if (j m, tm \ jm— i ,'tm — u (zi,zo))

where Em—i denotes conditional expectation with respect to l^m— i (dzo\wm—i,zi). In addition, for m > 0

— / j | \ _ F(s\(j m, tm ), (zi, zo ))lm(dzo\wm,zi) , .

Next we collect parameters of the marginal model obtained by integrating out the covariate Zo from the model. If the covariate vector Z = (Zo, Zi) is taken to assume values in the Cartesian product Zo xZi of a q and d-q dimensional Euclidean space, then the marginal model represents transformation X of the original probability space space (Zo xZi xQ, (G®Ft), Pr) into the space (Zi, (Gi ®Ft), Prx) corresponding to the assignment X(zo,zi,u>) = (zi,u>). Thus the marginal model is adapted to the marginal self-exciting filtration, generated by Gi ®Ft = v(Zi) ® a(Jo,Nh(s),Yh(s+) : s < t). The probability Prx is the induced marginal probability, obtained by integrating out the covariate Zo from the model. In the following we write "Pr" for the induced probability Prx, to simplify the notation.

For m > 1, let (jo,... ,jm—i) be a sequence of transient states. Set

Fm (t, jm—i\Wm—i,zi) = Em—iF(t, \tm—i,jm—i, zi,Zo) , fm((t, jm\Wm—i,zi) — Em — if (t, jm |tm— i,jm—i, zi,Zo) , ~ / . • i \ fm jm\wm—i,zi)