gts: Create a GMWM TS Object based on data

Description Usage Arguments Value Author(s) Examples

View source: R/gts.R

Description

Setups a time series oriented object that works well with graphing and summary utilities

Usage

1
2
gts(data, start = 0, end = NULL, freq = 1, unit = NULL,
  name = NULL)

Arguments

data

A one-column matrix, data.frame, or a numeric vector.

start

A numeric that provides the time of the first observation.

end

A numeric that provides the time of the last observation.

freq

A numeric that provides the rate of samples. Default value is 1.

unit

A string that contains the unit expression of the frequency. Default value is NULL.

name

A string that provides an identifier to the data. Default value is NULL.

Value

A gts object with the following attributes:

start

The time of the first observation

end

The time of the last observation

freq

Numeric representation of frequency

unit

String representation of the unit

name

Name of the dataset

Author(s)

JJB, Wenchao

Examples

1
2
3
4
5
6
7
8
m = data.frame(rnorm(50))
x = gts(m, unit = 'sec', name = 'example')
x
plot(x)

x = gen_gts(50, WN(sigma2 = 1))
x = gts(x, freq = 100, unit = 'sec')
plot(x)

SMAC-Group/gmwm documentation built on Sept. 11, 2021, 10:06 a.m.