Description Usage Arguments Details Value Note Examples
genTS(mean, V, var)
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 |
mean |
vector of mean values, mean = Fβ. |
V |
design matrix for random effects. |
var |
vector of variance parameters, the first one is for the white noise and the next are for the random effects. |
explain the form of FDSLRM time series realization as linear mixed model?
Realization of particular FDSLRM time series.
Ver.: 03-Jan-2019 18:56:51.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## EXAMPLE 1
# realization from general FDSLRM
beta <- c (-3, 8, 7)
times <- 1:24
matF <- makeF(times, c(1/24))
matV <- makeV(times, c(1/8, 1/6))
meanv <- matF %*% beta
variances <- c(3, 2.7, 1.5, 1, 2)
realization <- genTS(meanv, matV, variances)
print(realization)
plot(times, realization, xlab = "time", type = "o")
## EXAMPLE 2
# realization from classical linear regression time series model (special case of FDSLRM)
beta <- c (-3, 8, 7)
times <- 1:24
matF <- makeF(times, c(1/24))
meanv <- matF %*% beta
variances <- 3
realization <- genTS(meanv, var = variances)
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.