phylopomp
Phylodynamics for POMPs
|
Go to the source code of this file.
Functions | |
void | R_init_phylopomp (DllInfo *) |
void | lbdp_rinit (double *, const double *, double, const int *, const int *, const int *, const double *) |
Latent-state initializer (rinit). More... | |
void | lbdp_gill (double *, const double *, const int *, const int *, const int *, const double *, double, double) |
void | lbdp_dmeas (double *, const double *, const double *, const double *, int, const int *, const int *, const int *, const int *, const double *, double) |
Measurement model likelihood (dmeasure). More... | |
void | seirs_rinit (double *, const double *, double, const int *, const int *, const int *, const double *) |
void | seirs_gill (double *, const double *, const int *, const int *, const int *, const double *, double, double) |
void | seirs_dmeas (double *, const double *, const double *, const double *, int, const int *, const int *, const int *, const int *, const double *, double) |
Measurement model likelihood (dmeasure). More... | |
void | sirs_rinit (double *, const double *, double, const int *, const int *, const int *, const double *) |
Latent-state initializer (rinit). More... | |
void | sirs_gill (double *, const double *, const int *, const int *, const int *, const double *, double, double) |
void | sirs_dmeas (double *, const double *, const double *, const double *, int, const int *, const int *, const int *, const int *, const double *, double) |
Measurement model likelihood (dmeasure). More... | |
void | twospecies_rinit (double *, const double *, double, const int *, const int *, const int *, const double *) |
void | twospecies_gill (double *, const double *, const int *, const int *, const int *, const double *, double, double) |
void | twospecies_dmeas (double *, const double *, const double *, const double *, int, const int *, const int *, const int *, const int *, const double *, double) |
Measurement model likelihood (dmeasure). More... | |
void lbdp_dmeas | ( | double * | __lik, |
const double * | __y, | ||
const double * | __x, | ||
const double * | __p, | ||
int | give_log, | ||
const int * | __obsindex, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars, | ||
double | t | ||
) |
void lbdp_gill | ( | double * | __x, |
const double * | __p, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars, | ||
double | t, | ||
double | dt | ||
) |
Latent-state process simulator (rprocess).
This integrates the filter equation.
Definition at line 71 of file lbdp_pomp.c.
void lbdp_rinit | ( | double * | __x, |
const double * | __p, | ||
double | t, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars | ||
) |
Latent-state initializer (rinit).
Definition at line 52 of file lbdp_pomp.c.
void seirs_dmeas | ( | double * | __lik, |
const double * | __y, | ||
const double * | __x, | ||
const double * | __p, | ||
int | give_log, | ||
const int * | __obsindex, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars, | ||
double | t | ||
) |
void seirs_gill | ( | double * | __x, |
const double * | __p, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars, | ||
double | t, | ||
double | dt | ||
) |
Simulator for the latent-state process (rprocess).
This is the Gillespie algorithm applied to the solution of the filter equation for the SEIRS process.
Definition at line 139 of file seirs_pomp.c.
void seirs_rinit | ( | double * | __x, |
const double * | __p, | ||
double | t0, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars | ||
) |
Latent-state initializer (rinit component).
The state variables include S, E, I, R plus 'ellE' and 'ellI' (numbers of E- and I-deme lineages), the accumulated weight ('ll'), the current node number ('node'), and the coloring of each lineage ('COLOR').
Definition at line 114 of file seirs_pomp.c.
void sirs_dmeas | ( | double * | __lik, |
const double * | __y, | ||
const double * | __x, | ||
const double * | __p, | ||
int | give_log, | ||
const int * | __obsindex, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars, | ||
double | t | ||
) |
void sirs_gill | ( | double * | __x, |
const double * | __p, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars, | ||
double | t, | ||
double | dt | ||
) |
Latent-state process simulator (rprocess).
This integrates the filter equation.
Definition at line 90 of file sirs_pomp.c.
void sirs_rinit | ( | double * | __x, |
const double * | __p, | ||
double | t, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars | ||
) |
Latent-state initializer (rinit).
Definition at line 68 of file sirs_pomp.c.
void twospecies_dmeas | ( | double * | __lik, |
const double * | __y, | ||
const double * | __x, | ||
const double * | __p, | ||
int | give_log, | ||
const int * | __obsindex, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars, | ||
double | t | ||
) |
void twospecies_gill | ( | double * | __x, |
const double * | __p, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars, | ||
double | t, | ||
double | dt | ||
) |
Simulator for the latent-state process (rprocess).
This is the Gillespie algorithm applied to the solution of the filter equation for the TwoSpecies model. It advances the state from time t
to time t+dt
.
A tricky aspect of this function is that it must return a "valid" state even when the state is incompatible with the genealogy. In such a case, we set the log likelihood (ll
) to R_NegInf
, but the state must remain valid. Hence insertion of extra infectives, etc.
FIXME: At the moment, the following codes exclude the possibility of importation of infection.
Definition at line 290 of file twospecies_pomp.c.
void twospecies_rinit | ( | double * | __x, |
const double * | __p, | ||
double | t0, | ||
const int * | __stateindex, | ||
const int * | __parindex, | ||
const int * | __covindex, | ||
const double * | __covars | ||
) |
Latent-state initializer (rinit component).
The state variables include S, E, I, R plus 'ellE' and 'ellI' (numbers of E- and I-deme lineages), the accumulated weight ('ll'), the current node number ('node'), and the coloring of each lineage ('COLOR').
Definition at line 249 of file twospecies_pomp.c.