Produces a random sample of k groups and d dimensions drawn from the normal distribution with different parameters.

generateMultivariateSample(N, k, d = 2)

Arguments

N

Sample size.

k

Number of groups.

d

Number of dimensions.

Value

list with two fields: matrix response and factor variable factor.

Examples

generateMultivariateSample(N = 100, k = 10, d = 5)
#> $factor #> [1] D J C A B I C C A J C H C I C J F H I H E B A G G G D J H I J C G D A G F #> [38] E I F J A G D J G G H F C F E H G D J C A F C B J I H F F A D B G G J B J #> [75] D G I A F H E F C A J B H I I G J A B A G E A B J C #> Levels: C H F D I J G A E B #> #> $response #> [,1] [,2] [,3] [,4] [,5] #> [1,] -1.370044e+00 -1.29810260 -0.97724915 -2.243508266 0.6047329872 #> [2,] 3.353171e-01 -1.23709831 0.14006285 -0.181078571 1.1375097630 #> [3,] -2.427264e+00 -0.09620553 -1.55323598 0.116047733 -0.8981034882 #> [4,] 6.442871e-02 0.69450905 -0.04525281 0.892492885 0.1718213563 #> [5,] 6.815527e-01 -0.47459123 0.67735566 1.808520401 0.9132347891 #> [6,] 1.228412e+00 1.76313061 0.53612501 1.079663512 -1.1051534547 #> [7,] -1.811818e+00 2.02584606 0.61687349 1.452055280 0.3934501445 #> [8,] -2.373253e-01 0.42761881 -0.66143654 2.556923589 -1.3698426711 #> [9,] -1.741996e-01 -0.56647935 1.33858671 1.072728070 0.7394716153 #> [10,] -2.027054e-01 0.06616469 -0.71781788 -0.978914989 1.0383709370 #> [11,] -5.436994e-01 0.39825915 0.68473354 1.075417132 -2.2803538615 #> [12,] 6.589820e-01 -1.47453793 -0.61055634 0.053855088 -2.0112246984 #> [13,] 2.075025e+00 -0.39544120 -0.34930683 -0.234343833 2.0687405597 #> [14,] -1.550989e+00 -0.13070247 1.13396930 0.950759734 -1.3150525575 #> [15,] 5.224269e-01 -1.99949395 1.53375658 0.073021934 -1.1097503996 #> [16,] -1.783011e+00 -0.09593086 1.50666929 0.863527998 0.4548967197 #> [17,] -4.420125e-01 0.42011400 0.34406175 -0.816198742 -0.8625873906 #> [18,] -2.260191e-02 -0.06286163 -2.03857975 0.295544263 0.9307754912 #> [19,] 6.229963e-01 -0.08013185 -0.49345763 1.346357662 0.5711704007 #> [20,] -8.840748e-01 -0.03228341 -0.06079296 -0.280015436 1.2348319265 #> [21,] 5.581544e-01 -0.71898093 0.43822179 -0.063043628 0.4620031264 #> [22,] 4.229513e-01 -1.11656132 -1.21489123 -0.132833831 -0.7342081944 #> [23,] -1.234544e+00 -0.78026990 0.49864688 0.629361770 1.3233606241 #> [24,] 7.877763e-01 -1.77695853 -1.08286996 -0.641231532 0.4572947704 #> [25,] 1.938505e+00 -0.42783487 0.42216645 -0.104018599 -0.7364807522 #> [26,] -4.744510e-02 -2.03102701 -0.22288872 -1.388668827 2.1436128315 #> [27,] -9.058474e-01 2.75076475 -0.50032469 0.437214206 -0.3381593680 #> [28,] 6.404969e-02 2.41366972 -0.70958579 0.515862087 0.3290296001 #> [29,] -7.967890e-01 0.03398894 0.90920901 0.194610535 -0.0882100204 #> [30,] -1.432400e+00 0.74079278 -0.23396528 -0.455762127 0.3550907169 #> [31,] 1.015363e+00 -0.37080818 1.24244375 1.012534989 -0.8048084555 #> [32,] 1.864886e-01 -0.16356423 1.26409418 0.275042593 1.4560005038 #> [33,] 2.936855e-01 -0.61094549 -0.71034727 0.006009411 -0.0004656092 #> [34,] 1.653549e+00 1.25188419 -0.35382962 2.010186412 -0.1176236571 #> [35,] 1.820381e-01 0.25031947 -1.08349099 0.313808823 0.1841482138 #> [36,] -8.399701e-02 -1.70558168 0.96685776 -0.846162712 -0.8612007223 #> [37,] -1.830087e+00 -0.85541313 -0.48053078 -0.134641045 0.7793108467 #> [38,] -1.892372e-01 -0.14490163 -1.04103618 1.470832200 -0.4540641716 #> [39,] -2.334460e-01 -0.32444696 0.19962995 -1.475125736 -2.0286071844 #> [40,] 1.147308e+00 -0.17256490 1.71290679 0.204499683 0.1374981227 #> [41,] 1.500349e-01 -0.33606292 0.95273636 -0.141768421 -0.2531652495 #> [42,] -5.691233e-01 -1.90230421 -0.86873581 1.842157648 0.7200350979 #> [43,] 3.510095e-05 -0.09450402 0.09863716 -0.205909535 0.8084364277 #> [44,] -2.214834e-01 0.03255579 -1.83487472 1.502231278 0.9624521304 #> [45,] 5.247971e-01 1.36129012 1.81119492 0.442188060 0.5031380723 #> [46,] 2.805418e+00 1.38140030 0.37983102 0.053455720 0.6863601515 #> [47,] 9.653138e-02 -0.41647627 -0.01567186 -0.125146310 1.0951989336 #> [48,] 6.077091e-01 0.68094267 -1.57458146 0.247787238 0.1818922153 #> [49,] 1.981949e-01 -0.41437304 -0.35254278 -0.626612578 -0.1968754162 #> [50,] -1.901720e+00 -0.51834551 0.62181043 0.682877534 -0.8480613844 #> [51,] 9.420865e-01 -0.68401973 0.41343327 0.589606056 -1.8774430764 #> [52,] -1.532367e-01 -0.88564860 -0.09919527 -0.814967320 -2.5861413063 #> [53,] -1.760872e-01 0.04923707 -0.19602335 -0.345798987 0.1080672274 #> [54,] 6.917759e-02 0.18556122 0.62116236 0.056529047 -1.8383419463 #> [55,] 5.956075e-02 -0.60865779 -0.04749709 -0.566766181 -0.1230852580 #> [56,] 6.298275e-01 0.16889715 -0.69567871 0.157162543 0.5474878788 #> [57,] -2.264115e+00 2.71514421 0.59783572 -1.281559297 -1.4306464098 #> [58,] 2.752557e+00 -1.33938704 -0.81012801 0.967582242 -0.1059880850 #> [59,] -2.812213e-01 -0.64601525 0.81911755 1.029048853 0.5031819093 #> [60,] 2.233557e-01 -0.93245461 1.10470063 -2.166425254 2.5126804489 #> [61,] 1.134346e+00 -0.76908693 1.41998840 -0.303348223 -0.4413813498 #> [62,] -5.850882e-01 1.27157978 0.90181391 0.379268039 -1.7789991293 #> [63,] 1.193952e+00 0.35543278 -1.29236569 1.427395820 -0.6781489679 #> [64,] -2.158964e-01 -0.98399849 0.81758778 -0.619946595 0.7288472658 #> [65,] -1.097563e+00 0.21472959 -0.70087226 -0.131842450 -1.2434327365 #> [66,] -8.958506e-01 -0.08008508 -0.36089757 0.267551749 -0.5882719769 #> [67,] 1.135057e+00 -1.42236955 -0.68232175 -1.456778518 1.1085391313 #> [68,] 1.616706e-01 1.10814896 -1.13663536 0.234340520 -0.5023799876 #> [69,] 5.486288e-01 1.07847764 -0.56422337 -0.951528054 0.3472986863 #> [70,] -1.649451e+00 -0.44025034 -1.34905562 1.898439401 1.7481467948 #> [71,] -1.420736e+00 -0.77816901 -0.65088011 -1.042770546 0.4628553413 #> [72,] 3.641503e-01 -0.91859001 -2.16959690 -1.133746286 1.1678697074 #> [73,] 1.397320e+00 -1.12408090 0.33158034 1.764724810 0.4510162329 #> [74,] 3.166963e-01 1.96052384 0.90872867 0.706063430 0.0474227751 #> [75,] 1.348293e+00 -1.47870016 -0.49710559 -0.655292217 0.3664544857 #> [76,] 5.739098e-01 -1.55156017 -0.94438980 0.667508839 -0.4881248718 #> [77,] 6.867480e-01 0.77750668 -1.19445969 1.372876146 0.8733900144 #> [78,] -3.993567e-02 1.06844014 1.35163231 0.594581979 1.7987806220 #> [79,] 2.521817e-01 -0.18358770 -0.61388379 0.809307437 1.0507952142 #> [80,] -6.032729e-02 1.55824293 -0.66670168 -0.929351716 2.1752306395 #> [81,] 2.014343e+00 -0.21324238 -1.29254753 -0.968882573 -0.1835628629 #> [82,] 1.378393e+00 0.93053526 0.82272239 -0.563483049 -0.6867930022 #> [83,] 7.587913e-01 0.41081180 3.00809274 1.888488707 0.0252921842 #> [84,] 6.262243e-01 -1.27984430 1.11924176 -0.116769607 0.7770312224 #> [85,] -4.682573e-01 0.11763337 -2.42179908 0.150221561 1.7580460668 #> [86,] 1.170535e+00 -2.27608345 1.61728753 0.412530895 0.3119454244 #> [87,] -2.582334e+00 -0.12639591 0.51382026 0.339006216 0.9911976849 #> [88,] -7.569378e-02 1.44814671 0.50278931 -0.219463937 -0.3818986462 #> [89,] 5.138898e-01 -1.44275737 -0.73529158 -0.279921977 -0.8802615153 #> [90,] -3.319511e-01 1.46718718 -1.10851818 -0.184466622 0.0230683213 #> [91,] 5.041876e-01 0.15670010 1.11705719 -0.931041190 1.1083967956 #> [92,] 1.133102e+00 -0.30422384 0.40585690 0.599068143 1.4710711674 #> [93,] 1.108713e+00 0.33765806 -1.49918152 -0.345024460 1.4231851069 #> [94,] 3.189711e-02 -0.60750209 -1.22357851 0.328683628 -0.7317572527 #> [95,] 5.361489e-01 -0.29556027 1.42534798 -0.002001793 -1.2278623180 #> [96,] 1.762883e+00 -0.13453714 0.53548399 -1.643640470 -0.8465572264 #> [97,] -2.843612e-01 0.81478437 -0.47912410 0.830144580 1.6414782427 #> [98,] 1.006348e+00 -0.27292173 0.70875558 1.311300782 -2.5369827268 #> [99,] 1.396826e+00 3.05948580 0.38905929 -0.525708977 1.9149668186 #> [100,] -2.866400e-01 1.09173757 -1.39260904 -0.388345065 1.3444652874 #>