#ifndef DMSTATE_H_
#define DMSTATE_H_
#include <distributions/DistDiscrete.h>
/**
* Distribution of x in multi-state homogeneous Markov model at time t
* when state at time 0 was xold and transition intensity matrix is
* Lambda
* <pre>
* x ~ dmstate(xold, dt, Lambda[,])
* </pre>
* @short Interval censored transitions in a multistate Markov model
*/
class DMState : public DistDiscrete {
public:
DMState();
~DMState();
double d(double x, std::vector<SArray const *> const ¶meters,
bool give_log) const;
double p(double x, std::vector<SArray const *> const ¶meters, bool lower,
bool give_log) const;
double q(double p, std::vector<SArray const *> const ¶meters, bool lower,
bool log_p) const;
double r(std::vector<SArray const *> const ¶meters) const;
double l(std::vector<SArray const *> const ¶meters) const;
double u(std::vector<SArray const *> const ¶meters) const;
double mean(std::vector<SArray const *> const ¶meters) const;
double var(std::vector<SArray const *> const ¶meters) const;
/**
* Checks that x is scalar, t is scalar and Lambda is
* a square matrix
*/
bool checkParameterDim(std::vector<SArray const *> const ¶meters) const;
/**
* Checks that t > 0, xold is in permitted range 1:nrow(Lambda)
* and Lambda is a valid transition intensity matrix with
* rows that sum to 0.
*/
bool checkParameterValue(std::vector<SArray const *> const ¶meters) const;};
#endif /* DMSTATE_H_ */
syntax highlighted by Code2HTML, v. 0.9.1