gen_lts {simts} | R Documentation |
Generate a Latent Time Series Object Based on a Model
Description
Simulate a lts
object based on a supplied time series model.
Usage
gen_lts(
n,
model,
start = 0,
end = NULL,
freq = 1,
unit_ts = NULL,
unit_time = NULL,
name_ts = NULL,
name_time = NULL,
process = NULL
)
Arguments
n |
An |
model |
A |
start |
A |
end |
A |
freq |
A |
unit_ts |
A |
unit_time |
A |
name_ts |
A |
name_time |
A |
process |
A |
Details
This function accepts either a ts.model
object (e.g. AR1(phi = .3, sigma2 =1) + WN(sigma2 = 1)) or a simts
object.
Value
A lts
object with the following attributes:
- start
The time of the first observation.
- end
The time of the last observation.
- freq
Numeric representation of the sampling frequency/rate.
- unit
A string reporting the unit of measurement.
- name
Name of the generated dataset.
- process
A
vector
that contains model names of decomposed and combined processes
Author(s)
James Balamuta, Wenchao Yang, and Justin Lee
Examples
# AR
set.seed(1336)
model = AR1(phi = .99, sigma2 = 1) + WN(sigma2 = 1)
test = gen_lts(1000, model)
plot(test)