for every release
-----------------
check all files are included in package build: help pages, PDF manual rebuilt, run update-docsrc.
check Changelog, NEWS, DESCRIPTION file have correct dates and versions
Run fast and slow tests


---

OTHER

efpt.msm, ppass.msm and sojourn.msm with time dependent covs? easier with qematrix.msm rewrite.
   
support states as labels in efpt (and others?)

No point printing CIs for fixed parameters? todo with qematrix.msm rewrite

In extractor functions, warn that polynomial contrasts not supported,
only treatment contrasts. (factorcov2numeric.msm)
store in covdata whether model matrix built using treat/poly for factors?
one for output functions rewrite?  must be better r way of doing factors. predict.lm?

warn for factor states
	* R/msm.R(msm.form.data): Handle factor states (with levels
	1:nstates) by converting to numeric.


POSSIBLE MAJOR DEVELOPMENTS

MCMC estimation.  Done basic JAGS interface, but convergence
difficulties typical.  Stan might be better (esp for HMMs) but can't
do matrix exponentials in it.  Haven't tried inserting random effects
yet.

Phase-type models.  Build appropriate parameter constraints in.

Internationalisation.


SOME OTHER SUGGESTIONS: not all may be sensible.

OpenMP for parallel C code called from R, see Writing R Extensions.
Can't call R from parallel part, but using R math lib or lapack/expm OK?

Turnbull method to non-parametrically estimate time to interval-censored event.

Viterbi algorithm.  Probability of each hidden state at each time, instead of just most probable.
To compute this, need probabilities of all paths ending in state L at time ti: i.e. be sum_k instead of max_k in formula in Sec2.17 of PDF manual.

Bureau survival plots

Multiple realisations from same hidden trace, and/or multivariate HMM outcomes
cf. multiple multi-state processes with shared random effects?

Truncated observations.

Steady state probabilities

Use S_alloc instead of Calloc as in Viterbi - no need to free. Can't use on.exit to free on interrupt unless pointer declared globally.

Time-inhomogeneous models with smoothly-varying intensities.  Product
integral method looks easy, e.g. for predictable covariates like age.
Alternatively, numerically integrate the Kolmogorov equations, as in
Titman (Biometrics 2011).  deSolve package could be used for this in C.
Difficult .Call type mechanism needed for using user-defined R functions
in C. See Writing R Extensions 5.11.1 for a possible starting point.
Or Rcpp.

make msm.check.model for censored states - detect model
   inconsistency. see previous errors.R

check out Banks, H. T., et al (2012). Simulation algorithms for
   continuous time Markov chain models. Simulation and
Modeling Related to Computational Science and Robotics Technology 37, 3-18.

Li, Y. P., and Chan, W. (2006). Analysis of longitudinal multinomial outcome data. Biometrical Journal 48, 319-326.