Learn R Programming

CoSMoS (version 2.2.0)

regenerateTS: Bulk time series generation

Description

Generates additional time series using parameters already fitted by generateTS, avoiding recomputation of the ACTF.

Usage

regenerateTS(ts, TSn = 1)

Value

An object of class 'cosmosts': a list of TSn numeric vectors of the same length as those in ts.

Arguments

ts

a cosmosts object returned by generateTS

TSn

number of time series to generate

Details

After calling generateTS, use regenerateTS to generate more time series with the same fitted parameters. This is faster than re-running generateTS because the ACTF fitting step is skipped.

See Also

generateTS, ARp

Examples

Run this code

library(CoSMoS)

## Fit once
x <- generateTS(margdist = "burrXII",
                margarg = list(scale = 1,
                               shape1 = .75,
                               shape2 = .25),
                acsvalue = acs(id = "weibull",
                               t = 0:30,
                               scale = 10,
                               shape = .75),
                n = 1000, p = 30, p0 = .5, TSn = 3)

## Generate more realisations with the same parameters
r <- regenerateTS(x)

plot(r)

Run the code above in your browser using DataLab