CTSM-R - Continuous Time Stochastic Modelling for R


CTSM is a tool for estimating embedded parameters in a continuous time stochastic state space model.
CTSM has been developed at DTU Compute (former DTU Informatics) over several years. CTSM-R provides a new scripting interface through the statistical language R.
Mixing CTSM with R provides easy access to data handling and plotting tools required in any kind of modelling.

Installation of ctsmr

First carry out the instructions below for your OS:

Windows

Make sure to install the latest version of R - currently R 3.5.1 https://cloud.r-project.org/bin/windows/base/R-3.5.1-win.exe.

Next you must install a set of compilers required for ctsmr to work. Download https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe and install Rtools35. You do not have to change any settings during the installation of Rtools.

macOS (OS X 10.11 or higher)

Make sure to install the latest version of R - currently R 3.5.1 https://cloud.r-project.org/bin/macosx/R-3.5.1.pkg

Next you must install a set of compilers required for ctsmr to work. For macOS you have to install clang and Gfortran separately.

Download Gfortran 6.1 https://cloud.r-project.org/bin/macosx/tools/gfortran-6.1.pkg and install it.
You may install an Apple provided Clang4 by executing "xcode-select --install" in a Terminal. You can also download Clang6 https://cloud.r-project.org/bin/macosx/tools/clang-6.0.0.pkg and install it.

You may have to tell R where to find the newly installed compilers. This is done through a text file "Makevars". In a Terminal run

# Create a folder .R in the user folder. 
mkdir ~/.R
# Download Makevars
curl -o ~/.R/Makevars http://ctsm.info/Makevars.macos 

Linux

Use any newer version of R and make sure to install gcc and gfortran through the package manager of your OS.

Install the ctsmr R package

Open R using e.g. Rstudio. In the Console run

install.packages("ctsmr", repos = c(ctsmr = "http://ctsm.info/repo/dev", getOption("repos")))

ctsmr is now ready for continous time stochastic modelling.

Documentation

How to use CTSM-R is described in the CTSM-R user's guide and reference manual.

Examples

Heat dynamics of buildings and building components

Contacts

For questions, bugs and comments please send an email to info@ctsm.info