DGP: Random walk.

Description Usage Arguments Examples

Description

Generate a random walk with drift 1/n.

Usage

1
DGP(n, niter)

Arguments

n

sample size. Number of rows in the generated matrix.

niter

number of columns in the generated matrix.

Examples

1
DGP(n = 100, niter = 10)

Example output

              [,1]        [,2]         [,3]       [,4]        [,5]       [,6]
  [1,]   0.5364481  -0.5579209  1.546571012  0.2491769  -0.5285448  1.1356978
  [2,]  -0.2483963  -0.5946639 -0.611098669 -0.2431517  -0.7788361  1.3503857
  [3,]   1.1893592  -0.7416445 -0.002650518 -1.9370283  -1.4134374  1.3445160
  [4,]  -0.2674605   0.8705979  0.050461842 -1.4032560  -0.1881844  1.5397120
  [5,]  -0.4941439   1.6492516  1.355489033  0.1709161   1.6038182  1.6579432
  [6,]  -0.6774818   0.8876222  2.071791968 -2.2853367   1.5497808  2.3419359
  [7,]  -1.5172366   0.2669402  2.427337044 -2.4241575   2.1842619  1.3999688
  [8,]  -1.4487711  -0.5533404  2.357440390 -0.3033205   1.2556667  0.9114955
  [9,]  -2.2564414  -1.1344531  2.822247938 -0.6395158  -0.5670167  0.2679768
 [10,]  -4.2967492  -0.1433677  4.108500307  0.3526668  -1.4585024  0.1518977
 [11,]  -4.4505049  -0.7949729  5.383337953  0.7540982  -2.3994045 -0.4759688
 [12,]  -3.7319828  -1.5573906  5.662591484  0.2541041  -3.2247078 -0.1284014
 [13,]  -3.9899634  -3.5658641  5.552047390 -0.7855423  -2.6686099 -0.1477304
 [14,]  -5.4438851  -4.0894495  6.357318741 -0.7295352  -1.0460740  1.0909977
 [15,]  -4.6894493  -3.6447212  5.853291097 -1.7283633  -1.6891886  2.6862785
 [16,]  -6.0898395  -4.4058885  5.456697629 -2.3746130  -1.7158353  2.3819057
 [17,]  -5.6127719  -5.1498294  6.686416608 -2.2705951  -1.8164680  3.3676584
 [18,]  -5.7220920  -5.4391872  6.780127979 -2.2426708  -0.5644626  4.1197481
 [19,]  -5.2448530  -3.7652207  7.380030130 -3.8361953  -1.2468862  6.3552057
 [20,]  -4.7367174  -4.9995506  6.872610845 -3.3431192  -2.4023288  4.8678661
 [21,]  -3.8317802  -5.7726850  7.652074332 -3.5575420  -3.4484221  5.9839392
 [22,]  -3.5426282  -5.5178544  8.464044073 -3.9849399  -2.7149370  5.4656326
 [23,]  -2.5247625  -5.6517416  7.777183929 -2.6471714  -2.3447095  6.8516412
 [24,]  -4.5878690  -7.2503730  8.965037107 -3.1056493  -2.0784883  5.9592228
 [25,]  -3.3880156  -6.2887930  9.560882365 -4.4356070  -1.3156004  5.7814434
 [26,]  -4.1023898  -8.0979247  9.103988482 -2.7601743  -2.2982247  4.9210966
 [27,]  -3.9244061  -6.3042530  9.499638119 -2.2112244  -0.8018984  5.1736633
 [28,]  -2.9940709  -4.4071136  8.975032534 -1.2018396  -1.5185521  6.4019935
 [29,]  -4.6556757  -2.9063949 10.041700936 -0.8503503  -1.4119018  5.4317626
 [30,]  -4.1972066  -3.2769944  9.845607666 -1.8989776  -1.1870377  6.0013546
 [31,]  -3.7047478  -4.1763694 10.462619902 -1.9305769  -0.6585622  6.7317581
 [32,]  -2.9365340  -4.5044635  9.924556044 -3.2134046  -0.9448651  4.9651202
 [33,]  -5.2458614  -5.9063470  7.834579718 -4.0972686  -1.2868660  5.1991762
 [34,]  -5.6953662  -5.6788041  8.095392482 -3.5453594  -1.1431463  4.0691916
 [35,]  -6.7907499  -4.9986780  8.050447201 -2.5657234  -1.3600094  5.4560910
 [36,]  -6.3778216  -5.2765373  7.400719393 -2.8007123  -0.4869326  7.2461996
 [37,]  -5.7988867  -4.7972338  5.954862014 -1.9305322   1.1272796  7.5502558
 [38,]  -6.4949699  -5.2573053  5.988591440 -2.5963762   0.6914439  6.6286115
 [39,]  -6.7750606  -5.4865712  6.546499531 -3.0864199  -0.4881276  7.2742272
 [40,]  -8.2489386  -5.9240337  5.747598136 -1.2443870  -0.2315061  6.4484026
 [41,]  -9.3891939  -6.5328633  5.518574890 -1.5636592  -0.9829971  5.4385053
 [42,]  -9.6536651  -6.2699003  5.175456158 -1.2923514  -1.3669788  5.6099745
 [43,]  -9.0657641  -7.0132685  6.005055365 -2.3945119  -3.0852417  6.2503005
 [44,] -10.4526667  -6.2709916  5.669775751 -1.3223014  -2.8123020  6.2308004
 [45,]  -9.6936090  -6.6635783  4.496891295 -1.1073012  -4.4178918  6.2531101
 [46,] -10.7347957  -9.4765784  3.475570207 -3.1216289  -4.5251614  5.9715680
 [47,] -10.5594148  -9.0036046  3.410480892 -1.8842541  -4.1892334  7.6871249
 [48,]  -9.4196057  -6.8607349  4.249066367 -0.6789100  -6.0801679  6.2289451
 [49,]  -8.2358833  -7.1212216  3.223081712  0.1036055  -6.5399730  6.4737992
 [50,]  -8.6537465  -6.8626962  3.085925602 -1.2959325  -6.4061274  5.9747231
 [51,]  -8.9035486  -6.8145798  2.814471726 -1.7183625  -7.5231672  3.8684876
 [52,] -10.3047216  -6.4105108  1.450786056 -2.1506506  -7.9149665  4.4424239
 [53,] -10.9360792  -7.9045960  3.019236198 -0.7916583  -7.8998127  6.2414577
 [54,] -10.8136217  -9.4814868  2.454291162 -1.8562899  -7.2172711  6.3046560
 [55,] -10.3810174 -10.3986049  4.651626402 -2.1813723  -8.6536319  7.2275487
 [56,]  -9.9841821  -9.6124078  5.455918025 -1.4205399  -9.7872519  7.0910391
 [57,] -10.6619804 -10.3830923  5.668478286  0.5866667 -10.0780769  6.9248404
 [58,] -10.5030779 -11.6516593  5.656428201  2.3885745 -11.4569912  5.8793036
 [59,] -10.5507277 -11.6430874  5.970959088  1.1655982 -13.4744709  7.1283726
 [60,] -10.6155510 -13.4840655  4.871709847 -2.0016116 -12.9592550  8.2661990
 [61,]  -9.0956536 -13.0225602  5.647182945 -3.0764533 -12.1777554  7.5906862
 [62,]  -7.4657166 -13.4455073  5.635156515 -3.0056898 -13.7806383  9.3547416
 [63,]  -6.3025584 -12.7219044  4.741158293 -3.1774560 -12.6282172  9.6506605
 [64,]  -6.3701620 -11.7512089  5.151160029 -2.8261450 -10.5199239  9.5644218
 [65,]  -8.1790965 -11.3596737  4.011872437 -1.7093534 -10.6772870 10.1104570
 [66,]  -9.2065411 -10.1316009  4.210040067 -1.0105372 -10.9342144  9.4106258
 [67,]  -8.8940488 -10.1387382  4.437330163 -0.5295455 -10.1293927  9.6970266
 [68,] -10.1619950 -10.1669476  3.398244438 -2.1596125 -10.5762384 10.0145654
 [69,] -10.0136560  -8.9132132  3.333121005 -2.8286357 -11.5379411  9.1983124
 [70,] -10.0546401  -9.8590720  1.775132044 -2.3323276 -12.0004757  9.6536552
 [71,]  -8.1924925  -8.9336468  0.611334948 -2.0961522 -11.0428207  9.1141367
 [72,]  -7.0708172  -9.8629847 -1.526971109 -2.7328330 -10.0167811  7.6811548
 [73,]  -7.5721926  -9.7408599 -1.175255656 -2.8361188  -8.2549139  7.4663674
 [74,]  -8.1060737  -9.1778473 -0.260284818 -2.3055951  -7.1972115  7.7779086
 [75,]  -9.8250009  -8.6361053  0.846205635  0.2911479  -7.5650688  7.9624592
 [76,]  -9.3442514  -9.4998677 -0.615055294  0.8433403  -7.0469640  7.3896178
 [77,]  -9.3288643  -9.6767170 -0.885652159  1.9185442  -8.1071486  7.1706142
 [78,]  -7.9708185  -9.8804275 -0.029512542  1.1783963  -8.2413734  8.1759980
 [79,]  -7.2367218 -10.0744388 -1.305426260  1.9821874  -9.2430788  8.8885478
 [80,]  -5.6741726  -8.3447295 -1.607862129  1.2424245  -7.9900555  7.8294302
 [81,]  -4.3387028  -8.1326960 -1.960705370  1.5587268  -8.0589450  7.7238082
 [82,]  -4.3629679  -7.6100403 -0.538251450  2.8870967  -8.8562401  8.4262324
 [83,]  -4.7139813  -6.1476402 -0.783453759  2.6305565  -9.8424417  6.7642844
 [84,]  -5.4241467  -5.7737748 -0.386436231  2.9063626 -10.6907729  6.9345298
 [85,]  -5.1321318  -6.6396237  0.148504514  4.0562010 -11.6315112  6.1698403
 [86,]  -5.9126574  -6.6441845  0.773649694  3.0796562 -12.7433050  6.2953710
 [87,]  -6.3475620  -7.3586776  0.450833401  2.4159894 -12.8683812  5.2663932
 [88,]  -4.9725688  -5.3793075  1.206162161  0.5212452 -13.7324549  5.4539581
 [89,]  -4.4651145  -5.9057100  0.904896765 -0.1866769 -13.4637759  7.1528218
 [90,]  -5.2695109  -5.9219423  0.680645315 -0.5602189 -15.1989172  8.3414171
 [91,]  -4.9914451  -6.0759746 -0.475211629 -0.8707559 -16.4612754  7.9621044
 [92,]  -5.5736534  -7.4492497 -0.705010300 -2.9526767 -17.1143470  6.8994560
 [93,]  -3.4301671  -7.0157384  0.489372369 -4.7945086 -17.4008901  6.5141096
 [94,]  -2.2474184  -7.7962274  0.706880756 -4.3448433 -17.9648565  5.6791220
 [95,]  -1.4906574  -6.5763025  0.673248159 -4.1929385 -17.9810306  5.0331815
 [96,]  -1.7111661  -5.6717857 -0.287829343 -5.0079976 -17.7113034  2.5361901
 [97,]  -1.6133944  -5.7629843  0.296393237 -6.3691774 -17.1678858  2.7140301
 [98,]  -3.7871341  -5.4558617 -0.953472186 -6.3342960 -17.6999544  3.9396405
 [99,]  -4.2437657  -5.2485640  0.118206622 -4.7433035 -17.3522860  4.2047865
[100,]  -2.5478058  -5.3955477 -0.305787058 -5.4930195 -17.5801988  5.8338494
                [,7]         [,8]         [,9]      [,10]
  [1,]   0.005878691  -0.80629816 -0.499290002  0.6356593
  [2,]   0.330698686   0.43025153 -1.056912513  1.7258464
  [3,]   0.505549705   1.07473790  0.453387288  1.2734256
  [4,]  -0.197114818   1.72784287 -0.308374100  2.9415708
  [5,]  -1.463672408   0.90632010 -0.142841629  3.6518849
  [6,]  -0.385549042   1.15286022 -0.174362721  3.1945282
  [7,]  -1.178429211   1.11065987 -0.416198765  3.0186148
  [8,]  -2.011645258   2.03718850  0.712979249  3.9445892
  [9,]  -0.566516515   1.67754239  1.279281593  4.9730077
 [10,]  -1.533893264   1.95253411  1.221191009  3.1766660
 [11,]  -1.240081158   1.52367473  2.262170983  2.0575667
 [12,]  -0.917161754   0.37456656  2.536359230  0.4064507
 [13,]   0.614378105   0.12051032  2.809592361  0.2321643
 [14,]  -0.187755622  -0.36889499  2.755797614 -0.5039722
 [15,]  -0.126695560   0.46573104  2.972149336  0.6503787
 [16,]  -0.604824999  -0.05674262  3.407002667  2.0893594
 [17,]  -1.934321718  -0.42732871  2.682672464  3.7627445
 [18,]  -2.860081505  -1.59296166  3.046248399  1.9554907
 [19,]  -3.724993767  -4.34904676  2.437800672  2.0384179
 [20,]  -4.547397984  -4.59085377  2.936381636  0.4772135
 [21,]  -4.750454617  -2.91466441  3.676985131  1.0448026
 [22,]  -4.888940618  -2.99272360  2.892623297  2.3420424
 [23,]  -4.954771074  -4.22981083  2.334187514  2.6011647
 [24,]  -5.566829426  -3.80039950  3.122785618  2.4465452
 [25,]  -5.103315588  -1.75288132  2.975938800  2.8324755
 [26,]  -3.958540388  -3.18433308  1.175346899  2.0473579
 [27,]  -5.237784248  -1.22907999 -0.717468002  1.9195570
 [28,]  -5.090335720  -2.62825018  1.629534303  3.8151664
 [29,]  -5.244411958  -2.77350897  1.177637381  2.8903520
 [30,]  -5.253118438  -3.26051596  1.734850602  4.1615795
 [31,]  -5.457927433  -2.24668940  2.169437199  2.7572687
 [32,]  -4.398309077  -2.74761960  0.960704520  2.6102895
 [33,]  -6.169710567  -2.61026366  0.519889617  2.3046877
 [34,]  -6.391334842  -2.36121279 -0.391476224  2.9943884
 [35,]  -5.796000771  -2.18904572 -1.140698615  2.4892545
 [36,]  -6.163513366  -1.81420563 -0.960658239  3.7464459
 [37,]  -6.384051605  -2.35505617 -0.539053317  3.4417993
 [38,]  -7.296299677  -2.93944573 -2.280730671  1.8799953
 [39,]  -7.891022154  -3.81880655 -1.677570258  0.6240538
 [40,]  -7.816722244  -4.97155644 -1.701327922  2.7782597
 [41,]  -8.465390894  -5.42233056 -2.332975244  2.9398746
 [42,]  -9.509708579  -5.29068053 -2.046919148  3.6875021
 [43,] -11.032685987  -3.65979045 -2.272112145  5.8659959
 [44,] -10.616088339  -3.68091286 -3.094978251  5.5603689
 [45,] -10.254195163  -3.95006898 -2.689089517  5.8127575
 [46,] -11.974966783  -5.22702000 -3.289822004  6.6812338
 [47,] -12.153754271  -4.00342879 -5.363480361  5.0029364
 [48,] -13.543554729  -4.24141848 -4.623704103  4.1047565
 [49,] -13.356757279  -4.70504717 -6.330967969  5.6348769
 [50,] -12.893909231  -5.87703665 -6.033435590  5.3332118
 [51,] -13.737217305  -7.07793330 -6.375095262  6.4739478
 [52,] -12.799981768  -5.65719915 -5.624598004  5.1848833
 [53,] -12.761842988  -6.33874422 -6.646641991  5.8316888
 [54,] -12.395844706  -5.33279815 -6.074726193  6.0824445
 [55,] -11.112330804  -4.55540292 -4.763428552  8.2499693
 [56,] -11.514866319  -4.03834512 -4.278723112 10.1794825
 [57,] -11.815760442  -4.14945170 -4.915620792 11.0839806
 [58,] -11.130156833  -3.20692474 -5.010136720 11.9128070
 [59,] -10.268692812  -4.67664387 -4.294950600 11.8819598
 [60,]  -9.986657464  -6.03780830 -2.019457660 12.5757304
 [61,]  -9.935060440  -5.58846079 -1.722612100 11.2654312
 [62,] -10.094036229  -5.12541983 -1.417531553  9.4540947
 [63,]  -8.495704365  -5.39675493  0.003933054 10.9990858
 [64,]  -7.088885848  -6.68180660 -1.046183579 10.4395534
 [65,]  -8.124739802  -7.63829623 -2.724487509  9.4102650
 [66,]  -7.997910816  -8.14374695 -2.982782456 10.4539437
 [67,]  -7.882283247  -6.96722812 -3.558968014 10.8722260
 [68,]  -7.940312480  -5.91198086 -3.874419610 12.2824719
 [69,]  -8.245810969  -6.69264578 -6.213001705 11.7510729
 [70,]  -7.752547573  -6.87954161 -7.424466101 12.4785006
 [71,]  -7.230334632  -6.20841958 -5.303971658 12.5796617
 [72,]  -8.168465303  -9.32475684 -5.609928435 12.5755740
 [73,]  -7.388531559 -10.66482991 -5.656446141 11.5700229
 [74,]  -7.069388351 -12.22550805 -4.217837550 10.9252850
 [75,]  -6.753472884 -10.34530823 -3.052592722  9.4480111
 [76,]  -6.995055782 -11.76158691 -2.471628708 12.6365004
 [77,]  -6.866121849 -11.21443720 -2.052023807 11.0927233
 [78,]  -8.385848566 -11.15581761 -1.848546925  9.9477969
 [79,]  -7.850537654 -11.41183921 -1.191274059 10.0228392
 [80,]  -6.976055931 -12.92300360 -2.561416605  9.2830971
 [81,]  -7.037480358 -13.53445715 -1.549462002 10.3160339
 [82,]  -6.860086554 -13.93776627 -2.108732681 10.6987807
 [83,]  -6.455509648 -13.99477593 -0.617109990 11.4510258
 [84,]  -6.975145426 -14.17257249  0.060796070 11.3840311
 [85,]  -7.841259389 -14.34495425  0.893850988 11.6393704
 [86,]  -9.015905274 -14.61783806  1.350124151 11.3954836
 [87,]  -9.595110356 -14.85054573  2.897146271 12.7228630
 [88,]  -9.404197892 -16.13749413  2.653748213 11.6288235
 [89,]  -9.248523505 -15.62305403  3.124770979 11.6682746
 [90,]  -8.482842026 -15.18185582  2.134810986 10.8439617
 [91,]  -8.445068249 -16.63159189  2.202201137 11.3571575
 [92,]  -8.290362760 -16.32009279  2.124475435  9.2696869
 [93,]  -8.517927138 -16.00363329  1.679693597  9.1852023
 [94,]  -9.250775196 -15.62021913  3.146240056 10.2097447
 [95,]  -8.979869597 -15.85115449  4.775079756 10.1403442
 [96,]  -8.540442452 -14.93161857  3.856174403  9.8952153
 [97,]  -6.965454961 -14.20300738  3.555499743 10.6861659
 [98,]  -5.457805679 -14.24684431  4.574528276 11.9035785
 [99,]  -6.183105995 -12.08378992  4.456848975 11.0057259
[100,]  -5.919682949 -11.11573960  4.267513297  9.6125180

MultipleBubbles documentation built on May 2, 2019, 12:34 p.m.