我想知道在 r 中模拟多元时间序列数据的 r 代码。准确地说,我想模拟在 Genenet 包中找到的那种时间序列数据子集,例如
library(Genenet)
data(arth800)
subset = c(60, 141, 260, 333, 365, 424, 441, 512, 521, 578, 789, 799)
arth12 = arth.expr[, subset]
我希望模拟数据如下所示
> str(arth12)
num [1:22, 1:12] 6.59 6.33 7.12 6.9 7.22 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:22] "0-1" "0-2" "1-1" "1-2" ...
..$ : chr [1:12] "265768_at" "263426_at" "260676_at" "258736_at"
> arth12[1:8,1:8]
265768_at 263426_at 260676_at 258736_at 257710_at 255764_at 255070_at 253425_at
0-1 6.589464 8.708049 6.802193 2.560715 5.958843 8.695228 8.556889 6.137504
0-2 6.329124 9.084011 6.923625 4.145677 5.632268 8.421644 9.479982 6.228819
1-1 7.116864 8.865733 7.795066 4.832890 5.289097 8.994071 8.355792 6.705978
1-2 6.898450 8.792790 7.941341 5.061776 5.741467 8.657854 9.210915 6.982994
2-1 7.224002 8.910793 7.991522 5.053111 5.402586 8.757223 8.178914 6.556123
2-2 6.993221 8.978710 8.093286 5.026800 5.812498 8.868823 8.981567 6.852998
4-1 7.266787 9.261390 8.396177 5.251719 6.133399 9.241745 7.596935 7.074677
4-2 7.483816 9.300124 8.137504 5.551516 5.794416 9.110092 7.914684 6.904484