Description Usage Arguments Examples
Function to generate data of one column
1 | simuOneCol(n_time, n_grp, rho, omega, rndVar = F, mean = 0, sd = 0)
|
n_time |
Length of the time series |
n_grp |
Number of groups |
rho |
Parameter of serial correlation |
omega |
Parameter of synchronization |
rndVar |
Set random numbers for the each group mean. Default is FALSE |
mean |
mean value (hyper parameter) in the distribution of the group mean. Default is 0 |
sd |
sd value (hyper parameter) in the distribution of the group mean. Default is 0 |
1 2 3 4 5 6 7 8 9 10 11 | n_time <- 100
n_grp <- 5
y <- simuOneCol(n_time, n_area, rho = 0.5, omega = 0.5,
rndVar = T, mean = 0, sd = 1)
x0 <- rep(1, n_time * n_grp) # Intercept
x1 <- simuOneCol(n_time, n_grp, rho = 0.5, omega = 1)
x2 <- simuOneCol(n_time, n_grp, rho = 0.5, omega = 0)
area <- makeGrp(n_time, n_grp)
dat <- data.frame(y, x0, x1, x2, area)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.