CTSM - Continuous Time Stochastic Modelling

Frequently asked questions

The following is a collection of questions and answers, plus important notes and tips, concerning the use of CTSM:

Installation:

A number of questions have been asked regarding problems with the installation of CTSM on different platforms. Most of these problems have been caused by incorrectly specified environment variables.

It must therefore be stressed that it is very important to remember to update your environment variables according to the specifications given by the installation program after the installation of CTSM is complete.

On Linux and Solaris platforms the environment variable LD_LIBRARY_PATH must be updated and on Windows platforms the environment variables PATH and TEMP must be updated.

Detailed information about how to change an environment variable can be found in the User’s Guide.

Note: CTSM for Solaris has been optimized specifically for SUN servers equipped with ULTRASPARC-III processors using the Forte Developer 7 compiler suite. It will not run on systems with pre-ULTRASPARC-III processors or older versions of the compiler suite. For systems with newer versions of the compiler suite, a workaround must be used to make CTSM run properly.

Model setup:

Q: When I make changes in a formula and then click elsewhere in the GUI, my changes disappear. What do I do?

A: Press TAB or ENTER, when you are done making your changes, before you click elsewhere in the GUI!

Q: I have problems editing an existing formula. It does not seem possible to obtain an 'edit-mode'. What do I do?

A: Triple-clicking the formula should give you an 'edit-mode'!

Q: I have problems typing in the '^' in e.g. 'x^2' on my Linux system. What do I do?

A: There is no way to overcome this, except by using the transformation 'x^2=exp(log(x)*2)'!

Data file setup:

A number of questions have been asked regarding problems with the data files used in CTSM, most of which have been caused by incorrectly formed data files.

It must therefore be stressed that data files must be semicolon-delimited and have the same number of columns in all rows and that the rows should not be semicolon-terminated.

Estimation:

Q: I have problems estimating the measurement noise covariance. Any help?

A: Estimate 'z=log(sigma^2)' instead of just ’sigma’ or 'sigma^2' (remember to type 'exp(z)' in your model)!

Q: I always get the error ’The state covariance matrix is not positive definite’ and estimation does not start. Why?

A: This error often occurs due to a floating point exception (division by zero or log() or sqrt() of a negative number) that is not being detected until an attempt is made to invert the state covariance matrix. The only way to solve this problem is to make sure that floating point exceptions cannot occur, e.g. by choosing appropriate initial values and bounds on all parameters and initial states and by using a model that is as simple as possible!

Q: I always get the error ’Unable to perform numerical ODE solution’ and estimation does not start. Why?

A: This error often occurs due to a floating point exception (division by zero or log() or sqrt() of a negative number) that is not being detected until an attempt is made to perform numerical ODE solution. The only way to solve this problem is to make sure that floating point exceptions cannot occur, e.g. by choosing appropriate initial values and bounds on all parameters and initial states and by using a model that is as simple as possible!

A number of other questions have been asked regarding problems with estimation in CTSM, most of which have been caused by inappropriately specified initial values or bounds on parameters and initial states.

It must therefore be stressed that all initial values and bounds must be set to a finite number (you must therefore remember to change the default values of +/-Inf for upper and lower bounds).

Also, since the state covariance matrix must always be positive definite, remember to use appropriate initial values and bounds for the diffusion term parameters (i.e. use 1e-12 instead of zero on the diagonal).

Other stuff:

Q: Is it possible to use CTSM for performing simulations?

A: Yes, simulation of the deterministic part of a model (with a diffusion term set to zero) is possible (you should use the 'Generate simulation data' button or menu). Remember, however, that the input data file must contain columns for all model outputs as well (they are not actually used, so they may hold dummy values, but they must be there). Stochastic simulation (single solution paths or mean and covariance of the solution based on Monte Carlo simulation using a non-zero diffusion term) is not possible. You must write your own code to accomplish this!

Known bugs:

1: When using the 'Generate filtering data' option with a nonlinear (NL) model and the 'Method for Solution of Propagation Equations' set to 'Numerical ODE solution', the standard deviations reported in the output file are not correct. A patch that fixes this problem is available and can be requested by sending an e-mail to CTSM support.

Links:

More tips and tricks can be found in the User’s Guide, but if you still have questions or comments about CTSM or want to file a bug report, please send an e-mail to CTSM support.

This page was last updated on October 30th 2005