Complete Stochastic Modelling Solution

A single framework, unifying, extending, and improving a general-purpose modelling strategy, based on the assumption that any process can emerge by transforming a specific 'parent' Gaussian process Papalexiou (2018) .

CoSMoS is an R package that makes time series generation with desired properties easy. Just choose the characteristics of the time series you want to generate, and it will do the rest. The generated time series preserve any probability distribution and any linear autocorrelation structure. Users can generate as many and as long time series from processes such as precipitation, wind, temperature, relative humidity etc. It is based on a framework that unified, extended, and improved a modelling strategy that generates time series by transforming “parent” Gaussian time series having specific characteristics (Papalexiou, 2018).


To install the latest version of the package run:

if (!require('devtools')) {install.packages('devtools'); library(devtools)} 
install_github('strnda/CoSMoS', upgrade = 'never')


The package was partly funded by the Global institute for Water Security (GIWS; and the Global Water Futures (GWF; program.


Coded and maintained by: Filip Strnad
Conceptual design by: Simon Michael Papalexiou, and Filip Strnad
Beta tested by: Filip Strnad, Yannis Markonis, and Simon Michael Papalexiou


Papalexiou, S.M., 2018. Unified theory for stochastic modelling of hydroclimatic processes: Preserving marginal distributions, correlation structures, and intermittency. Advances in Water Resources 115, 234-252.


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.0.0 by Kevin Shook, 9 months ago

Browse source code at

Authors: Filip Strnad [aut] , Simon Michael Papalexiou [aut] , Francesco Serinaldi [aut] , Yannis Markonis [aut] , Kevin Shook [ctb, cre]

Documentation:   PDF Manual  

Task views: Hydrological Data and Modeling

GPL-3 license

Imports utils, methods, stats, grDevices, nloptr, MBA, Matrix, mAr, matrixcalc, mvtnorm, plotly, cowplot, directlabels, animation, pracma

Depends on ggplot2, data.table

Suggests testthat, knitr, rmarkdown

See at CRAN