powered by
Simulate a lts object based on a supplied time series model.
lts
gen_lts(n, model, start = 0, end = NULL, freq = 1, unit_ts = NULL, unit_time = NULL, name_ts = NULL, name_time = NULL, process = NULL)
An interger indicating the amount of observations generated in this function.
interger
A ts.model or simts object containing one of the allowed models.
ts.model
simts
A numeric that provides the time of the first observation.
numeric
A numeric that provides the time of the last observation.
A numeric that provides the rate/frequency at which the time series is sampled. The default value is 1.
A string that contains the unit of measure of the time series. The default value is NULL.
string
NULL
A string that contains the unit of measure of the time. The default value is NULL.
A string that provides an identifier for the time series data. Default value is NULL.
A string that provides an identifier for the time. Default value is NULL.
A vector that contains model names of each column in the data object where the last name is the sum of the previous names.
vector
data
A lts object with the following attributes:
The time of the first observation.
The time of the last observation.
Numeric representation of the sampling frequency/rate.
A string reporting the unit of measurement.
Name of the generated dataset.
A vector that contains model names of decomposed and combined processes
This function accepts either a ts.model object (e.g. AR1(phi = .3, sigma2 =1) + WN(sigma2 = 1)) or a simts object.
# NOT RUN { # AR set.seed(1336) model = AR1(phi = .99, sigma2 = 1) + WN(sigma2 = 1) test = gen_lts(1000, model) plot(test) # }
Run the code above in your browser using DataLab