Description Usage Arguments Details Value Author(s) References See Also Examples
Simulates a harmonic regression. Possible types of models are normal, t(5), Laplace, cubic and AR1.
1 2 |
n |
Length of series. |
f |
Frequency. |
A |
Cosine amplitude. |
B |
Sine amplitude. |
model |
The model used for generating the error term. See details. |
phi |
Only used if AR1 error distribution is selected. |
sig |
The standard error of the series. |
Generate a harmonic series y with length n, where y_t = A*cos(2*pi*f*t)+B*sin(2*pi*f*t)+sig*e_t,\ t=1,...,n, and e comes from one of the following specified distributions with mean 0 and standard error 1:
Gaussian
: A standard normal distribution (i.i.d.).
t5
: A t distribution with 5 degrees of freedom
(i.i.d., standardized to mean 0 and variance 1).
Laplace
: A Laplace (double exponential) distribution
(i.i.d., standardized to mean 0 and variance 1).
cubic
: A standard normal distribution for e,
but y=y^3 this time.
AR1
: An AR(1) series with autocorrelation paramater phi
(standardized to mean 0 and variance 1).
Vector of length n, simulated harmonic series.
A.I. McLeod and Yuanhao Lai
McLeod, A.I., Yu, Hao and Krougly, Z. (2007), Algorithms for Linear Time Series Analysis: With R Package, Journal of Statistical Software 23, 5 1-26.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.