getRNG: get the RNG and seed from an object

Description Usage Arguments Details Value See Also Examples

View source: R/setRNG.R

Description

Get the random number generator and seed used to generate an object.

Usage

1
2
3
    getRNG(e=NULL)
    ## Default S3 method:
getRNG(e=NULL)

Arguments

e

an object generated by simulation (which stored the RNG information).

Details

Extract the RNG information used to generate the object. If e is NULL then getRNG returns the RNG setting, as returned by setRNG(). Otherwise, the default method assumes the object is a list and the RNG information is in the element rng or noise\$rng.

Value

The random seed and other random number generation information used to generate the object.

See Also

setRNG, .Random.seed

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
if (require("dse")) {
  data("eg1.DSE.data.diff", package="dse")
  model <- estVARXls(eg1.DSE.data.diff)
  sim <- simulate(model)
  getRNG(sim)
  }

## End(Not run)

Example output

Loading required package: dse
Loading required package: tfplot
Loading required package: tframe

Attaching package: 'dse'

The following objects are masked from 'package:stats':

    acf, simulate

$kind
[1] "Mersenne-Twister"

$normal.kind
[1] "Inversion"

$seed
  [1]           1   976367141 -1620253889  -873942842  -787903152   -89049741
  [7]   840195985   268251584   589738910  -532173463 -1866500709  1621547178
 [13]  1008305868  -508565617   778167237   528697212  2126444498  1439438669
 [19]  1410713095  1735382510 -1387798328  1439182795   736971305   836270200
 [25] -1080429146   442630081  -296917933  -315110654  -262484428   394546103
 [31] -1505829971  -974991164  -400988950  1502210901  1274354927  1886991094
 [37] -1826652640   663536611   128436353   262821616   180073870  2129918713
 [43]  1274722443 -1450000198   557880252  1219266815  1217862741  1889527660
 [49]  1842321346   165158941 -1893113705    80879102 -1298305608  1659216283
 [55] -1697044487   110309192  -207455626  -639323215  -867881501 -1667599694
 [61]  1347522308 -1011272633  1450197789   831723924  1495653690  -367705723
 [67]   740495967 -2106313498  1816430448 -1632401261 -1086094031  -570420256
 [73]   119570558  -295937271  -326320837 -1499934454   475824364   417705327
 [79]   601158309   739560540  1776045106 -1197454547 -1221504537 -1810961138
 [85]   589808360  -125399829   135185801  1719670040  1866766406  -389824351
 [91]  1937393459  -760424798   861005204  -578720745  1940945933  1583077668
 [97]  1700115722  2118915189   706609103   685613270   214737024 -1808195901
[103]   534177889   875419856  1047106094  1268773849 -1051493397 -1192322470
[109]   -81728484  1397258527   476113269 -1241552884  1415705058  -608220483
[115] -1293286089  1098443230   514502424 -1839470981 -1379802087  -595815256
[121]   285290070 -1170584879  1747626627   -56663790  2085110948  1463850087
[127]   664837565  1518100276  2112552090   355910373 -1116816257  1748694534
[133]  1056031120    39124019  1152291793  -767829632 -1220905890  -672685143
[139]  1221917275  -124084630  1320313612  -508148401   276184581  -497531716
[145]   856929682   134672013  -214539065  2142568878  1537813512  1364942859
[151]  2009322729 -1843432520 -1819820954  -631661311  -556500077 -1917838270
[157]  1000416244  1327066615  1659662829  1983971972  1443706026 -1561976299
[163]   274177711   987307190  -203592992  -784722397   966105409   708199472
[169]  1947737678   420399801 -1731055925 -2007492742 -1663705476 -1235690817
[175] -1481524331 -1013777492 -1659571838   339031901  2001951319 -1089253058
[181]  -517181064   -50689445  -182616647  1631887368  -869473610  1389459953
[187] -1611567069  1940623474 -1337593148 -1232149369  -794781603  -308445612
[193]    -7537542  -532584507  1500326175   836741286 -1382544848 -1560571693
[199]  -913301775  1727544864 -1240610626  -138097463  -280795525 -2085952438
[205] -1293407060  -832275537  1640071013   605426972   651050354  -876595731
[211] -1102587353  1396537934  1159085736   547247275  1675171273 -1675978280
[217]  -627961722  1820433761   516731123  -912195742  1226979796    70585559
[223]  1801014989 -1910561180 -1952406454  2117333429  -532611825   -32998890
[229]  -777670380  -776331966  1500717824 -1312986180  1681613648  1654527266
[235]  -640784056  1161448460    76155996 -1709329198  -255847424   442017620
[241]  1792264680  1011555322  -171373872   239707436  -729350924  1933058962
[247]  -409400224 -2010965748 -1064408352   943822178 -1061136728 -1258475956
[253] -1716407428  -289865934  1825383024 -1843932860  -817485864   -10029958
[259]   688478768 -1022611780 -1616265388  1741164098 -1326039136 -1060946756
[265]  -405065264   758960482  -825907224  1081473996 -2004136196  2050474994
[271]  1020294272  2133557492 -1901780856  1918816570 -1981779120   484704364
[277]   -23405420  -325098158 -1056427296 -1810551604 -1139909472  -217621118
[283]  -767505176   -50549524  1990043708 -2041656206  1109015664   736752164
[289]  1955026488  1263079962 -1986947888  1858758204  1097064596   193539202
[295]  2082343872   930279740  1129426576  -819788766  1675685896   710636684
[301]  1542554652   -92344174    70427776  1458461716 -2105108696   504678458
[307] -2053867312   548108396   936595124  -910529518   681399264  1748214732
[313]   686465504   929327138  -547265240   363835660  2038014524   760772850
[319]  1439612144   275142468  2130123864  1953003066  -840396560   945960636
[325] -1650585068  1496808642 -1788179872   241377660  1594969296  1299212322
[331]  -918653784   414736780 -1581903428 -1261548494    57841472  -945515852
[337] -1519436472  1899681466  1252410128   610785516  1822780500  -564950254
[343]  -763105888  1197471692   480097120 -1780704062   585351720    11861420
[349]  1567263548   871243634  1243889456   964592676   -78216648   421578458
[355]  -274693232   569530620  -398155372 -1146657982 -1106732544  1925358652
[361]  -576558512  1821869218  2020144968 -1840890356   275824348   126795858
[367]  2074722432  1979292500   930391016   295035642   167714640    35110956
[373]  -515591820  -629501294 -1748688288  1270744204 -1337068192   704710882
[379]  1565917352   -17995060  1632609788  -106217550  1329108976  1065387460
[385] -1132242600   781333882 -2140789328   498215356    41220692   818138562
[391]  -777913568  -596423748   793560144  1416749026 -1388633240  1514071884
[397] -1462043908  -211322126   417657088 -1734306700  2145835528 -1105679942
[403]   786741712  -208999444 -1151514732    33696978  1843284064 -1052139188
[409]  1220306720 -1791251838 -1223734808 -1315253268  -686236100  -198403470
[415]  -448225424  -937324252   181407288  -205693542  1396487632 -1495658052
[421]  1530700436  1576597122 -1893002816 -1231831236  1315878544  -807136478
[427]  -494582264 -1385154804   123713436  -143007726  1018930048  -108765420
[433]  1277020456  1496621114 -2054940720  1177627244  1700301876  -376122222
[439]  -800899744   920351052 -1043502624   919371682   669683624 -1831734132
[445] -1049283652  1201674354  1505375216  2034810948 -1327786920  1928564794
[451]   218726512 -2085834180 -1032013036  -593854782   813252320  -476212824
[457]   971337489   600264195  1907534084   974535986  -317248633 -1313097263
[463] -1363528874  2098690356  1415596101 -1160359793   -91275768  2088804902
[469]  -329817389 -1475038155   -76977262   -37790880 -1301207351 -1614571013
[475]   513148364 -1473149862 -1362970289 -1502140391  2095443502 -1458514884
[481]  1024303533    29143639  1937116064 -1102270210  1076081611  1885824461
[487]   746752250  -793322696 -1503110943  -913876077  1071472564 -1690688318
[493] -1219122985 -1154050783  -647916314  -419495452  -922682091  1636185407
[499] -2029295400   -60671754  -176332029  -744623035 -1734701982  -351532080
[505]  1013645561  -355833301   217314716  -321385014    86277823 -2113232887
[511]   636846366  1173226700   522178717    61334823  -796510384  2012821998
[517] -1249718629  -104038147 -1082218518    13525128  -183722447   728299683
[523] -1450857308   387222866  2010892455    64904433 -1633555402  1689027796
[529]  1413318757  1832088175  -894128984  -234845690  -820851917 -1557520491
[535]  -513803278  1946390592   406466985  1602609179 -1562522132  1624878586
[541]  -621487569 -2016405959 -1331363762  1345611932 -1520063987   169150071
[547] -1399136640   979680478 -1534812245  -799305555   -19692262 -1840225832
[553] -1740645823  -621047565 -1485492460   135579298  -711884873 -2049291391
[559]  -392922746  -696935484   231933685   169317215   898956728   -86817642
[565]  -573982045   722082917 -1439102590  1484182256   196789913  -626374005
[571] -1873523844   807382442  1381549535   714822505 -1601055874   636570476
[577]  -684998723  2100497543  -560103312  -199185650 -1966815173  -321091811
[583] -1544739382  -584409368    55701969 -1132248125 -1778033468  -798219406
[589] -1533641145  1594301969  1738469270  1231246068 -1701030779  2070022607
[595] -1454826296   300060006 -1112330349   967602421 -1002456878   -19937504
[601]   225847049 -1526460357 -1272429172 -1054704614 -1160777585   863881177
[607]   507881582  1552296956  1681865069   327471895 -1314794784  -372158274
[613]  -259907957 -1985870579 -1395766982  1712068984  -767010015 -1500329005
[619]  2065068788  2013764482 -1770911209 -1940485919 -1054407130 -1302274268
[625]   930536767

setRNG documentation built on May 2, 2019, 5:22 p.m.