Learn R Programming

CoSMoS (version 2.2.0)

checkTS: Check generated time series

Description

Compares sample statistics of generated time series against theoretically expected values.

Usage

checkTS(TS, distbounds = c(-Inf, Inf))

Value

An object of class c("checkTS", "matrix") with rows "expected" and one row per simulated series, and columns for mean, sd, skew, p0, acf_t1, acf_t2, acf_t3. Attributes margdist, margarg, and p0 are attached for use by plot.checkTS.

Arguments

TS

a cosmosts object from generateTS, or a list of numeric vectors, or a single numeric vector

distbounds

numeric vector of length 2; distribution bounds (default c(-Inf, Inf))

See Also

generateTS, plot.checkTS, moments

Examples

Run this code

library(CoSMoS)

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 = 5)

checkTS(x)

Run the code above in your browser using DataLab