Description Usage Arguments Details Value Note Examples
genTS2(model_formula, beta, nu)
generates a realization of a time series (FDSLRM) with mean value mean
,
variance parameters of white noise and random effects var
and design matrix for random effects V
.
Normal distribution of white noise and random effects is assumed.
1 |
model_formula |
object of class |
beta |
vector of mean value parameters. |
nu |
vector of variance parameters, the first one is for the white noise and the next are for the random effects. |
n |
length of realization. |
explain the form of FDSLRM time series realization as linear mixed model?
Realization of particular FDSLRM time series.
Ver.: 06-Jan-2019 19:15:30.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## EXAMPLE 1
# realization from general FDSLRM
model_formula <- formula(x ~ cos(2 * pi / 24 * t) + sin(2 * pi / 24 * t) +
cos(2 * pi / 8 * t) + sin(2 * pi / 8 * t) +
cos(2 * pi / 6 * t) + sin(2 * pi / 6 * t))
beta <- c (-3, 8, 7)
nu <- c(3, 2.7, 1.5, 1, 2)
times <- 1:24
n <- length(times)
realization <- genTS2(model_formula, beta, nu, n)
print(realization)
plot(times, realization, xlab = "time", type = "o")
## EXAMPLE 2
# realization from classical linear regression time series model (special case of FDSLRM)
model_formula <- formula(x ~ cos(2 * pi / 24 * t) + sin(2 * pi / 24 * t))
beta <- c (-3, 8, 7)
nu <- 3
times <- 1:24
n <- length(times)
realization <- genTS2(model_formula, beta, nu, n)
print(realization)
plot(times, realization, xlab = "time", type = "o")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.