Learn R Programming

gmwm (version 2.0.0)

gts: Create a GMWM TS Object based on data

Description

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

Usage

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

Examples

Run this code
m = data.frame(rnorm(50))
x = gts(m, unit = 'sec', name = 'example')
x
plot(x)

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

Run the code above in your browser using DataLab